From: Michael Andreen Date: Sat, 9 May 2009 20:04:00 +0000 (+0200) Subject: Don't allow pm replies to be sent to channel X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=commitdiff_plain;h=a4de7ad56ba78ac03799e330466e9f971b7bb39f Don't allow pm replies to be sent to channel --- diff --git a/Misc.pm b/Misc.pm index 74159ac..bd15993 100644 --- a/Misc.pm +++ b/Misc.pm @@ -43,6 +43,9 @@ sub valuecolor { sub parseCommand { my ($msg, $server, $nick, $address, $channel, $disp,$model) = @_; + return if $channel !~ /^#/ && $msg =~ /^~/; + $msg = ".$msg" if $channel !~ /^#/ && $msg =~ /^[^.!]/; + my ($p,$command,$args) = ($msg =~ /^([.!~])(\S+)(?: (.+))?/) or return 0; return 0 unless $disp->has_command($command,$channel);