]> ruin.nu Git - NDIRC.git/commitdiff
Don't allow pm replies to be sent to channel
authorMichael Andreen <harv@ruin.nu>
Sat, 9 May 2009 20:04:00 +0000 (22:04 +0200)
committerMichael Andreen <harv@ruin.nu>
Sat, 9 May 2009 20:04:00 +0000 (22:04 +0200)
Misc.pm

diff --git a/Misc.pm b/Misc.pm
index 74159ac9e3461b421abf763f745951455141758c..bd159933d5203675d5071e4e5a444d1054c09a80 100644 (file)
--- 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);