diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-06 05:42:13 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-06 05:42:13 +0000 |
commit | d22ca4efe5261e81fc50e51cde03a75c6c43ab5c (patch) | |
tree | 8641961c49e7647a5c52cf90273aee1ee5e22d3a /scripts/autorejoin.pl | |
parent | bb594d2aa648619f02f04d8db0b7efffa24b9c77 (diff) | |
download | irssi-d22ca4efe5261e81fc50e51cde03a75c6c43ab5c.zip |
updated
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@976 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'scripts/autorejoin.pl')
-rw-r--r-- | scripts/autorejoin.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/autorejoin.pl b/scripts/autorejoin.pl index 7954f121..75bac90d 100644 --- a/scripts/autorejoin.pl +++ b/scripts/autorejoin.pl @@ -8,15 +8,17 @@ use Irssi; use Irssi::Irc; sub event_rejoin_kick { - my ($data, $server) = @_; + my ($server, $data) = @_; my ($channel, $nick) = split(/ +/, $data); - return if ($server->values()->{'nick'} ne $nick); + return if ($server->{nick} ne $nick); # check if channel has password $chanrec = $server->channel_find($channel); - $password = $chanrec->values()->{'key'} if ($chanrec); + $password = $chanrec->{key} if ($chanrec); + # We have to use send_raw() because the channel record still + # exists and irssi won't even try to join to it with command() $server->send_raw("JOIN $channel $password"); } |