from irc import *
from time import *
import sys, httplib, pycurl, re, random, MultipartPostHandler, urllib2, cookielib
class basicCURL:
def __init__(self):
self.contents = ''
def body_callback(self, buf):
self.contents = self.contents + buf
class mzxbot(IRC):
seencheck = 0
seentarget = ""
seenargs = ""
leftseen = []
departures = []
yahtzee = 0
yplayers = []
dice = [0, 0, 0, 0, 0]
keep = []
pnum = 0
rolls = 0
def on_privmsg(self, nick, ident, host, target, msg):
if 'CJA' in nick:
pass
else:
if msg.startswith(('.','!')) and target[:1] == '#':
msg = msg.lstrip('.!')
if msg != "":
templist = msg.split()
command = templist[0]
args = msg.split(command + " ")
try:
args = args[1]
except:
args = ''
if command == "help":
if args == '':
self.msg(target, "Current commands are: wiki, mzxwiki, trope, help, version, whotoblame, seen, dict, foldoc, jargon, restart*, quit*, code. Prefix commands with . or ! Commands with an asterisk are privileged only.")
elif "whotoblame" in args:
self.msg(target, "Syntax: (./!)whotoblame, Purpose: Tells you who made this bot.")
elif "version" in args:
self.msg(target, "Syntax: (./!)version, Purpose: Gives the current version of the bot.")
elif "wiki" in args:
self.msg(target, "Syntax: (./!)wiki