Fixed bug
This commit is contained in:
parent
ae861d07c9
commit
4c1ec88536
|
@ -4,6 +4,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
@hook.command("owners", autohelp=False)
|
@hook.command("owners", autohelp=False)
|
||||||
|
@ -69,6 +70,9 @@ def part(inp, input=None, notice=None):
|
||||||
@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, set_nick=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()):
|
||||||
|
notice("Invalid username!")
|
||||||
|
return
|
||||||
notice("Changing nick to " + inp + ".")
|
notice("Changing nick to " + inp + ".")
|
||||||
set_nick(inp)
|
set_nick(inp)
|
||||||
|
|
||||||
|
|
Reference in a new issue