# process the incoming message
#
-if (&IsParam("useStrict")) { use strict; }
+#use strict;
sub process {
$learnok = 0; # Able to learn?
&shmFlush(); # hack.
+ # hack to support channel +o as "+o" in bot user file.
+ # requires +O in user file.
+ # is $who arg lowercase?
+ if (exists $channels{$chan}{o}{ $orig{who} } && &IsFlag("O") eq "O") {
+ &status("Gave $who/$chan +o (+O)\'ness");
+ $users{$userHandle}{FLAGS} =~ s/o//g;
+ $users{$userHandle}{FLAGS} .= "o";
+ }
+
# check if we have our head intact.
if ($lobotomized) {
if ($addressed and IsFlag("o") eq "o") {
# customized random message.
my $tmp = (rand() < 0.5) ? ", $who" : "";
- &performStrictReply(&getRandom(keys %{ $lang{'hello'} }) . $tmp);
+ &pSReply( &getRandom(keys %{ $lang{'hello'} }) . $tmp );
return;
}
&status("random praise detected");
my $tmp = (rand() < 0.5) ? "thanks $who " : "";
- &performStrictReply($tmp.":)");
+ &pSReply($tmp.":)");
return;
}
}
}
- if (&IsParam("factoids") and $param{'DBType'} =~ /^(mysql|pg|postgres|dbm)/i) {
+ if (&IsParam("factoids") and $param{'DBType'} =~ /^(mysql|pgsql|dbm)/i) {
&FactoidStuff();
} elsif ($param{'DBType'} =~ /^none$/i) {
return "NO FACTOIDS.";