diff mcabber/src/commands.c @ 960:90ff94f0fbbb

Auto-whois shouldn't enable chat mode
author Mikael Berthe <mikael@lilotux.net>
date Mon, 11 Sep 2006 19:14:59 +0200
parents 30b799632653
children 303408ef5e5d 056364952b0d
line wrap: on
line diff
--- a/mcabber/src/commands.c	Sat Sep 09 13:10:27 2006 +0200
+++ b/mcabber/src/commands.c	Mon Sep 11 19:14:59 2006 +0200
@@ -1871,7 +1871,9 @@
   jb_room_unlock(buddy_getjid(bud));
 }
 
-void room_whois(gpointer bud, char *arg)
+//  room_whois(..)
+// If interactive is TRUE, chatmode can be enabled.
+void room_whois(gpointer bud, char *arg, guint interactive)
 {
   char **paramlst;
   gchar *nick, *buffer;
@@ -1897,9 +1899,11 @@
 
   nick = to_utf8(nick);
 
-  // Enter chat mode
-  scr_set_chatmode(TRUE);
-  scr_ShowBuddyWindow();
+  if (interactive) {
+    // Enter chat mode
+    scr_set_chatmode(TRUE);
+    scr_ShowBuddyWindow();
+  }
 
   jid = buddy_getjid(bud);
   rstatus = buddy_getstatus(bud, nick);
@@ -2030,7 +2034,7 @@
       room_topic(bud, arg);
   } else if (!strcasecmp(subcmd, "whois"))  {
     if ((arg = check_room_subcommand(arg, TRUE, bud)) != NULL)
-      room_whois(bud, arg);
+      room_whois(bud, arg, TRUE);
   } else {
     scr_LogPrint(LPRINT_NORMAL, "Unrecognized parameter!");
   }