changeset 978:a58dfdd6d058

Fix /roster search Broken by changeset d3bfa9e9d88c.
author Mikael Berthe <mikael@lilotux.net>
date Sat, 21 Oct 2006 11:07:50 +0200
parents 5b01de4ac5e1
children ea939ff047d8
files mcabber/src/commands.c
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/commands.c	Tue Oct 10 20:15:06 2006 +0200
+++ b/mcabber/src/commands.c	Sat Oct 21 11:07:50 2006 +0200
@@ -518,20 +518,12 @@
   } else if (!strcasecmp(subcmd, "alternate")) {
     scr_RosterJumpAlternate();
   } else if (!strncasecmp(subcmd, "search", 6)) {
-    char *string = subcmd+6;
-    if (*string && (*string != ' ')) {
-      scr_LogPrint(LPRINT_NORMAL, "Unrecognized parameter!");
-      free_arg_lst(paramlst);
-      return;
-    }
-    while (*string == ' ')
-      string++;
-    if (!*string) {
+    if (!*arg) {
       scr_LogPrint(LPRINT_NORMAL, "What name or JID are you looking for?");
       free_arg_lst(paramlst);
       return;
     }
-    scr_RosterSearch(string);
+    scr_RosterSearch(arg);
     update_roster = TRUE;
   } else if (!strcasecmp(subcmd, "up")) {
     scr_RosterUp();