From 4c1ec8853673015e3699aafcb68ca41e70c2163a Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Tue, 13 Mar 2012 10:18:51 +1300 Subject: [PATCH] Fixed bug --- plugins/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/admin.py b/plugins/admin.py index 63a474c..1bed513 100755 --- a/plugins/admin.py +++ b/plugins/admin.py @@ -4,6 +4,7 @@ import os import sys import subprocess import time +import re @hook.command("owners", autohelp=False) @@ -69,6 +70,9 @@ def part(inp, input=None, notice=None): @hook.command(adminonly=True) def nick(inp, input=None, notice=None, set_nick=None): ".nick -- Changes the bots nickname to ." + if not re.match("^[A-Za-z0-9_|.-\]\[]*$", inp.lower()): + notice("Invalid username!") + return notice("Changing nick to " + inp + ".") set_nick(inp)