Gave meaningful error messages, should be more obvious how to use it now

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2662 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-09-17 20:55:15 +00:00
parent f6a8eb23f7
commit ddf8b91984
1 changed files with 15 additions and 1 deletions

View File

@ -125,7 +125,7 @@ void JCL_Command(void);
int JCL_ExecuteCommand(int *args)
{
char cmd[8];
char cmd[256];
Cmd_Argv(0, cmd, sizeof(cmd));
if (!strcmp(cmd, COMMANDPREFIX))
{
@ -1098,6 +1098,11 @@ void JCL_Command(void)
Con_Printf("You are already connected\nPlease /quit first\n");
return;
}
if (!*arg[1])
{
Con_Printf("%s <server[:port]> <account[@domain]> <password>\n", arg[0]+1);
return;
}
jclient = JCL_Connect(arg[1], 5223, true, arg[2], arg[3]);
}
else if (!strcmp(arg[0]+1, "open") || !strcmp(arg[0]+1, "connect"))
@ -1107,6 +1112,11 @@ void JCL_Command(void)
Con_Printf("You are already connected\nPlease /quit first\n");
return;
}
if (!*arg[1])
{
Con_Printf("%s <server[:port]> <account[@domain]> <password>\n", arg[0]+1);
return;
}
jclient = JCL_Connect(arg[1], 5222, false, arg[2], arg[3]);
}
else if (!jclient)
@ -1148,6 +1158,10 @@ void JCL_Command(void)
Con_SubPrintf(jclient->defaultdest, "%s: "COLOURYELLOW"%s\n", ">>", msg);
}
else
{
Con_Printf("Not connected\ntype \"" COMMANDPREFIX " /connect JABBERSERVER USERNAME@DOMAIN PASSWORD\" to connect\n");
if (BUILTINISVALID(Net_SetTLSClient))
Con_Printf("eg: " COMMANDPREFIX " /tlsconnect talk.google.com myusername@gmail.com mypassword\n");
}
}
}