Update plugins/admin.py
This commit is contained in:
parent
9c59fa538a
commit
70b7539861
1 changed files with 11 additions and 11 deletions
|
@ -51,33 +51,33 @@ def clearlogs(inp, input=None):
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def join(inp, conn=None, notice=None):
|
def join(inp, conn=None, notice=None):
|
||||||
".join <channel> -- Joins <channel>."
|
".join <channel> -- Joins <channel>."
|
||||||
notice("Attempting to join " + inp + "...")
|
notice("Attempting to join %s..." % inp)
|
||||||
conn.cmd("JOIN", [inp])
|
conn.join(inp)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def cycle(inp, conn=None, notice=None):
|
def cycle(inp, conn=None, notice=None):
|
||||||
".cycle <channel> -- Cycles <channel>."
|
".cycle <channel> -- Cycles <channel>."
|
||||||
notice("Attempting to cycle " + inp + "...")
|
notice("Attempting to cycle %s..." % inp)
|
||||||
conn.cmd("PART", [inp])
|
conn.part(inp)
|
||||||
conn.cmd("JOIN", [inp])
|
conn.join(inp)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def part(inp, conn=None, notice=None):
|
def part(inp, conn=None, notice=None):
|
||||||
".part <channel> -- Parts from <channel>."
|
".part <channel> -- Leaves <channel>."
|
||||||
notice("Attempting to part from " + inp + "...")
|
notice("Attempting to part from %s..." % inp)
|
||||||
conn.cmd("PART", [inp])
|
conn.part(inp)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
def nick(inp, input=None, notice=None, set_nick=None):
|
def nick(inp, input=None, notice=None, conn=None):
|
||||||
".nick <nick> -- Changes the bots nickname to <nick>."
|
".nick <nick> -- Changes the bots nickname to <nick>."
|
||||||
if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()):
|
if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()):
|
||||||
notice("Invalid username!")
|
notice("Invalid username!")
|
||||||
return
|
return
|
||||||
notice("Attempting to change nick to " + inp + ".")
|
notice("Attempting to change nick to \"%s\"..." % inp)
|
||||||
set_nick(inp)
|
conn.set_nick(inp)
|
||||||
|
|
||||||
|
|
||||||
@hook.command(adminonly=True)
|
@hook.command(adminonly=True)
|
||||||
|
|
Reference in a new issue