# 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

class SakickCommand(Command):
    def onUse(self, user, data):
        cdata = data["targetchan"]
        udata = data["targetuser"]
        reason = data["reason"]
        cdata.sendChannelMessage("KICK", udata.nickname, ":{}".format(reason), prefix=user.prefix())
        udata.leave(cdata)
    

# 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/sakick.py
from twisted.words.protocols import irc
from txircd.modbase import Command


class SakickCommand(Command):
    def onUse(self, user, data):
        cdata = data["targetchan"]
        udata = data["targetuser"]
        reason = data["reason"]
        cdata.sendChannelMessage("KICK", udata.nickname, ":{}".format(reason), prefix=user.prefix())
        udata.leave(cdata)
    

    def processParams(self, user, params):