def h_other_quit_chan(bot, id, qmsg, chan): if chan.lower() not in links: return chan = channel.capitalisation.get(chan.lower(), chan) msg = '%s: %s has quit%s' % (chan, id.nick, ': %s'%qmsg if qmsg else '.') for lchan in links[chan.lower()]: lnicks = yield channel.names(bot, lchan, include_prefix=False) if id.nick.lower() in map(str.lower, lnicks): continue bot.send_msg(lchan, msg, no_link=True)
def h_other_nick_chan(bot, id, nnick, chan): if chan.lower() not in links: return chan = channel.capitalisation.get(chan.lower(), chan) msg = '%s: %s is now known as \2%s\2.' % (chan, id.nick, nnick) for lchan in links[chan.lower()]: lnicks = yield channel.names(bot, lchan, include_prefix=False) if id.nick.lower() in map(str.lower, lnicks): continue bot.send_msg(lchan, msg, no_link=True)
def maybe_aop_chan(bot, chan, delay=False): names = yield channel.names(bot, chan, include_prefix=False) yield maybe_aop(bot, names, chan, delay=delay)