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/mlock.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/mlock.pl')
-rw-r--r-- | scripts/mlock.pl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/mlock.pl b/scripts/mlock.pl index 01d08b45..5bc0bde7 100644 --- a/scripts/mlock.pl +++ b/scripts/mlock.pl @@ -1,4 +1,4 @@ -# /MLOCK <channel> <mode> - for Irssi 0.7.96 and above +# /MLOCK <channel> <mode> # # Locks the channel mode to <mode>, if someone else tries to change the mode # Irssi will automatically change it back. +k and +l are a bit special since @@ -21,16 +21,16 @@ sub mlock_check_mode { my ($server, $channame) = @_; $channel = $server->channel_find($channame); - return if (!channel || !$channel->values()->{'chanop'}); + return if (!channel || !$channel->{chanop}); $keep_mode = $keep_channels{$channame}; return if (!$keep_mode); # old channel mode - $oldmode = $channel->values()->{'mode'}; + $oldmode = $channel->{mode}; $oldmode =~ s/^([^ ]*).*/\1/; - $oldkey = $channel->values()->{'key'}; - $oldlimit = $channel->values()->{'limit'}; + $oldkey = $channel->{key}; + $oldlimit = $channel->{limit}; # get the new channel key/limit @newmodes = split(/ /, $keep_mode); $keep_mode = $newmodes[0]; @@ -93,12 +93,12 @@ sub mlock_check_mode { } if ($modecmd ne "") { - $channel->values()->{'server'}->command("/mode $channame $modecmd$extracmd"); + $channel->{server}->command("/mode $channame $modecmd$extracmd"); } } sub mlock_mode_changed { - my ($data, $server) = @_; + my ($server, $data) = @_; my ($channel, $mode) = split(/ /, $data, 2); mlock_check_mode($server, $channel); @@ -107,7 +107,7 @@ sub mlock_mode_changed { sub mlock_synced { my $channel = $_[0]; - mlock_check_mode($channel->values()->{'server'}, $channel->values()->{'name'}); + mlock_check_mode($channel->{server}, $channel->{name}); } Irssi::command_bind('mlock', '', 'cmd_mlock'); |