]> git.donarmstrong.com Git - infobot.git/commitdiff
fixed up performReply to be more intelligent
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 25 Sep 2000 12:08:16 +0000 (12:08 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 25 Sep 2000 12:08:16 +0000 (12:08 +0000)
when doing random stuff.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@143 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl

index d2bc6fae87752903c7713a0c4ed7c8557a7ca40c..eeef5cbeac8b4417955ff9949e1445a020082b00 100644 (file)
@@ -257,7 +257,7 @@ sub performReply {
     &checkMsgType($reply);
 
     if ($msgType eq 'public') {
-       if (rand() < 0.5) {
+       if (rand() < 0.5 or $reply =~ /[\.\?]$/) {
            $reply = "$orig{who}: ".$reply;
        } else {
            $reply = "$reply, ".$orig{who};