# Path: txircd/modbase.py
# class Mode(object):
#     def hook(self, base):
#         self.ircd = base
#         return self
#     def checkSet(self, user, target, param):
#         return [True, param]
#     def checkUnset(self, user, target, param):
#         return [True, param]
#     def showParam(self, user, target, param):
#         return param
#     def checkPermission(self, user, cmd, data):
#         return data


from txircd.modbase import Mode

class PrivateMode(Mode):
    def listOutput(self, user, chanlist):
        for cdata in chanlist:
            if "p" in cdata["channel"].mode and user not in cdata["channel"].users:
                cdata["name"] = "*"
                cdata["topic"] = ""
        return chanlist
    # other +p stuff is in other modules

class Spawner(object):
    def __init__(self, ircd):
        self.ircd = ircd
        self.mode_p = None
    
    def spawn(self):
        self.mode_p = PrivateMode()
        return {

# Path: txircd/modbase.py
# class Mode(object):
#     def hook(self, base):
#         self.ircd = base
#         return self
#     def checkSet(self, user, target, param):
#         return [True, param]
#     def checkUnset(self, user, target, param):
#         return [True, param]
#     def showParam(self, user, target, param):
#         return param
#     def checkPermission(self, user, cmd, data):
#         return data


# Path: txircd/modules/cmode_p.py
from txircd.modbase import Mode


class PrivateMode(Mode):
    def listOutput(self, user, chanlist):
        for cdata in chanlist:
            if "p" in cdata["channel"].mode and user not in cdata["channel"].users:
                cdata["name"] = "*"
                cdata["topic"] = ""
        return chanlist
    # other +p stuff is in other modules

class Spawner(object):
    def __init__(self, ircd):
        self.ircd = ircd
        self.mode_p = None
    
    def spawn(self):
        self.mode_p = PrivateMode()
        return {

            "modes": {