antifuck.pl: sync channels on script load
This commit is contained in:
parent
8bce1075ba
commit
17149d0f01
@ -48,6 +48,18 @@ HELP
|
||||
unless weechat::config_is_set_plugin($option);
|
||||
weechat::config_set_desc_plugin($option, $OPTIONS{$option}[0]);
|
||||
}
|
||||
|
||||
my $iptr = weechat::infolist_get('buffer', '', '');
|
||||
|
||||
while (weechat::infolist_next($iptr)) {
|
||||
next unless weechat::infolist_string($iptr, 'plugin_name') eq 'irc';
|
||||
my $buf = weechat::infolist_pointer($iptr, 'pointer');
|
||||
$channels{
|
||||
lc weechat::buffer_get_string($buf, 'localvar_server')}{
|
||||
lc weechat::buffer_get_string($buf, 'localvar_channel')} = 1;
|
||||
}
|
||||
|
||||
weechat::infolist_free($iptr);
|
||||
}
|
||||
|
||||
sub mynick
|
||||
|
Loading…
Reference in New Issue
Block a user