From 4abe2ec58ca18faaff3fa6e33d3b97033b361ef6 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Sun, 8 Mar 2015 18:36:40 +0400 Subject: Avoid putting channels in autojoin more than once --- config-default/commands.xml | 11 +++++++---- 1 file 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 @@ {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(); + } ]]> -- cgit v1.2.3