csbot.plugins.whois module

class csbot.plugins.whois.Whois(bot)[source]

Bases: csbot.plugin.Plugin

Associate data with a user and a channel. Users can update their own data, and it persists over nick changes.

PLUGIN_DEPENDS = ['usertrack']
whoisdb

Descriptor for plugin attributes that get (and cache) a value from another plugin.

See Plugin.use().

whois_lookup(nick, channel, db=None)[source]

Performs a whois lookup for a nick

whois_set(nick, whois_str, channel=None, db=None)[source]
whois_unset(nick, channel=None, db=None)[source]
whois(e)[source]

Look up a user by nick, and return what data they have set for themselves (or an error message if there is no data)

setdefault(e)[source]
set(e)[source]

Allow a user to associate data with themselves for this channel.

unset(e)[source]
unsetdefault(e)[source]
identify_user(nick, channel=None)[source]

Identify a user: by account if authed, if not, by nick. Produces a dict suitable for throwing at mongo.