diff mcabber/src/commands.c @ 129:03be1cc94560

[/trunk] Changeset 142 by mikael * Do not enter chat mode when a command is entered.
author mikael
date Thu, 28 Apr 2005 12:22:34 +0000
parents 81ccb1091dd8
children 60694c9ddde3
line wrap: on
line diff
--- a/mcabber/src/commands.c	Thu Apr 28 10:16:32 2005 +0000
+++ b/mcabber/src/commands.c	Thu Apr 28 12:22:34 2005 +0000
@@ -166,8 +166,16 @@
   char *p;
   cmd *curcmd;
 
-  if (*line != '/') {
-    send_message(line); // FIXME: are we talking to a _buddy_?
+  if (*line == 0 || *line != '/') {
+    scr_set_chatmode(TRUE);
+    if (current_buddy) {
+      buddy_setflags(BUDDATA(current_buddy), ROSTER_FLAG_LOCK, TRUE);
+
+      if (!*line)
+        scr_ShowBuddyWindow();
+      else
+        send_message(line); // FIXME: are we talking to a _buddy_?
+    }
     return 0;
   }