switched to proper nick change function
This commit is contained in:
parent
77d86dc840
commit
f1815037c0
1 changed files with 2 additions and 8 deletions
|
@ -16,9 +16,6 @@ def admins(inp, bot=None):
|
||||||
@hook.command(autohelp=False, adminOnly=True)
|
@hook.command(autohelp=False, adminOnly=True)
|
||||||
def stop(inp, input=None, db=None, notice=None):
|
def stop(inp, input=None, db=None, notice=None):
|
||||||
".stop [reason] -- Kills the bot with [reason] as its quit message."
|
".stop [reason] -- Kills the bot with [reason] as its quit message."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
|
||||||
notice("Only bot admins can use this command!")
|
|
||||||
return
|
|
||||||
if inp:
|
if inp:
|
||||||
input.conn.send("QUIT :Killed by " + input.nick + " (" + inp + ")")
|
input.conn.send("QUIT :Killed by " + input.nick + " (" + inp + ")")
|
||||||
else:
|
else:
|
||||||
|
@ -70,10 +67,10 @@ def part(inp, input=None, notice=None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def nick(inp, input=None, notice=None):
|
def nick(inp, input=None, notice=None, set_nick=None):
|
||||||
".nick <nick> -- Changes the bots nickname to <nick>."
|
".nick <nick> -- Changes the bots nickname to <nick>."
|
||||||
notice("Changing nick to " + inp + ".")
|
notice("Changing nick to " + inp + ".")
|
||||||
input.conn.send("NICK " + inp)
|
set_nick(inp)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
|
@ -139,9 +136,6 @@ def act(inp, input=None, notice=None):
|
||||||
".act [channel] <action> -- Makes the bot act out <action> in [channel] "\
|
".act [channel] <action> -- Makes the bot act out <action> in [channel] "\
|
||||||
"If [channel] is blank the bot will act the <action> in "\
|
"If [channel] is blank the bot will act the <action> in "\
|
||||||
"the channel the command was used in."
|
"the channel the command was used in."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
|
||||||
notice("Only bot admins can use this command!")
|
|
||||||
return
|
|
||||||
split = inp.split(" ")
|
split = inp.split(" ")
|
||||||
if split[0][0] == "#":
|
if split[0][0] == "#":
|
||||||
message = ""
|
message = ""
|
||||||
|
|
Reference in a new issue