# Path: core/moduletemplate.py
# class BotModule:
#     PRIV_NONE = "none"
#     PRIV_MOD = "mod"
#     PRIV_MODERATOR = "mod"
#     PRIV_ADMIN = "admin"
#     PRIV_ADMINISTRATOR = "admin"
#     def __init__(self, conn, logger, module_name):
#     def on_module_load(self):
#     def on_module_unload(self):
#     def on_connect(self):
#     def on_disconnect(self):
#     def on_privmsg(self, target, nick, message):
#     def on_action(self, target, nick, action):
#     def on_join(self, nick, channel):
#     def on_part(self, nick, channel, message):
#     def on_self_join(self, channel):
#     def on_self_part(self, channel):
#     def on_kick(self, nick, channel, knick, reason):
#     def on_quit(self, nick, message):
#     def on_command(self, target, nick, command, commandtext, mod, admin):
#     def on_numeric(self, numeric, data):
#     def message(self, target, nick, message, parse=False):
#     def notice(self, nick, message, parse=False):
#     def action(self, target, action, parse=False):
#     def mode(self, target, modes):
#     def ban(self, nick, channel, quiet=False):
#     def getMask(self, nick):
#     def send_raw(self, raw_message):
#     def debug(self, message, format=False):
#     def log(self, message):
#     def log_verbose(self, message):
#     def warning(self, message):
#     def notice_verbose(self, message):
#     def warning_verbose(self, message):
#     def error(self, message):
#     def isOp(self, nick, channel):
#     def isVoice(self, nick, channel):
#     def isOn(self, nick, channel):
#     def isIdentified(self, nick):
#     def isOper(self, nick):
#     def getUserData(self, nick):
#     def getChannelData(self, channel):
#     def isBotAdministrator(self, nick):
#     def isBotModerator(self, nick):
#     def ratelimit(self, command, confName="rate_limit_delay", delay=10):
#     def register_command(self, command, params, help, priv, aliases=None):
#     def unregister_command(self, command):
#     def getConfigMetadata(self, metadata):
#     def requireApiKey(self, api_name):
#     def _getApiKey(self, api_name):
#     def _unregister_commands(self):
#     def _getModuleData(self):
# 
# Path: tools/paste.py
# class Paste:
#     def gist(description, content, filename="ircgist.txt", public=False, logger=None):
#     def gist_multifile(description, files, public=False, logger=None):


from core import moduletemplate
from tools import paste
import pprint
WhoDebug by Zarthus
Licensed under MIT

This module will allow you to debug send_chanwho() and send_who() data.
"""



class WhoDebug(moduletemplate.BotModule):

    def on_module_load(self):
        self.register_command("userdata", "<nick>", "Gist all data we have regarding WHO on nick.", self.PRIV_ADMIN)
        self.register_command("channeldata", "<channel>", "Gist all data we have regarding WHO on channels.",
                              self.PRIV_ADMIN)
        self.register_command("isadmin", "<nick>", "Is <nick> a bot administrator?", self.PRIV_ADMIN)
        self.register_command("ismod", "<nick>", "Is <nick> a bot moderator?", self.PRIV_ADMIN)
        self.register_command("isop", "<nick> <chan>", "Is <nick> an op on <chan>", self.PRIV_ADMIN)
        self.register_command("isvoice", "<nick> <chan>", "Is <nick> a voice on <chan>", self.PRIV_ADMIN)
        self.register_command("ison", "<nick> <chan>", "Is <nick> on <chan>", self.PRIV_ADMIN)
        self.register_command("isidentified", "<nick>", "Is <nick> identified to his account?", self.PRIV_ADMIN)
        self.register_command("isoper", "<nick>", "Is <nick> an operator of the network?", self.PRIV_ADMIN)

    def on_command(self, target, nick, command, commandtext, mod, admin):
        if admin:
            if command == "channeldata":
                if not commandtext:
                    return self.notice(nick, "Usage: channeldata <channel>")

                data = pprint.pformat(self.getChannelData(commandtext))


# Path: core/moduletemplate.py
# class BotModule:
#     PRIV_NONE = "none"
#     PRIV_MOD = "mod"
#     PRIV_MODERATOR = "mod"
#     PRIV_ADMIN = "admin"
#     PRIV_ADMINISTRATOR = "admin"
#     def __init__(self, conn, logger, module_name):
#     def on_module_load(self):
#     def on_module_unload(self):
#     def on_connect(self):
#     def on_disconnect(self):
#     def on_privmsg(self, target, nick, message):
#     def on_action(self, target, nick, action):
#     def on_join(self, nick, channel):
#     def on_part(self, nick, channel, message):
#     def on_self_join(self, channel):
#     def on_self_part(self, channel):
#     def on_kick(self, nick, channel, knick, reason):
#     def on_quit(self, nick, message):
#     def on_command(self, target, nick, command, commandtext, mod, admin):
#     def on_numeric(self, numeric, data):
#     def message(self, target, nick, message, parse=False):
#     def notice(self, nick, message, parse=False):
#     def action(self, target, action, parse=False):
#     def mode(self, target, modes):
#     def ban(self, nick, channel, quiet=False):
#     def getMask(self, nick):
#     def send_raw(self, raw_message):
#     def debug(self, message, format=False):
#     def log(self, message):
#     def log_verbose(self, message):
#     def warning(self, message):
#     def notice_verbose(self, message):
#     def warning_verbose(self, message):
#     def error(self, message):
#     def isOp(self, nick, channel):
#     def isVoice(self, nick, channel):
#     def isOn(self, nick, channel):
#     def isIdentified(self, nick):
#     def isOper(self, nick):
#     def getUserData(self, nick):
#     def getChannelData(self, channel):
#     def isBotAdministrator(self, nick):
#     def isBotModerator(self, nick):
#     def ratelimit(self, command, confName="rate_limit_delay", delay=10):
#     def register_command(self, command, params, help, priv, aliases=None):
#     def unregister_command(self, command):
#     def getConfigMetadata(self, metadata):
#     def requireApiKey(self, api_name):
#     def _getApiKey(self, api_name):
#     def _unregister_commands(self):
#     def _getModuleData(self):
# 
# Path: tools/paste.py
# class Paste:
#     def gist(description, content, filename="ircgist.txt", public=False, logger=None):
#     def gist_multifile(description, files, public=False, logger=None):


# Path: modules_disabled/debug_who.py
from core import moduletemplate
from tools import paste
import pprint

WhoDebug by Zarthus
Licensed under MIT

This module will allow you to debug send_chanwho() and send_who() data.
"""



class WhoDebug(moduletemplate.BotModule):

    def on_module_load(self):
        self.register_command("userdata", "<nick>", "Gist all data we have regarding WHO on nick.", self.PRIV_ADMIN)
        self.register_command("channeldata", "<channel>", "Gist all data we have regarding WHO on channels.",
                              self.PRIV_ADMIN)
        self.register_command("isadmin", "<nick>", "Is <nick> a bot administrator?", self.PRIV_ADMIN)
        self.register_command("ismod", "<nick>", "Is <nick> a bot moderator?", self.PRIV_ADMIN)
        self.register_command("isop", "<nick> <chan>", "Is <nick> an op on <chan>", self.PRIV_ADMIN)
        self.register_command("isvoice", "<nick> <chan>", "Is <nick> a voice on <chan>", self.PRIV_ADMIN)
        self.register_command("ison", "<nick> <chan>", "Is <nick> on <chan>", self.PRIV_ADMIN)
        self.register_command("isidentified", "<nick>", "Is <nick> identified to his account?", self.PRIV_ADMIN)
        self.register_command("isoper", "<nick>", "Is <nick> an operator of the network?", self.PRIV_ADMIN)

    def on_command(self, target, nick, command, commandtext, mod, admin):
        if admin:
            if command == "channeldata":
                if not commandtext:
                    return self.notice(nick, "Usage: channeldata <channel>")

                data = pprint.pformat(self.getChannelData(commandtext))


                return self.notice(nick, paste.Paste.gist("Channel Data of {}".format(commandtext),