close
Warning:
Failed to sync with repository "(default)": [Errno 12] Cannot allocate memory; repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
Line | |
---|
1 | # log out bitlbee on quit, useful when you use an irc proxy such as bip. |
---|
2 | |
---|
3 | use Irssi; |
---|
4 | use Irssi::Irc; |
---|
5 | use strict; |
---|
6 | |
---|
7 | use vars qw($VERSION %IRSSI); |
---|
8 | |
---|
9 | $VERSION = "0.01"; |
---|
10 | %IRSSI = ( |
---|
11 | authors => 'Francois Lallart', |
---|
12 | contact => 'fraff@free.fr', |
---|
13 | name => 'blquit', |
---|
14 | description => 'logout all bitlbee accounts on quit', |
---|
15 | license => 'GPLv2', |
---|
16 | ); |
---|
17 | |
---|
18 | my $name = "&bitlbee"; |
---|
19 | my $chan; |
---|
20 | |
---|
21 | sub bl_quit { |
---|
22 | my ($data, $server, $channel) = @_; |
---|
23 | |
---|
24 | foreach my $sv (Irssi::servers()) { |
---|
25 | $chan = $sv->channel_find($name); |
---|
26 | |
---|
27 | if ($chan) { |
---|
28 | $sv->send_message ($chan->{"name"}, "account off all", 0); |
---|
29 | } |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | Irssi::command_bind('quit', 'bl_quit'); |
---|
Download in other formats: