say("Game over!")
winner = sp_scores[0] > sp_scores[1] ? 0 : 1
looser = !winner
- say(sp_team(winner) " wins the game " \
+ say(CHANNEL, sp_team(winner) " wins the game " \
sp_scores[winner] " to " sp_scores[looser])
- say(sp_order[winner+0] "++")
- say(sp_order[winner+2] "++")
- say(sp_order[looser+0] "--")
- say(sp_order[looser+2] "--")
+ say(CHANNEL, sp_order[winner+0] "++")
+ say(CHANNEL, sp_order[winner+2] "++")
sp_reset(2)
} else {
AUTH == OWNER &&
sp_state == "play" &&
-/^\.play (\w+) (\S+)$/ {
+/^\.force (\w+) (\S+)$/ {
say(sp_channel, FROM " is cheating for " $2)
sp_from = $2
sp_play($3)
# Setup
-/^\.newgame ?([0-9]+)?/ {
+/^\.newgame ?([0-9]+)?$/ {
if (sp_state != "new") {
reply("There is already a game in progress.")
} else {
sp_valid &&
sp_state == "play" &&
-/^\.play (\S+)$/ {
+/^\.play (\S+)/ {
_card = $2
+ gsub(/[^A-Za-z0-9]/, "", _card);
if (!(_card in sp_deck)) {
reply("Invalid card")
}