diff options
author | Timo Sirainen <cras@irssi.org> | 2003-12-10 22:57:51 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2003-12-10 22:57:51 +0000 |
commit | 06e771c9b07877c12b2313daa45a7e64ba205f99 (patch) | |
tree | db03a97c9feadc725b1f3470923bd1b7a4663ce4 /src/irc | |
parent | fe6b2d6d3ad72856f95a709dc40420cb4099a4db (diff) | |
download | irssi-06e771c9b07877c12b2313daa45a7e64ba205f99.zip |
/SET auto_whowas OFF allows now disabling automatic /whowas when /whois
doesn't find a nick
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3192 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-commands.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 8c888ffe..9ac6ca66 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -385,17 +385,25 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, event_402 = "whois event noserver"; } - /* do automatic /WHOWAS if any of the nicks wasn't found */ query = get_redirect_nicklist(query, &free_nick); - str = g_strconcat(qserver, " ", query, NULL); - server_redirect_event(server, "whois", 1, str, TRUE, - NULL, - "event 318", "whois end", - "event 402", event_402, - "event 301", "whois away", /* 301 can come as a reply to /MSG, /WHOIS or /WHOWAS */ - "event 401", "whois not found", - "event 311", "whois event", NULL); + str = g_strconcat(qserver, " ", query, NULL); + if (settings_get_bool("auto_whowas")) { + /* do automatic /WHOWAS if any of the nicks wasn't found */ + server_redirect_event(server, "whois", 1, str, TRUE, + NULL, + "event 318", "whois end", + "event 402", event_402, + "event 301", "whois away", /* 301 can come as a reply to /MSG, /WHOIS or /WHOWAS */ + "event 401", "whois not found", + "event 311", "whois event", NULL); + } else { + server_redirect_event(server, "whois", 1, str, TRUE, + NULL, + "event 318", "whois end", + "event 301", "whois away", /* 301 can come as a reply to /MSG, /WHOIS or /WHOWAS */ + "event 311", "whois event", NULL); + } g_free(str); server->whois_found = FALSE; @@ -920,6 +928,7 @@ void irc_commands_init(void) settings_add_time("misc", "knockout_time", "5min"); settings_add_str("misc", "wall_format", "[Wall/$0] $1-"); settings_add_bool("misc", "kick_first_on_kickban", FALSE); + settings_add_bool("misc", "auto_whowas", TRUE); knockout_tag = g_timeout_add(KNOCKOUT_TIMECHECK, (GSourceFunc) knockout_timeout, NULL); |