]> ruin.nu Git - NDIRC.git/blobdiff - Misc.pm
Don't allow pm replies to be sent to channel
[NDIRC.git] / 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);