Example #1
0
    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)
Example #2
0
	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)
Example #3
0
	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)
Example #4
0
    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)
Example #5
0
	def on_topic(self, c, e):
		logger.log_event(self.server, e)
Example #6
0
	def on_quit(self, c, e):
		logger.log_event(self.server, e)
Example #7
0
	def on_nick(self, c, e):
		logger.log_event(self.server, e)
Example #8
0
 def on_quit(self, c, e):
     logger.log_event(self.server, e)
Example #9
0
	def on_pubnotice(self, c, e):
		logger.log_event(self.server, e)
Example #10
0
	def on_pubmsg(self, c, e):
		logger.log_event(self.server, e)
		channel = e.target
		user = e.source
		message = e.arguments[0]
Example #11
0
	def on_kick(self, c, e):
		logger.log_event(self.server, e)
		time.sleep(self.reconnect)
		self.join(e.target)
Example #12
0
 def on_privmsg(self, c, e):
     logger.log_event(self.server, e)
     user = e.source
     msg = e.arguments[0]
Example #13
0
 def on_kick(self, c, e):
     logger.log_event(self.server, e)
     time.sleep(self.reconnect)
     self.join(e.target)
Example #14
0
 def on_part(self, c, e):
     logger.log_event(self.server, e)
Example #15
0
 def on_pubmsg(self, c, e):
     logger.log_event(self.server, e)
     channel = e.target
     user = e.source
     message = e.arguments[0]
Example #16
0
 def on_mode(self, c, e):
     logger.log_event(self.server, e)
Example #17
0
 def on_topic(self, c, e):
     logger.log_event(self.server, e)
Example #18
0
 def on_nick(self, c, e):
     logger.log_event(self.server, e)
Example #19
0
	def on_mode(self, c, e):
		logger.log_event(self.server, e)
Example #20
0
 def on_action(self, c, e):
     logger.log_event(self.server, e)
Example #21
0
 def on_join(self, c, e):
     logger.log_event(self.server, e)
Example #22
0
	def on_join(self, c, e):
		logger.log_event(self.server, e)
Example #23
0
	def on_privmsg(self, c, e):
		logger.log_event(self.server, e)
		user = e.source
		msg = e.arguments[0]
Example #24
0
	def on_part(self, c, e):
		logger.log_event(self.server, e)
Example #25
0
	def on_action(self, c, e):
		logger.log_event(self.server, e)
Example #26
0
 def on_pubnotice(self, c, e):
     logger.log_event(self.server, e)