# Path: txircd/utils.py
# def epoch(utc_datetime):
#     delta = utc_datetime - UNIX_EPOCH
#     return int(delta.total_seconds())
# 
# def now():
#     return datetime.datetime.utcnow().replace(microsecond=0)


from twisted.words.protocols import irc
from txircd.utils import epoch, now
from copy import deepcopy
        from txircd.server import ChannelMessage
            from txircd.server import SetMode
        from txircd.server import SetTopic
        from txircd.server import SetMetadata # This import is moved to here to alleviate issues with circular dependencies
        from txircd.server import SetMetadata
                        self.users[udata] = "".join(statusList)
                        modeDisplay.append([adding, mode, param])
                    else:
                        if mode in self.users[udata]:
                            self.users[udata] = self.users[udata].replace(mode, "")
                            modeDisplay.append([adding, mode, param])
                elif modetype == 0:
                    if not param and user:
                        self.ircd.channel_modes[modetype][mode].showParam(user, self)
                    elif adding:
                        if mode not in self.mode:
                            self.mode[mode] = []
                        if param not in self.mode[mode]:
                            self.mode[mode].append(param)
                            modeDisplay.append([adding, mode, param])
                    else:
                        if mode not in self.mode:
                            continue
                        if param in self.mode[mode]:
                            self.mode[mode].remove(param)
                            modeDisplay.append([adding, mode, param])
                            if not self.mode[mode]:
                                del self.mode[mode]
                else:
                    if adding:
                        if mode in self.mode and param == self.mode[mode]:
                            continue
                        self.mode[mode] = param
                        modeDisplay.append([adding, mode, param])
                    else:

# Path: txircd/utils.py
# def epoch(utc_datetime):
#     delta = utc_datetime - UNIX_EPOCH
#     return int(delta.total_seconds())
# 
# def now():
#     return datetime.datetime.utcnow().replace(microsecond=0)


# Path: txircd/channel.py
from twisted.words.protocols import irc
from txircd.utils import epoch, now
from copy import deepcopy
        from txircd.server import ChannelMessage
            from txircd.server import SetMode
        from txircd.server import SetTopic
        from txircd.server import SetMetadata # This import is moved to here to alleviate issues with circular dependencies
        from txircd.server import SetMetadata

                        self.users[udata] = "".join(statusList)
                        modeDisplay.append([adding, mode, param])
                    else:
                        if mode in self.users[udata]:
                            self.users[udata] = self.users[udata].replace(mode, "")
                            modeDisplay.append([adding, mode, param])
                elif modetype == 0:
                    if not param and user:
                        self.ircd.channel_modes[modetype][mode].showParam(user, self)
                    elif adding:
                        if mode not in self.mode:
                            self.mode[mode] = []
                        if param not in self.mode[mode]:
                            self.mode[mode].append(param)
                            modeDisplay.append([adding, mode, param])
                    else:
                        if mode not in self.mode:
                            continue
                        if param in self.mode[mode]:
                            self.mode[mode].remove(param)
                            modeDisplay.append([adding, mode, param])
                            if not self.mode[mode]:
                                del self.mode[mode]
                else:
                    if adding:
                        if mode in self.mode and param == self.mode[mode]:
                            continue
                        self.mode[mode] = param
                        modeDisplay.append([adding, mode, param])
                    else:

                        if mode not in self.mode: