Skip to content

Instantly share code, notes, and snippets.

@jermenkoo
Created June 24, 2012 18:02
Show Gist options
  • Save jermenkoo/2984202 to your computer and use it in GitHub Desktop.
Save jermenkoo/2984202 to your computer and use it in GitHub Desktop.
python3.x irc bot`snippet
while True:
bot_data = bot.recv(2048)
bot_data = bot_data.strip(str.encode('\r\n'))
print(bot_data)
if bot_data.find(str.encode("PING :")) != -1:
bot.send(b'PONG ' + bot_data.split()[1] + b'\r\n')
print("[*]PONG %s" % HOST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment