From bf8616ee26b7dd9f4b93b61a8ab8216351b12fa8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 1 Jun 2000 15:04:41 +0000 Subject: /userhost command didn't work ("unknown command"), and sending it with /quote userhost crashed. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@255 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-commands.c | 2 ++ src/irc/core/nicklist.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 3405ef99..fe2a6281 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -824,6 +824,7 @@ void irc_commands_init(void) command_bind("rping", NULL, (SIGNAL_FUNC) command_self); command_bind("squit", NULL, (SIGNAL_FUNC) command_2self); command_bind("uping", NULL, (SIGNAL_FUNC) command_self); + command_bind("userhost", NULL, (SIGNAL_FUNC) command_self); command_bind("quote", NULL, (SIGNAL_FUNC) cmd_quote); command_bind("wall", NULL, (SIGNAL_FUNC) cmd_wall); command_bind("wallops", NULL, (SIGNAL_FUNC) command_1self); @@ -887,6 +888,7 @@ void irc_commands_deinit(void) command_unbind("rping", (SIGNAL_FUNC) command_self); command_unbind("squit", (SIGNAL_FUNC) command_2self); command_unbind("uping", (SIGNAL_FUNC) command_self); + command_unbind("userhost", (SIGNAL_FUNC) command_self); command_unbind("quote", (SIGNAL_FUNC) cmd_quote); command_unbind("wall", (SIGNAL_FUNC) cmd_wall); command_unbind("wallops", (SIGNAL_FUNC) command_1self); diff --git a/src/irc/core/nicklist.c b/src/irc/core/nicklist.c index b8947ee6..826ee4a9 100644 --- a/src/irc/core/nicklist.c +++ b/src/irc/core/nicklist.c @@ -502,7 +502,7 @@ static void event_userhost(const char *data, IRC_SERVER_REC *server) params = event_get_params(data, 2, NULL, &hosts); phosts = g_strsplit(hosts, " ", -1); - for (pos = phosts; pos != NULL; pos++) { + for (pos = phosts; *pos != NULL; pos++) { ptr = strchr(*pos, '='); if (ptr == NULL) continue; *ptr++ = '\0'; -- cgit v1.2.3