diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-18 20:50:12 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-18 20:50:12 +0000 |
commit | fcb1374e40ebd2b58c1ebf957a76fa5416034431 (patch) | |
tree | 74be402eb1eeb1c4742e9c5955c8d8c4e7ed8d31 /scripts | |
parent | ac6bfeba1f83a205e1516eb6166ed2d79c9b6a54 (diff) | |
download | irssi-fcb1374e40ebd2b58c1ebf957a76fa5416034431.zip |
fixes
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@768 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/autoop.pl | 11 | ||||
-rw-r--r-- | scripts/autorejoin.pl | 1 | ||||
-rw-r--r-- | scripts/hello.pl | 1 | ||||
-rw-r--r-- | scripts/mlock.pl | 5 | ||||
-rw-r--r-- | scripts/privmsg.pl | 3 | ||||
-rw-r--r-- | scripts/quitmsg.pl | 1 | ||||
-rw-r--r-- | scripts/realname.pl | 1 |
7 files changed, 16 insertions, 7 deletions
diff --git a/scripts/autoop.pl b/scripts/autoop.pl index e3d4c65e..5f36f798 100644 --- a/scripts/autoop.pl +++ b/scripts/autoop.pl @@ -1,7 +1,8 @@ # /AUTOOP <*|#channel> [<nickmasks>] -# For Irssi 0.7.96 and above (older versions had a few bugs) +# For Irssi 0.7.96 and above use Irssi; +use Irssi::Irc; my %opnicks, %temp_opped; @@ -45,14 +46,15 @@ sub cmd_autoop { sub autoop { my ($channel, $masks, @nicks) = @_; - my $nickrec; + my $server, $nickrec; + $server = $channel->values()->{'server'}; foreach $nickrec (@nicks) { $nick = $nickrec->values()->{'nick'}; $host = $nickrec->values()->{'host'}; if (!$temp_opped{$nick} && - Irssi::irc_masks_match($masks, $nick, $host)) { + $server->masks_match($masks, $nick, $host)) { $channel->command("/op $nick"); $temp_opped{$nick} = 1; } @@ -60,7 +62,8 @@ sub autoop { } sub event_massjoin { - my ($channel, @nicks) = @_; + my ($channel, $nicks_list) = @_; + my @nicks = @{$nicks_list}; return if (!$channel->values()->{'chanop'}); diff --git a/scripts/autorejoin.pl b/scripts/autorejoin.pl index 85331c5a..7954f121 100644 --- a/scripts/autorejoin.pl +++ b/scripts/autorejoin.pl @@ -5,6 +5,7 @@ # if you kick/get kicked all the time "just for fun" ... use Irssi; +use Irssi::Irc; sub event_rejoin_kick { my ($data, $server) = @_; diff --git a/scripts/hello.pl b/scripts/hello.pl index de53c3ab..b08a84b1 100644 --- a/scripts/hello.pl +++ b/scripts/hello.pl @@ -1,6 +1,7 @@ # "Hello, world!" script :) /hello <nick> sends "Hello, world!" to <nick> use Irssi; +use Irssi::Irc; sub cmd_hello { my ($data, $server, $channel) = @_; diff --git a/scripts/mlock.pl b/scripts/mlock.pl index 82bea7b0..01d08b45 100644 --- a/scripts/mlock.pl +++ b/scripts/mlock.pl @@ -1,4 +1,4 @@ -# /MLOCK <channel> <mode> - for Irssi 0.7.29 and above +# /MLOCK <channel> <mode> - for Irssi 0.7.96 and above # # 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 @@ -6,6 +6,7 @@ # mode to "+ntlk", Irssi will allow all +k and +l (or -lk) mode changes. use Irssi; +use Irssi::Irc; sub cmd_mlock { my ($data, $server) = @_; @@ -26,7 +27,7 @@ sub mlock_check_mode { return if (!$keep_mode); # old channel mode - $oldmode = $channel->get_mode(); + $oldmode = $channel->values()->{'mode'}; $oldmode =~ s/^([^ ]*).*/\1/; $oldkey = $channel->values()->{'key'}; $oldlimit = $channel->values()->{'limit'}; diff --git a/scripts/privmsg.pl b/scripts/privmsg.pl index 999bd213..9fdcdcb1 100644 --- a/scripts/privmsg.pl +++ b/scripts/privmsg.pl @@ -1,12 +1,13 @@ # listen PRIVMSGs - send a notice to yourself when your nick is meantioned use Irssi; +use Irssi::Irc; sub event_privmsg { my ($data, $server, $nick, $address) = @_; my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; - return if (!Irssi::is_channel($target)); + return if (!$server->ischannel($target)); $mynick = $server->values()->{'nick'}; return if ($text !~ /\b$mynick\b/); diff --git a/scripts/quitmsg.pl b/scripts/quitmsg.pl index 6e296755..3d8ce289 100644 --- a/scripts/quitmsg.pl +++ b/scripts/quitmsg.pl @@ -1,6 +1,7 @@ # Quit with a random quit message read from ~/.irssi/irssi.quit use Irssi; +use Irssi::Irc; $quitfile = "$ENV{HOME}/.irssi/irssi.quit"; diff --git a/scripts/realname.pl b/scripts/realname.pl index 1150d5e2..1b48f044 100644 --- a/scripts/realname.pl +++ b/scripts/realname.pl @@ -1,6 +1,7 @@ # /RN - display real name of nick use Irssi; +use Irssi::Irc; sub cmd_realname { my ($data, $server, $channel) = @_; |