Пример #1
0
def who_handler(irc, sender, params):
	if params[2] == '20':
		user = params[3]
		host = params[4]
		nick = params[5]
		auth = params[6]

		if nick not in irc.users:
			irc.users[nick] = ircuser(nick)

		irc.users[nick].user = user
		irc.users[nick].host = host
		irc.users[nick].auth = auth

		if auth is not '0':
			irc.notice(nick, 'You are authed as %s' % auth)
		else:
			irc.notice(nick, 'You are not authed')

	else:
		user = params[2]
		host = params[3]
		nick = params[4]
		auth = params[5]

		if nick not in irc.users:
			irc.users[nick] = ircuser(nick)

		irc.users[nick].user = user
		irc.users[nick].host = host
		irc.users[nick].auth = auth
Пример #2
0
def join_handler(irc, sender, params):
	if sender['nick'] not in irc.users:
		irc.users[sender['nick']] = ircuser(sender['nick'])

	irc.users[sender['nick']].chan.add(params[1])

	if sender['nick'] != irc.config.nick:
		irc.send("WHO " + sender['nick'] + " n%nuha")
Пример #3
0
def names_handler(irc, sender, params):
	chan = params[3]
	users = params[4].replace('@', '').replace('+', '').split(' ')

	for user in users:
		if user not in irc.users:
			irc.users[user] = ircuser(user)

		irc.users[user].chan.add(chan)

	irc.send("WHO " + chan + " n%nuha")