Example #1
0
def onExecute(nick, user, host, chan, matches):
    executed, errors = dcpu.execute(matches.group(1))

    if executed:
        irc.privmsg(nick, chan, executed)
    if errors:
        irc.privmsg(nick, chan, errors)
Example #2
0
def onDisassemble(nick, user, host, chan, matches):
    print "Disassembling"
    print matches.group()
    print matches.group(1)
    code = dcpu.disassemble(matches.group(1))

    if code:
        irc.privmsg(nick, chan, code)
Example #3
0
def onBin(nick, user, host, chan, matches):
    converted = 0

    if matches.group(1) == "0x":
        converted = bin(int(matches.group(2), 16))
    else:
        converted = bin(int(matches.group(2), 16))

    irc.privmsg(nick, chan, converted)
Example #4
0
def onHex(nick, user, host, chan, matches):
    converted = 0
    
    if matches.group(1) == "0b":
        converted = hex(int(matches.group(2), 2))
    else:
        converted = hex(int(matches.group(2)))

    irc.privmsg(nick, chan, converted)
Example #5
0
def onAssemble(nick, user, host, chan, matches):
    print "Assembling"
    print matches.group()
    print matches.group(1)
    binary, errors = dcpu.assemble(matches.group(1))

    if binary:
        irc.privmsg(nick, chan, ', '.join(binary))
    if errors:
        irc.privmsg(nick, chan, errors)
Example #6
0
def onDec(nick, user, host, chan, matches):
    converted = 0
    
    if matches.group(1) == "0b":
        converted = str(int(matches.group(2), 2))
    elif matches.group(1) == "0x":
        converted = str(int(matches.group(2), 16))
    else:
        converted = str(int(matches.group(2)))

    irc.privmsg(nick, chan, converted)
Example #7
0
def onReload(nick, user, host, chan, matches):
    if(host == "unaffiliated/thatotherpersony"):
        subprocess.call(["git", "pull", "origin", "master"]);
        irc.privmsg(nick, chan, "Pulled latest changes from GitHub. Restarting.")
        exit()
    elif(host == "unaffiliated/quu"):
        irc.privmsg(nick, chan, "wat. Quu. derp.\nReally?\nInitializing spambot mode. >:D")
    else:
        irc.privmsg(nick, chan, "No. I don't wanna!")
Example #8
0
    #---
    #INSET BOT COMMANDS IN HERE
    #---
    try:
        pass
    except:
        pass
    if irc_type == 'privmsg' and ':.q ' in data[1][3][:4]:
        tmp = data[1][3].split(' ', 3)
        z = 0
        for line in tmp:
            tmp[z] = tmp[z].lower()
            z += 1
        print tmp
        if tmp[1] == 'add':
            if len(tmp) == 4:
                network.send(
                    irc.privmsg(data[1][2], database.add_quote(tmp[2],
                                                               tmp[3])))
        elif tmp[1] != 'add' or tmp[1] != '':
            if len(tmp) == 2:
                tmp.append('')
            if len(tmp) == 3:
                network.send(
                    irc.privmsg(data[1][2], database.get_quote(tmp[1],
                                                               tmp[2])))
    #---
    #END OF BOT COMMANDS
    #---
    print data
Example #9
0
def onStinks(nick, user, host, chan, matches):
    messages = ["So do you!!!", "Shut up.", "You smell even worse.", "You really shouldn't be talking."]
    irc.privmsg(nick, chan, choice(messages))
Example #10
0
def onSup(nick, user, host, chan, matches):
    irc.privmsg(nick, chan, "I'm fine. How about you?")
Example #11
0
def onHello(nick, user, host, chan, matches):
    irc.privmsg(nick, chan, "Howdy!")
Example #12
0
def onRudeness(nick, user, host, chan, matches):
    irc.privmsg(nick, chan, "Why don't you?")
Example #13
0
def onTest(nick, user, host, chan, matches):
    irc.privmsg(nick, chan, "lolololol wat derp. ping Quu! ping mrout! Why not!")