예제 #1
0
파일: cody_011.py 프로젝트: beardfist/Cody
    if data.find('PING') != -1:
        irc.send('PONG ' + data.split()[1] + '\r\n')

#AUTH and then JOIN 3 seconds later
    if data.find('Looking for GameRadius?') != -1:
        irc.send(
            'PRIVMSG [email protected] :auth cody Manner1sm \r\n'
        )
        time.sleep(3)
        irc.send('JOIN #code\r\n')
        connected = True

#Parsing console (from linux) chat data
    if (connected == True
            and ('Inveracity' in data or 'lmn' in data or 'Stoy' in data)):
        parsedMessage = dataParse(data)
        NICK = parsedMessage[0]
        HOSTNAME = parsedMessage[1]
        MSG_TYPE = parsedMessage[2]
        CHANNEL = parsedMessage[3]
        MESSAGE = parsedMessage[4]

#QUIT
    if data.find('!cody quit') != -1 or data.find(
            '!cody f**k off') != -1 or data.find(
                '!cody beat it'
            ) != -1 or data.find('!cody gtfo') != -1 and connected == True:
        bangPos = data.find('!')
        reloaderNick = data[1:bangPos]

        if (reloaderNick == 'lmn' or reloaderNick == 'Inveracity'
예제 #2
0
파일: cody_015.py 프로젝트: BEARDFIST/Cody
	
#AUTH and then JOIN 3 seconds later
	if 'Looking for GameRadius?' in data:
		irc.send ( 'PRIVMSG [email protected] :auth cody Manner1sm \r\n' )
		time.sleep(3)
		irc.send ( 'JOIN #code cosanostra\r\n' )
		connected = True
		data = ''
		startParsing = True

#Parsing console (from linux) chat data	

	if 		len(data) 		!= 0        \
	and 	startParsing	== True 	\
	and 	data[0] 		== ':'		:
		parsedMessage 			= 	dataParse(data)
		NICK 					= 	parsedMessage[0]
		HOST 					= 	parsedMessage[1]
		MSG_TYPE 				= 	parsedMessage[2]
		CHANNEL 				= 	parsedMessage[3]
		MESSAGE 				= 	parsedMessage[4]
	
#!cody QUIT
	if 		'!cody quit' 		in data 	\
	or 		'!cody f**k off' 	in data 	\
	or 		'!cody beat it' 	in data 	\
	or 		'!cody gtfo'		in data 	\
	and 	connected 			== True 	:

		if 	HOST.lower() == '*****@*****.**' 				\
		or 	HOST.lower() == '*****@*****.**' 	\