All pastes #382855 Raw Edit

Unnamed

public python v1 · immutable
·published 2007-03-05 23:20 UTC
rendered paste body
import sysimport socketimport strings = socket.socket(socket.AF_INET, socket.SOCK_STREAM)s.connect(("203.81.48.75", 20000))s.send('NICK blar\n ENTER\n')while 1:        buf = s.recv(8192)        # BOT ID        botid = buf.split('\n')        botid = botid[1]        print botid        botid = botid.strip('ID')        botid = botid.strip(' ')        #print botid        # BOUT 0 = RED BOUT 1 = BLUE        player = buf.split('\n')        player = player[0]        #player = player.split(botid)        #player = player.strip('TORIBASH')        #print player        # PING        if buf.find('JOINT')!=-1:                s.send('PING\n');        # VERSION        if buf.find('version')!=-1:                s.send('SAY I am a debug bot by veb\n')        # TEST        if buf.find('test')!=-1:                BLAH='rofl'                s.send('SAY %s\n' % BLAH)