From 25d0d40d5ac479fa80d01119921a05ca93211a59 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 15 Nov 2001 00:08:26 +0000 Subject: [PATCH] Small optimization for whois-redirecting. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2012 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/notifylist/notify-ison.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/irc/notifylist/notify-ison.c b/src/irc/notifylist/notify-ison.c index b5885771..7d22f21c 100644 --- a/src/irc/notifylist/notify-ison.c +++ b/src/irc/notifylist/notify-ison.c @@ -164,7 +164,8 @@ static void ison_save_users(MODULE_SERVER_REC *mserver, char *online) } } -static void whois_send(IRC_SERVER_REC *server, char *nicks) +static void whois_send(IRC_SERVER_REC *server, const char *nicks, + const char *whois_request) { char *p, *str; @@ -184,7 +185,7 @@ static void whois_send(IRC_SERVER_REC *server, char *nicks) "", "event empty", NULL); g_free(str); - irc_send_cmdv(server, "WHOIS %s", nicks); + irc_send_cmdv(server, "WHOIS %s", whois_request); } static void whois_send_server(IRC_SERVER_REC *server, char *nick) @@ -192,7 +193,7 @@ static void whois_send_server(IRC_SERVER_REC *server, char *nick) char *str; str = g_strdup_printf("%s %s", nick, nick); - whois_send(server, str); + whois_send(server, nick, str); g_free(str); } @@ -215,14 +216,14 @@ static void whois_list_send(IRC_SERVER_REC *server, GSList *nicks) if (count >= server->max_whois_in_cmd) { g_string_truncate(str, str->len-1); - whois_send(server, str->str); + whois_send(server, str->str, str->str); count = 0; } } if (str->len > 0) { g_string_truncate(str, str->len-1); - whois_send(server, str->str); + whois_send(server, str->str, str->str); } g_string_free(str, TRUE);