!reset is now !fstop
This commit is contained in:
parent
1ad1aa303d
commit
c354053757
@ -72,7 +72,6 @@ def add_commands(d):
|
|||||||
@add_commands(("join",
|
@add_commands(("join",
|
||||||
"mode",
|
"mode",
|
||||||
"nick",
|
"nick",
|
||||||
"part",
|
|
||||||
"who"))
|
"who"))
|
||||||
class IRCClient(object):
|
class IRCClient(object):
|
||||||
""" IRC Client class. This handles one connection to a server.
|
""" IRC Client class. This handles one connection to a server.
|
||||||
@ -233,8 +232,10 @@ class IRCClient(object):
|
|||||||
def notice(self, user, msg):
|
def notice(self, user, msg):
|
||||||
for line in msg.split('\n'):
|
for line in msg.split('\n'):
|
||||||
self.send("NOTICE", user, ":{0}".format(line))
|
self.send("NOTICE", user, ":{0}".format(line))
|
||||||
def quit(self, chan, msg):
|
def quit(self, msg):
|
||||||
self.send("QUIT :{0}".format(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):
|
def kick(self, chan, nick, msg):
|
||||||
self.send("KICK", chan, nick, ":"+msg)
|
self.send("KICK", chan, nick, ":"+msg)
|
||||||
def ns_identify(self, passwd):
|
def ns_identify(self, passwd):
|
||||||
|
@ -343,6 +343,7 @@ def fleave(cli, nick, chan, rest):
|
|||||||
@cmd("fstart", admin_only=True)
|
@cmd("fstart", admin_only=True)
|
||||||
def fstart(cli, nick, chan, rest):
|
def fstart(cli, nick, chan, rest):
|
||||||
var.CAN_START_TIME = datetime.now()
|
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)
|
start(cli, nick, chan, rest)
|
||||||
|
|
||||||
|
|
||||||
@ -1844,8 +1845,12 @@ def fwait(cli, nick, chan, rest):
|
|||||||
"{1} seconds.").format(nick, var.EXTRA_WAIT))
|
"{1} seconds.").format(nick, var.EXTRA_WAIT))
|
||||||
|
|
||||||
|
|
||||||
@cmd("reset",admin_only=True)
|
@cmd("fstop",admin_only=True)
|
||||||
def reset_game(cli, nick, chan, rest):
|
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)
|
reset(cli)
|
||||||
|
|
||||||
|
|
||||||
@ -1917,6 +1922,7 @@ def show_admins(cli, nick, chan, rest):
|
|||||||
if (cloak in botconfig.ADMINS and 'G' not in status and
|
if (cloak in botconfig.ADMINS and 'G' not in status and
|
||||||
user != botconfig.NICK and cloak not in var.AWAY):
|
user != botconfig.NICK and cloak not in var.AWAY):
|
||||||
admins.append(user)
|
admins.append(user)
|
||||||
|
hk1 = HOOKS["whoreply"][-1]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1926,6 +1932,7 @@ def show_admins(cli, nick, chan, rest):
|
|||||||
|
|
||||||
HOOKS.pop("whoreply") # todo, makes this better :(
|
HOOKS.pop("whoreply") # todo, makes this better :(
|
||||||
HOOKS.pop("endofwho")
|
HOOKS.pop("endofwho")
|
||||||
|
hk2 = HOOKS["whoreply"][-1]
|
||||||
|
|
||||||
cli.who(chan)
|
cli.who(chan)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user