# Path: txircd/modbase.py
# class Module(object):
#     def hook(self, base):
#         self.ircd = base
#         return self


from txircd.modbase import Module

class DCCBlock(Module):
    def blockDCC(self, user, command, data):
        if command != "PRIVMSG":
            return data
        if "message" not in data or not data["message"]:
            return data

# Path: txircd/modbase.py
# class Module(object):
#     def hook(self, base):
#         self.ircd = base
#         return self


# Path: txircd/modules/dccblock.py
from txircd.modbase import Module


class DCCBlock(Module):
    def blockDCC(self, user, command, data):
        if command != "PRIVMSG":
            return data
        if "message" not in data or not data["message"]:
            return data

        words = data["message"].split(" ")