oops, messed up the pep8. fixed!
This commit is contained in:
parent
b87d3fbbbe
commit
f521c61b9b
|
@ -9,9 +9,9 @@ import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
@hook.command("owners", autohelp = False)
|
@hook.command("owners", autohelp=False)
|
||||||
@hook.command(autohelp = False)
|
@hook.command(autohelp=False)
|
||||||
def admins(inp, bot = None):
|
def admins(inp, bot=None):
|
||||||
admins = str(bot.config["admins"])
|
admins = str(bot.config["admins"])
|
||||||
admins = admins.replace("u'", "")
|
admins = admins.replace("u'", "")
|
||||||
admins = admins.replace("'", "")
|
admins = admins.replace("'", "")
|
||||||
|
@ -20,10 +20,10 @@ def admins(inp, bot = None):
|
||||||
return admins
|
return admins
|
||||||
|
|
||||||
|
|
||||||
@hook.command("quit", autohelp = False)
|
@hook.command("quit", autohelp=False)
|
||||||
@hook.command("exit", autohelp = False)
|
@hook.command("exit", autohelp=False)
|
||||||
@hook.command(autohelp = False)
|
@hook.command(autohelp=False)
|
||||||
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"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -33,12 +33,12 @@ def stop(inp, input = None, db = None, notice = None):
|
||||||
else:
|
else:
|
||||||
input.conn.send("QUIT :Killed by " + input.nick + " (no reason)")
|
input.conn.send("QUIT :Killed by " + input.nick + " (no reason)")
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
subprocess.call("./cloudbot stop", shell = True)
|
subprocess.call("./cloudbot stop", shell=True)
|
||||||
|
|
||||||
|
|
||||||
@hook.command("reboot", autohelp = False)
|
@hook.command("reboot", autohelp=False)
|
||||||
@hook.command(autohelp = False)
|
@hook.command(autohelp=False)
|
||||||
def restart(inp, input = None, db = None, notice = None):
|
def restart(inp, input=None, db=None, notice=None):
|
||||||
".restart [reason] -- Restarts the bot, with [reason] as its quit message."
|
".restart [reason] -- Restarts the bot, with [reason] as its quit message."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -50,19 +50,19 @@ def restart(inp, input = None, db = None, notice = None):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
os.execl("./cloudbot", "restart")
|
os.execl("./cloudbot", "restart")
|
||||||
|
|
||||||
@hook.command("clearlogs", autohelp = False)
|
@hook.command("clearlogs", autohelp=False)
|
||||||
@hook.command(autohelp = False)
|
@hook.command(autohelp=False)
|
||||||
def clear(inp, input = None, db = None, notice = None):
|
def clear(inp, input=None, db=None, notice=None):
|
||||||
".clear -- Clears the bot's log(s)."
|
".clear -- Clears the bot's log(s)."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
return
|
return
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
subprocess.call("./cloudbot clear", shell = True)
|
subprocess.call("./cloudbot clear", shell=True)
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def join(inp, input = None, db = None, notice = None):
|
def join(inp, input=None, db=None, notice=None):
|
||||||
".join <channel> -- Joins <channel>."
|
".join <channel> -- Joins <channel>."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -72,7 +72,7 @@ def join(inp, input = None, db = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def cycle(inp, input = None, db = None, notice = None):
|
def cycle(inp, input=None, db=None, notice=None):
|
||||||
".cycle <channel> -- Cycles <channel>."
|
".cycle <channel> -- Cycles <channel>."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -83,7 +83,7 @@ def cycle(inp, input = None, db = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def part(inp, input = None, notice = None):
|
def part(inp, input=None, notice=None):
|
||||||
".part <channel> -- Parts from <channel>."
|
".part <channel> -- Parts from <channel>."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -93,7 +93,7 @@ def part(inp, input = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def nick(inp, input = None, notice = None):
|
def nick(inp, input=None, notice=None):
|
||||||
".nick <nick> -- Changes the bots nickname to <nick>."
|
".nick <nick> -- Changes the bots nickname to <nick>."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -103,7 +103,7 @@ def nick(inp, input = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def raw(inp, input = None, notice = None):
|
def raw(inp, input=None, notice=None):
|
||||||
".raw <command> -- Sends a RAW IRC command."
|
".raw <command> -- Sends a RAW IRC command."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -113,7 +113,7 @@ def raw(inp, input = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def kick(inp, input = None, notice = None):
|
def kick(inp, input=None, notice=None):
|
||||||
".kick [channel] <user> [reason] -- kicks a user."
|
".kick [channel] <user> [reason] -- kicks a user."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
@ -145,7 +145,7 @@ def kick(inp, input = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def say(inp, input = None, notice = None):
|
def say(inp, input=None, notice=None):
|
||||||
".say [channel] <message> -- Makes the bot say <message> in [channel]. "\
|
".say [channel] <message> -- Makes the bot say <message> in [channel]. "\
|
||||||
"If [channel] is blank the bot will say the <message> in "\
|
"If [channel] is blank the bot will say the <message> in "\
|
||||||
"the channel the command was used in."
|
"the channel the command was used in."
|
||||||
|
@ -170,7 +170,7 @@ def say(inp, input = None, notice = None):
|
||||||
|
|
||||||
@hook.command("me")
|
@hook.command("me")
|
||||||
@hook.command
|
@hook.command
|
||||||
def act(inp, input = None, notice = None):
|
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."
|
||||||
|
@ -194,7 +194,7 @@ def act(inp, input = None, notice = None):
|
||||||
|
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
def topic(inp, input = None, notice = None):
|
def topic(inp, input=None, notice=None):
|
||||||
".topic [channel] <topic> -- Change the topic of a channel."
|
".topic [channel] <topic> -- Change the topic of a channel."
|
||||||
if not input.nick in input.bot.config["admins"]:
|
if not input.nick in input.bot.config["admins"]:
|
||||||
notice("Only bot admins can use this command!")
|
notice("Only bot admins can use this command!")
|
||||||
|
|
Reference in a new issue