antifuck.pl: irc.server.xxx.autojoin wasn't working correctly with multiple channels

This commit is contained in:
wowaname 2016-09-18 00:35:13 +00:00
parent 613bc37bfa
commit 9466a83bbd

View File

@ -91,9 +91,9 @@ sub fuckbuf_close {
sub irc_connect { sub irc_connect {
my $server = pop; my $server = pop;
my ($autojoin) = lc (weechat::config_string(weechat::config_get( my ($autojoin) = (weechat::config_string(weechat::config_get(
"irc.server.$server.autojoin")) =~ /^([^ ]*)/); "irc.server.$server.autojoin")) =~ /^([^ ]*)/);
$channels{$server}{$_} = 1 for (split ',', $autojoin); $channels{$server}{$_} = 1 for (split ',', lc($autojoin));
return weechat::WEECHAT_RC_OK; return weechat::WEECHAT_RC_OK;
} }
@ -107,7 +107,6 @@ sub irc_disconnect {
sub buffer_opened { sub buffer_opened {
my $buffer = pop; my $buffer = pop;
weechat::print('',$buffer);
return weechat::WEECHAT_RC_OK return weechat::WEECHAT_RC_OK
if weechat::buffer_get_string($buffer, 'localvar_plugin') ne 'irc'; if weechat::buffer_get_string($buffer, 'localvar_plugin') ne 'irc';