def on_welcome(self, c, e): logger.log_event(self.server, e) if self.password: self._identify() for channel in self.chans: self.join(channel)
def say(self, channel, message): if isinstance(message, str): message = message.decode('utf-8', errors='replace') message = re.sub(r'\n', ' | ', message) source = NickMask('%s!%s@%s' % (self.nick, self.nick, self.nick)) target = channel arguments = [message] if target.startswith('#'): type = 'pubmsg' else: type = 'privmsg' e = Event(type, source, target, arguments) self.connection.privmsg(channel, message) logger.log_event(self.server, e)
def on_topic(self, c, e): logger.log_event(self.server, e)
def on_quit(self, c, e): logger.log_event(self.server, e)
def on_nick(self, c, e): logger.log_event(self.server, e)
def on_pubnotice(self, c, e): logger.log_event(self.server, e)
def on_pubmsg(self, c, e): logger.log_event(self.server, e) channel = e.target user = e.source message = e.arguments[0]
def on_kick(self, c, e): logger.log_event(self.server, e) time.sleep(self.reconnect) self.join(e.target)
def on_privmsg(self, c, e): logger.log_event(self.server, e) user = e.source msg = e.arguments[0]
def on_part(self, c, e): logger.log_event(self.server, e)
def on_mode(self, c, e): logger.log_event(self.server, e)
def on_action(self, c, e): logger.log_event(self.server, e)
def on_join(self, c, e): logger.log_event(self.server, e)