mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 04:36:21 +00:00
Tweak to commands
This commit is contained in:
14
command.c
14
command.c
@@ -19,7 +19,6 @@ int handle_start_command(char *cmd)
|
|||||||
result = QUIT_PROF;
|
result = QUIT_PROF;
|
||||||
} else if (strncmp(cmd, "/help", 5) == 0) {
|
} else if (strncmp(cmd, "/help", 5) == 0) {
|
||||||
cons_help();
|
cons_help();
|
||||||
inp_clear();
|
|
||||||
result = AWAIT_COMMAND;
|
result = AWAIT_COMMAND;
|
||||||
} else if (strncmp(cmd, "/connect ", 9) == 0) {
|
} else if (strncmp(cmd, "/connect ", 9) == 0) {
|
||||||
char *user;
|
char *user;
|
||||||
@@ -34,10 +33,11 @@ int handle_start_command(char *cmd)
|
|||||||
result = START_MAIN;
|
result = START_MAIN;
|
||||||
} else {
|
} else {
|
||||||
cons_bad_command(cmd);
|
cons_bad_command(cmd);
|
||||||
inp_clear();
|
|
||||||
result = AWAIT_COMMAND;
|
result = AWAIT_COMMAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inp_clear();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +58,8 @@ int handle_command(char *cmd)
|
|||||||
result = cmd_default(cmd);
|
result = cmd_default(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inp_clear();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,7 +72,6 @@ static int cmd_quit(void)
|
|||||||
static int cmd_help(void)
|
static int cmd_help(void)
|
||||||
{
|
{
|
||||||
cons_help();
|
cons_help();
|
||||||
inp_clear();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -78,7 +79,6 @@ static int cmd_help(void)
|
|||||||
static int cmd_who(void)
|
static int cmd_who(void)
|
||||||
{
|
{
|
||||||
jabber_roster_request();
|
jabber_roster_request();
|
||||||
inp_clear();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -99,8 +99,6 @@ static int cmd_msg(char *cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inp_clear();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,8 +110,6 @@ static int cmd_close(char *cmd)
|
|||||||
cons_bad_command(cmd);
|
cons_bad_command(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
inp_clear();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +124,5 @@ static int cmd_default(char *cmd)
|
|||||||
cons_bad_command(cmd);
|
cons_bad_command(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
inp_clear();
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user