irc3.plugins.userlist
User list plugin¶
This plugin maintain a known user list and a channel list.
Usage:
>>> bot = IrcBot()
>>> bot.include('irc3.plugins.userlist')
>>> bot.test(':gawel!user@host JOIN #chan')
>>> print(list(bot.channels['#chan'])[0])
gawel
>>> print(list(bot.nicks.keys())[0])
gawel
>>> bot.test(':gawel!user@host MODE #chan +o gawel')
>>> print(list(bot.channels['#chan'].modes['@'])[0])
gawel
Api¶
-
class
irc3.plugins.userlist.
Channel
[source]¶ A set like object which contains nicknames that are on the channel and user modes:
>>> channel = Channel() >>> channel.add('gawel', modes='@') >>> 'gawel' in channel True >>> 'gawel' in channel.modes['@'] True >>> channel.remove('gawel') >>> 'gawel' in channel False >>> 'gawel' in channel.modes['@'] False