Handle client PING requests to keep the connection alive.
response = ':%s PONG :%s' % (self.server.servername, self.server.servername)
def handle_join(self, params):
if not channel.name in self.channels:
# The user isn't in the channel.
- '%s :Cannot send to channel' %
+ '%s :Cannot send to channel' % channel.name)
for client in channel.clients:
# Send message to all client in the channel, except the user himself.
# TODO: Abstract this into a seperate method so that not every function has
client doesn't linger around in any channel or the client list, in case
the client didn't properly close the connection with PART and QUIT.
- log.info('Client disconnected: %s' % (self.client_ident()))
- response = ':%s QUIT :EOF from client' % (self.client_ident())
+ log.info('Client disconnected: %s', self.client_ident())
+ response = ':%s QUIT :EOF from client' % self.client_ident()
for channel in self.channels.values():
if self in channel.clients:
# Client is gone without properly QUITing or PARTing this
- log.info('Connection finished: %s'
% (self.client_ident()) )
+ log.info('Connection finished: %s' self.client_ident())