]> Pileus Git - ~andy/rhawk/commitdiff
fix fortune
authorAndy Spencer <andy753421@gmail.com>
Mon, 5 Mar 2012 00:42:41 +0000 (00:42 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 5 Mar 2012 00:42:41 +0000 (00:42 +0000)
rhawk

diff --git a/rhawk b/rhawk
index 282fa0efd2858182e964b32fb986d973b90df1a3..37b07e37ea5670592060e6c4fa977bd6d43ecf2f 100755 (executable)
--- a/rhawk
+++ b/rhawk
@@ -91,10 +91,10 @@ BEGIN { pollchan = "#sfvlug" }
 }
 
 # Fortune
-TO == NICK && /^/             { extra = ""   }
-TO == NICK && /^.fortune.*-o/ { extra = "-o" }
-TO == NICK && /^.fortune/     {
-       gsub(/.*\.fortune *|-[a-z]* *|[^a-zA-Z0-9 ]/, "", MSG)
+TO == NICK && /^/                 { extra = ""   }
+TO == NICK && /^\.?fortune.*-o/ { extra = "-o" }
+TO == NICK && /^\.?fortune/     {
+       gsub(/.*\.?fortune *|-[a-z]* *|[^a-zA-Z0-9 ]/, "", MSG)
        cmd = "fortune " extra " " (MSG ? "-m '" MSG "'" : "-s")
        while (cmd | getline _fortune && lines < 5) {
                say(_fortune)