]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Process.pl
warn on pmsg karma - raven24++
[infobot.git] / src / Process.pl
index 21c2a69b88def607c7873a32766c52ed7d5a9de8..1f00469ea1831438c2dc9787c6b01a29fd44e3bc 100644 (file)
@@ -201,7 +201,7 @@ sub process {
     }
 
     # allowOutsiders.
-    if ( &IsParam('disallowOutsiders') and $msgType =~ /private/i ) {
+    if ( &IsParam('disallowOutsiders') and $msgType =~ /private/i and IsFlag('o') ne 'o' ) {
         my $found = 0;
 
         foreach ( keys %channels ) {
@@ -304,15 +304,19 @@ sub process {
     ###
 
     # karma. set...
-    if (   $msgType =~ /public/i
-        && $message =~ /^(\S+)(--|\+\+)\s*$/
+    if (   $message =~ /^(\S+)(--|\+\+)\s*$/
         && $addressed
         && &IsChanConfOrWarn('karma') )
     {
 
-    # to request factoids such as 'g++' or 'libstdc++', append '?' to the query.
+        # for factoids such as 'g++' or 'libstdc++', append '?' to query.
         my ( $term, $inc ) = ( lc $1, $2 );
 
+        if( !( $msgType =~ /public/i ) ) {
+            &msg( $who, "please use karma in a channel only");
+            return;
+        }
+
         if ( lc $term eq lc $who ) {
             &msg( $who, "please don't karma yourself" );
             return;