mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
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:
parent
f6a8eb23f7
commit
ddf8b91984
1 changed files with 15 additions and 1 deletions
|
@ -125,7 +125,7 @@ void JCL_Command(void);
|
||||||
|
|
||||||
int JCL_ExecuteCommand(int *args)
|
int JCL_ExecuteCommand(int *args)
|
||||||
{
|
{
|
||||||
char cmd[8];
|
char cmd[256];
|
||||||
Cmd_Argv(0, cmd, sizeof(cmd));
|
Cmd_Argv(0, cmd, sizeof(cmd));
|
||||||
if (!strcmp(cmd, COMMANDPREFIX))
|
if (!strcmp(cmd, COMMANDPREFIX))
|
||||||
{
|
{
|
||||||
|
@ -1098,6 +1098,11 @@ void JCL_Command(void)
|
||||||
Con_Printf("You are already connected\nPlease /quit first\n");
|
Con_Printf("You are already connected\nPlease /quit first\n");
|
||||||
return;
|
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]);
|
jclient = JCL_Connect(arg[1], 5223, true, arg[2], arg[3]);
|
||||||
}
|
}
|
||||||
else if (!strcmp(arg[0]+1, "open") || !strcmp(arg[0]+1, "connect"))
|
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");
|
Con_Printf("You are already connected\nPlease /quit first\n");
|
||||||
return;
|
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]);
|
jclient = JCL_Connect(arg[1], 5222, false, arg[2], arg[3]);
|
||||||
}
|
}
|
||||||
else if (!jclient)
|
else if (!jclient)
|
||||||
|
@ -1148,6 +1158,10 @@ void JCL_Command(void)
|
||||||
Con_SubPrintf(jclient->defaultdest, "%s: "COLOURYELLOW"%s\n", ">>", msg);
|
Con_SubPrintf(jclient->defaultdest, "%s: "COLOURYELLOW"%s\n", ">>", msg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Con_Printf("Not connected\ntype \"" COMMANDPREFIX " /connect JABBERSERVER USERNAME@DOMAIN PASSWORD\" to connect\n");
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue