# 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.internet.interfaces import ITLSTransport, ISSLTransport
from twisted.words.protocols import irc
from txircd.modbase import Command

# Numerics and names are taken from the IRCv3.1 STARTTLS spec
# http://ircv3.atheme.org/extensions/tls-3.1
irc.RPL_STARTTLS = "670"
irc.ERR_STARTTLS = "691"

class StartTLSCommand(Command):
    def capRequest(self, user, capability):
        return True
    
    def capAcknowledge(self, user, capability):
        return False
    
    def capRequestRemove(self, user, capability):
        return True
    

# 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/ircv3_tls.py
from twisted.internet.interfaces import ITLSTransport, ISSLTransport
from twisted.words.protocols import irc
from txircd.modbase import Command


# Numerics and names are taken from the IRCv3.1 STARTTLS spec
# http://ircv3.atheme.org/extensions/tls-3.1
irc.RPL_STARTTLS = "670"
irc.ERR_STARTTLS = "691"

class StartTLSCommand(Command):
    def capRequest(self, user, capability):
        return True
    
    def capAcknowledge(self, user, capability):
        return False
    
    def capRequestRemove(self, user, capability):
        return True
    

    def capAcknowledgeRemove(self, user, capability):