]> Pileus Git - ~andy/rhawk/commitdiff
Fix typos in spades and sfvlug polling
authorAndy Spencer <andy753421@gmail.com>
Fri, 3 Feb 2012 21:54:10 +0000 (21:54 +0000)
committerAndy Spencer <andy753421@gmail.com>
Fri, 3 Feb 2012 21:54:10 +0000 (21:54 +0000)
rhawk
spades.awk

diff --git a/rhawk b/rhawk
index 8dedf6a0f7cf9d5f9d3153c54dbae5cdaa8af427..75c9e3f9068b270e9db9d8b9aa79eb57ead218f0 100755 (executable)
--- a/rhawk
+++ b/rhawk
@@ -67,27 +67,28 @@ CMD == "NICK" && FROM in bots {
 }
 
 # SFV Lug
-#pollchan = "#sfvlug"
-#(CMD == "PING"    && systime()-lastpoll > 60*60*24) ||
-#(CMD == "PRIVMSG" && DST == pollchan && /^\.poll/) {
-#      if (!topics[pollchan])
-#              next
-#      cmd = "curl -s http://sfvlug.org/"
-#      day = "(Sun|Mon|Tue|Wed|Thu|Fri|Sat)"
-#      web = "next meeting.*" day "\\w+[, ]+([A-Z]\\w+) +([0-9]+)[, ]+([0-9]+)"
-#      irc = day "\\w*[, ]+([A-Z]\\w+) +([0-9]+)"
-#      while (cmd | getline line) {
-#              if (match(line, web, arr)) {
-#                      new = arr[1] " " arr[2] " " arr[3]
-#                      sub(irc, new, topics[pollchan])
-#                      topic(pollchan, topics[pollchan])
-#                      break
-#              }
-#      }
-#      lastpoll = systime()
-#      close(cmd)
-#}
-
+BEGIN { pollchan = "#sfvlug" }
+(CMD == "PING"    && systime()-lastpoll > 60*60*24) ||
+(CMD == "PRIVMSG" && DST == pollchan && /^\.poll/) {
+       if (!topics[pollchan]) {
+               debug("Unknown topic for " pollchan);
+               next
+       }
+       cmd = "curl -s http://sfvlug.org/"
+       day = "(Sun|Mon|Tue|Wed|Thu|Fri|Sat)"
+       web = "next meeting.*" day "\\w+[, ]+([A-Z]\\w+) +([0-9]+)[, ]+([0-9]+)"
+       irc = day "\\w*[, ]+([A-Z]\\w+) +([0-9]+)"
+       while (cmd | getline line) {
+               if (match(line, web, arr)) {
+                       new = arr[1] " " arr[2] " " arr[3]
+                       sub(irc, new, topics[pollchan])
+                       topic(pollchan, topics[pollchan])
+                       break
+               }
+       }
+       lastpoll = systime()
+       close(cmd)
+}
 
 # Fortune
 TO == NICK && /^/             { extra = ""   }
index 3eeab902d350454fdd95d37a05ce53afa3b8fb22..51d18d6824be8c592074b39ba8c442b27db9f50d 100644 (file)
@@ -315,7 +315,7 @@ FROM == OWNER &&
 
 !sp_valid &&
 (sp_state "bid" || sp_state == "play") &&
-/^\.(bid|play)\>$/ {
+/^\.(bid|play)\>/ {
        if (FROM in sp_players)
                say(".slap " FROM ", it is not your turn.")
        else
@@ -458,7 +458,7 @@ sp_state == "play" &&
                say("There is no game in progress")
        }
        if (sp_state == "join") {
-               say("Waiting for palyers: " \
+               say("Waiting for players: " \
                    sp_order[0] " " sp_order[1] " " \
                    sp_order[2] " " sp_order[3])
        }