handle disconnects in snomasks.pl
This commit is contained in:
parent
7c30f60303
commit
e42f5bf50e
@ -19,6 +19,7 @@ if (weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION,
|
||||
$SCRIPT_LICENCE, $SCRIPT_DESC, '', '')) {
|
||||
weechat::bar_item_new('snomasks', 'bar_snomasks', '');
|
||||
weechat::hook_signal('buffer_switch', 'buffer_switch', '');
|
||||
weechat::hook_signal('irc_server_disconnected', 'irc_disconnected', '');
|
||||
weechat::hook_signal('*,irc_raw_in_008', 'irc_008', '');
|
||||
}
|
||||
|
||||
@ -48,3 +49,9 @@ sub irc_008 {
|
||||
weechat::bar_item_update('snomasks');
|
||||
return weechat::WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
sub irc_disconnected {
|
||||
my $server = pop;
|
||||
delete $snomask{lc $server};
|
||||
return weechat::WEECHAT_RC_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user