Commit 1ad64ce5 authored by elfangor's avatar elfangor Committed by Romain Bignon

first commit "find game"

parent d935a5eb
......@@ -36,12 +36,20 @@ from random import choice
from optparse import OptionParser
class Logger(list):
score = list() #TODO
def log_message(self, nickname):
self.append(('%H:%M:%S'), nickname))
class Channel(object):
def __init__(self, server, name):
self.server = server = name
self.members = set()
self.topic = ""
self.logger = Logger()
def add_member(self, client):
......@@ -171,6 +179,7 @@ class Client(object):
def message_channel(self, channel, command, message, include_self=False):
line = ":%s %s %s" % (channel.anon_prefix, command, message)
for client in channel.members:
if client != self or include_self:
......@@ -437,6 +446,23 @@ class Client(object):
self.reply("401 %s %s :No such nick"
% (self.nickname, args[0]))
def on_kick(self, args):
if len(args) < 2:
channelname = args[0]
timestamp = args[1]
nickname = args[2]
channel = self.channels.get(irc_lower(channelname))
if not channel:
self.reply("442 %s :You're not on that channel" % channelname)
if (timestamp, nickname) in channel.logger:
self.message_channel(channel, "PRIVMSG", "%s :%s has found %s" % (, self.nickname, nickname), True)
class Server(object):
def __init__(self, options):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment