Browse Source

!reset is now !fstop

master
jcao219 13 years ago
parent
commit
008effdf82
  1. 5
      oyoyo/client.py
  2. 9
      wolfgame.py

5
oyoyo/client.py

@ -72,7 +72,6 @@ def add_commands(d): @@ -72,7 +72,6 @@ def add_commands(d):
@add_commands(("join",
"mode",
"nick",
"part",
"who"))
class IRCClient(object):
""" IRC Client class. This handles one connection to a server.
@ -233,8 +232,10 @@ class IRCClient(object): @@ -233,8 +232,10 @@ class IRCClient(object):
def notice(self, user, msg):
for line in msg.split('\n'):
self.send("NOTICE", user, ":{0}".format(line))
def quit(self, chan, msg):
def quit(self, msg):
self.send("QUIT :{0}".format(msg))
def part(self, chan, msg):
self.send("PART {0} :{1}".format(chan, msg))
def kick(self, chan, nick, msg):
self.send("KICK", chan, nick, ":"+msg)
def ns_identify(self, passwd):

9
wolfgame.py

@ -343,6 +343,7 @@ def fleave(cli, nick, chan, rest): @@ -343,6 +343,7 @@ def fleave(cli, nick, chan, rest):
@cmd("fstart", admin_only=True)
def fstart(cli, nick, chan, rest):
var.CAN_START_TIME = datetime.now()
cli.msg(chan, "\u0002{0}\u0002 has forced the game to start.".format(nick))
start(cli, nick, chan, rest)
@ -1844,8 +1845,12 @@ def fwait(cli, nick, chan, rest): @@ -1844,8 +1845,12 @@ def fwait(cli, nick, chan, rest):
"{1} seconds.").format(nick, var.EXTRA_WAIT))
@cmd("reset",admin_only=True)
@cmd("fstop",admin_only=True)
def reset_game(cli, nick, chan, rest):
if var.PHASE == "none":
cli.notice(nick, "No game is currently running.")
return
cli.msg(chan, "\u0002{0}\u0002 has forced the game to stop.".format(nick))
reset(cli)
@ -1917,6 +1922,7 @@ def show_admins(cli, nick, chan, rest): @@ -1917,6 +1922,7 @@ def show_admins(cli, nick, chan, rest):
if (cloak in botconfig.ADMINS and 'G' not in status and
user != botconfig.NICK and cloak not in var.AWAY):
admins.append(user)
hk1 = HOOKS["whoreply"][-1]
@ -1926,6 +1932,7 @@ def show_admins(cli, nick, chan, rest): @@ -1926,6 +1932,7 @@ def show_admins(cli, nick, chan, rest):
HOOKS.pop("whoreply") # todo, makes this better :(
HOOKS.pop("endofwho")
hk2 = HOOKS["whoreply"][-1]
cli.who(chan)
Loading…
Cancel
Save