ircboat.py - src - atrocities - clsr.net

(lambda rx:(lambda c,handler:((lambda d:[(lambda x:c['conn'].send('PONG :%s\r\n'%x.lstrip('PING').lstrip().lstrip(':').lstrip())if x.startswith('PING :')or x.startswith('PING:t')else handler(c,x))(''.join(s if s!='\n'else iter('').next()for s in(c['conn'].recv(1)for _ in xrange(1073741824))).strip())for i in xrange(1073741824)])({}),c)[-1])((lambda c:(c.pop('conn',None),c.setdefault('conn',__import__('socket').socket()),c['conn'].connect((c['server'],c['port'])),c['conn'].send('NICK %s\r\n'%c['nick']),c['conn'].send('USER %s %s * : %s\r\n'%(c['ident'],c['server'],c['realname'])),[c['conn'].send('%s\r\n'%s)for s in c['autosend']]if'autosend'in c and c['autosend']is not None else None,[c['conn'].send('JOIN %s\r\n'%ch)for ch in c['channels']]if c['channels']is not None else None,c)[-1])({'nick':'IRCBoat','realname':'IRCBoat','ident':'ircboat','server':'irc.example.net','port':6667,'channels':['#example']}),lambda c,l:(lambda m:([c['conn'].send('PRIVMSG %s :%s\r\n'%(m.group(4),boat))for boat in['   |\\','   | \\','   |__\\','___|_____','\\_______/']]if'BOAT'in m.group(5).upper()else None)if m else None)(rx.match(l.lstrip(':').strip()))))(__import__('re').compile('([^ !]+)!([^ @]+)@([a-z0-9._-]+) PRIVMSG ([^ :]+)[ ]*:(.*)',__import__('re').IGNORECASE))