@@ -0,0 +1,969 @@
+import sys%0Afrom .. import irc%0A%0A# Check for NickServ authentication.%0Adef is_identified (user):%0A    irc.msg(%22NickServ%22, %22STATUS %7B%7D%22.format(user))%0A    NickServ = False%0A    %0A    while not NickServ:%0A        irclist = %5B x for x in irc.ircsock.recv(2048).split('%5Cr%5Cn') if x %5D%0A        for msg in irclist:%0A            if msg.startswith(%22:NickServ%22):%0A                NickServ = msg%0A            else:%0A                read(msg)%0A    %0A    if %22STATUS %7B%7D 3%22.format(user) in NickServ:%0A        return True%0A    else:%0A        return False%0A%0A# Check if a value is an integer.%0Adef is_number (num):%0A    try:%0A        int(num)%0A        return True%0A    except ValueError:%0A        return False%0A%0A# We want to get rid of certain characters.%0Adef trim (str):%0A    if %22%5Cx03%22 in str:%0A        str = str.split(%22%5Cx03%22)%5B0%5D%0A    if %22%5Cx02%22 in str:%0A        str = str.split(%22%5Cx02%22)%5B0%5D%0A    if %22%5Cx1d%22 in str:%0A        str = str.split(%22%5Cx1d%22)%5B0%5D%0A    if %22%5Cx0f%22 in str:%0A        str = str.split(%22%5Cx0f%22)%5B0%5D%0A    return str%0A

Create tools.py