예제 #1
0
	def run_module(self, msg, sock_send, bot_info):
		self.logger.debug("Entry")
		
		if msg.find( CONST_JOIN ) != -1:
			username = (msg.split()[0]).split('!')[0][1:]
			print username
			print bot_info
			if username != bot_info['nick']:
				channel = msg.split()[2]
				if channel[:1] == ':':
					channel = channel[1:]
				msg = 'Hello ' + username + '. Welcome to the ' + channel + ' channel.'
				sock_send(irc_cmd.cmd_privmsg(channel, msg))
예제 #2
0
    def run_module(self, msg, sock_send, bot_info):
        self.logger.debug("Entry")

        if msg.find(CONST_JOIN) != -1:
            username = (msg.split()[0]).split('!')[0][1:]
            print username
            print bot_info
            if username != bot_info['nick']:
                channel = msg.split()[2]
                if channel[:1] == ':':
                    channel = channel[1:]
                msg = 'Hello ' + username + '. Welcome to the ' + channel + ' channel.'
                sock_send(irc_cmd.cmd_privmsg(channel, msg))
예제 #3
0
    def run_module(self, msg, sock_send, bot_info):

        self.logger.info("entry: repeater.run_module")

        username = (msg.split()[0]).split('!')[0][1:]
        data = ' '.join(msg.split()[3:])[1:]
        channel = msg.split()[2]
        if channel[:1] == ':':
            channel = channel[1:]

        self.logger.info(data)
        if data.find(bot_info['nick']) != -1:
            self.logger.info("nick has been found")
            data = data.replace(bot_info['nick'], username)
            sock_send(irc_cmd.cmd_privmsg(channel, data))
예제 #4
0
	def run_module(self, msg, sock_send, bot_info):
		
		self.logger.info("entry: repeater.run_module")
		
		username = (msg.split()[0]).split('!')[0][1:]
		data = ' '.join(msg.split()[3:])[1:]
		channel = msg.split()[2]
		if channel[:1] == ':':
			channel = channel[1:]
		
		self.logger.info(data)
		if data.find(bot_info['nick']) != -1:
			self.logger.info("nick has been found")
			data = data.replace(bot_info['nick'], username)
			sock_send(irc_cmd.cmd_privmsg(channel, data))
예제 #5
0
파일: help.py 프로젝트: raunaqgupta/pyirc
	def run_module(self, msg, sock_send, bot_info):
		print 'help.run_module'
		data = msg.split()[2]
		
		sock_send(irc_cmd.cmd_privmsg(channel, msg))
예제 #6
0
파일: help.py 프로젝트: raunaqgupta/pyirc
    def run_module(self, msg, sock_send, bot_info):
        print 'help.run_module'
        data = msg.split()[2]

        sock_send(irc_cmd.cmd_privmsg(channel, msg))