1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

Handle nothing in main command

This commit is contained in:
James Booth 2012-02-18 23:17:01 +00:00
parent 34fba754ea
commit 94c97e08ab
2 changed files with 17 additions and 10 deletions

View File

@ -55,21 +55,28 @@ int handle_start_command(char *inp)
return result;
}
int handle_command(char *cmd)
int handle_command(char *inp)
{
int result = FALSE;
if (strcmp(cmd, "/quit") == 0) {
// handle nothing
if (strlen(inp) == 0) {
gui_refresh();
return TRUE;
}
if (strcmp(inp, "/quit") == 0) {
result = _cmd_quit();
} else if (strncmp(cmd, "/help", 5) == 0) {
} else if (strncmp(inp, "/help", 5) == 0) {
result = _cmd_help();
} else if (strncmp(cmd, "/who", 4) == 0) {
} else if (strncmp(inp, "/who", 4) == 0) {
result = _cmd_who();
} else if (strncmp(cmd, "/msg ", 5) == 0) {
result = _cmd_msg(cmd);
} else if (strncmp(cmd, "/close", 6) == 0) {
result = _cmd_close(cmd);
} else if (strncmp(inp, "/msg ", 5) == 0) {
result = _cmd_msg(inp);
} else if (strncmp(inp, "/close", 6) == 0) {
result = _cmd_close(inp);
} else {
result = _cmd_default(cmd);
result = _cmd_default(inp);
}
inp_clear();

View File

@ -6,6 +6,6 @@
#define QUIT_PROF 3
int handle_start_command(char *inp);
int handle_command(char *cmd);
int handle_command(char *inp);
#endif