diff options
| -rw-r--r-- | config-default/commands.xml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml index a29c7cd..8fb62c9 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -474,16 +474,19 @@ </command> <command cmd="^;join (\S+)" flag="a"> <![CDATA[ - my $chan = $1; + my $chan = lc $1; + use List::Util qw(none); unless (defined($::channels->{channel}->{$chan})) { $::channels->{channel}->{$chan} = { }; ASM::XML->writeChannels(); } $conn->join($chan); my @autojoins = @{$::settings->{autojoins}}; - @autojoins = (@autojoins, $chan); - $::settings->{autojoins} = \@autojoins; - ASM::XML->writeSettings(); + if (none { $chan eq lc $_ } @autojoins) { + @autojoins = (@autojoins, $chan); + $::settings->{autojoins} = \@autojoins; + ASM::XML->writeSettings(); + } ]]> </command> <command cmd="^;part (\S+)" flag="a"> |
