about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-02-12 21:47:19 +0000
committerJames Booth <boothj5@gmail.com>2012-02-12 21:47:19 +0000
commitb71f61d400a6ca52a64093b2917db267e1bfab6c (patch)
tree0465f518a6e465a0e4b6a29bf4e41ccb3e76de21
parentcdbd0d2f0a2b945a8bf0b6ab17dafaf0d0cf90bf (diff)
downloadprofani-tty-b71f61d400a6ca52a64093b2917db267e1bfab6c.tar.gz
Tweak to commands
-rw-r--r--command.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/command.c b/command.c
index 8477a639..c223cdda 100644
--- a/command.c
+++ b/command.c
@@ -19,7 +19,6 @@ int handle_start_command(char *cmd)
         result = QUIT_PROF;
     } else if (strncmp(cmd, "/help", 5) == 0) {
         cons_help();
-        inp_clear();
         result = AWAIT_COMMAND;
     } else if (strncmp(cmd, "/connect ", 9) == 0) {
         char *user;
@@ -34,10 +33,11 @@ int handle_start_command(char *cmd)
         result = START_MAIN;
     } else {
         cons_bad_command(cmd);
-        inp_clear();
         result = AWAIT_COMMAND;
     }
 
+    inp_clear();
+
     return result;
 }
 
@@ -58,6 +58,8 @@ int handle_command(char *cmd)
         result = cmd_default(cmd);
     }
 
+    inp_clear();
+
     return result;
 
 }
@@ -70,7 +72,6 @@ static int cmd_quit(void)
 static int cmd_help(void)
 {
     cons_help();
-    inp_clear();
 
     return TRUE;
 }
@@ -78,7 +79,6 @@ static int cmd_help(void)
 static int cmd_who(void)
 {
     jabber_roster_request();
-    inp_clear();
 
     return TRUE;
 }
@@ -99,8 +99,6 @@ static int cmd_msg(char *cmd)
         }
     }
 
-    inp_clear();
-    
     return TRUE;
 }
 
@@ -112,8 +110,6 @@ static int cmd_close(char *cmd)
         cons_bad_command(cmd);
     }
     
-    inp_clear();
-    
     return TRUE;
 }
 
@@ -128,7 +124,5 @@ static int cmd_default(char *cmd)
         cons_bad_command(cmd);
     }
 
-    inp_clear();
-
     return TRUE;
 }