From 0fccf3be6e8fc213ebaf23cbc80232ab7be6c431 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 10 Feb 2002 11:12:05 +0000 Subject: [PATCH] updated redirection code git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2412 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- scripts/realname.pl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/scripts/realname.pl b/scripts/realname.pl index ccb1c6b1..0adbcef3 100644 --- a/scripts/realname.pl +++ b/scripts/realname.pl @@ -7,20 +7,15 @@ use strict; sub cmd_realname { my ($data, $server, $channel) = @_; - $server->send_raw("WHOIS :$data"); - # ignore all whois replies except "No such nick" or the # first line of the WHOIS reply - $server->redirect_event($data, 2, - "event 318", "event empty", -1, - "event 402", "event 402", -1, - "event 401", "event 401", 1, - "event 311", "redir whois", 1, - "event 301", "event empty", 1, - "event 312", "event empty", 1, - "event 313", "event empty", 1, - "event 317", "event empty", 1, - "event 319", "event empty", 1); + $server->redirect_event('whois', 1, $data, -1, '', { + 'event 402' => 'event 402', + 'event 401' => 'event 401', + 'event 311' => 'redir whois', + '' => 'event empty' }); + + $server->send_raw("WHOIS :$data"); } sub event_rn_whois {