Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Created June 30, 2010 15:36
Show Gist options
  • Save sarahhodne/458805 to your computer and use it in GitHub Desktop.
Save sarahhodne/458805 to your computer and use it in GitHub Desktop.
from base64 import b64decode
from pyserv import IRCd
class Unreal(IRCd):
def start(self):
self.subscribe('raw', self.raw_in)
def raw_in(self, data):
data = data.rstrip("\r\n")
if data == "": return
data_parts = data.split(" ")
command = data_parts[0].lower()
if command == 'ping':
self.raw('PONG ' + data_parts[1])
elif command == 'nick'
decoded_ip = b64decode(data_parts[10])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment