]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Process.pl
A round of fixes:
[infobot.git] / src / Process.pl
index c24f51ca6fa3a51f2da590832968d0708a35f22f..55da57b038e49fa11aaf82d4a02bdfffb445e835 100644 (file)
@@ -186,6 +186,15 @@ sub process {
        }
     }
 
+    # override msgType.
+    if ($msgType =~ /public/ and $message =~ s/^\+//) {
+       &status("found '+' flag; setting msgType to public.");
+       $force_public_reply++;
+       $msgType = 'public';
+       $who     = $chan;       # major hack to fix &msg().
+       &DEBUG("addressed => $addressed.");
+    }
+
     # User Processing, for all users.
     if ($addressed) {
        my $retval;
@@ -262,13 +271,6 @@ sub process {
     ### bot commands...
     ###
 
-    # override msgType.
-    if ($msgType =~ /public/ and $message =~ s/^\+//) {
-       &status("found '+' flag; setting msgType to public.");
-       $force_public_reply++;
-       $msgType = 'public';
-    }
-
     if ($message =~ s/^literal\s+//i) {
        &status("literal ask of '$message'.");
        $literal = 1;