# Path: txircd/modbase.py
# class Command(object):
#     def hook(self, base):
#         self.ircd = base
#         return self
#     def onUse(self, user, data):
#         pass
#     def processParams(self, user, params):
#         return {
#             "user": user,
#             "params": params
#         }
#     def updateActivity(self, user):
#         user.lastactivity = now()


from twisted.words.protocols import irc
from txircd.modbase import Command
        targetChanModifiers = []
        for target in params[0].split(","):
            if target in self.ircd.users:
                targetUsers.append(self.ircd.users[target])
            elif target in self.ircd.channels:
                targetChans.append(self.ircd.channels[target])
                targetChanModifiers.append("")
            elif target[0] in self.ircd.prefix_symbols and target[1:] in self.ircd.channels:
                targetChans.append(self.ircd.channels[target[1:]])
                targetChanModifiers.append(target[0])
            else:
                user.sendMessage(irc.ERR_NOSUCHNICK, target, ":No such nick/channel")
        return {
            "user": user,
            "targetchan": targetChans,
            "chanmod": targetChanModifiers,
            "targetuser": targetUsers,
            "message": params[1]
        }

class PrivMsgCommand(Command):
    def __init__(self, msgHandler):
        self.msg_handler = msgHandler
    
    def onUse(self, user, data):
        self.msg_handler.onUse("PRIVMSG", user, data)
    
    def processParams(self, user, params):
        return self.msg_handler.processParams("PRIVMSG", user, params)


# Path: txircd/modbase.py
# class Command(object):
#     def hook(self, base):
#         self.ircd = base
#         return self
#     def onUse(self, user, data):
#         pass
#     def processParams(self, user, params):
#         return {
#             "user": user,
#             "params": params
#         }
#     def updateActivity(self, user):
#         user.lastactivity = now()


# Path: txircd/modules/cmd_privmsg_notice.py
from twisted.words.protocols import irc
from txircd.modbase import Command

        targetChanModifiers = []
        for target in params[0].split(","):
            if target in self.ircd.users:
                targetUsers.append(self.ircd.users[target])
            elif target in self.ircd.channels:
                targetChans.append(self.ircd.channels[target])
                targetChanModifiers.append("")
            elif target[0] in self.ircd.prefix_symbols and target[1:] in self.ircd.channels:
                targetChans.append(self.ircd.channels[target[1:]])
                targetChanModifiers.append(target[0])
            else:
                user.sendMessage(irc.ERR_NOSUCHNICK, target, ":No such nick/channel")
        return {
            "user": user,
            "targetchan": targetChans,
            "chanmod": targetChanModifiers,
            "targetuser": targetUsers,
            "message": params[1]
        }

class PrivMsgCommand(Command):
    def __init__(self, msgHandler):
        self.msg_handler = msgHandler
    
    def onUse(self, user, data):
        self.msg_handler.onUse("PRIVMSG", user, data)
    
    def processParams(self, user, params):
        return self.msg_handler.processParams("PRIVMSG", user, params)


class NoticeCommand(Command):