
from txircd.utils import now

class Module(object):
	def hook(self, base):
		self.ircd = base
		return self

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 onJoin(self, channel, user, params):
		return "pass"
	def checkPermission(self, user, cmd, data):
		return data
	def onMessage(self, sender, target, message):
		return ["pass"]
	def onPart(self, channel, user, reason):
		pass
	def onTopicChange(self, channel, user, topic):
		pass
	def namesListEntry(self, recipient, channel, user, representation):
		return representation
	def commandData(self, command, *args):
		pass

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 txircd.utils import now

class Module(object):
	def hook(self, base):
		self.ircd = base
		return self

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
	def namesListEntry(self, recipient, channel, user, representation):
		return representation

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()
Remove unused functions from the Mode base object
Remove unused functions from the Mode base object

  
  from txircd.utils import now
  
  class Module(object):
  	def hook(self, base):
  		self.ircd = base
  		return self
  
  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 onJoin(self, channel, user, params):
- 		return "pass"
  	def checkPermission(self, user, cmd, data):
  		return data
- 	def onMessage(self, sender, target, message):
- 		return ["pass"]
- 	def onPart(self, channel, user, reason):
- 		pass
- 	def onTopicChange(self, channel, user, topic):
- 		pass
  	def namesListEntry(self, recipient, channel, user, representation):
  		return representation
- 	def commandData(self, command, *args):
- 		pass
  
  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()
Remove unused functions from the Mode base object
## Code Before:

from txircd.utils import now

class Module(object):
	def hook(self, base):
		self.ircd = base
		return self

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 onJoin(self, channel, user, params):
		return "pass"
	def checkPermission(self, user, cmd, data):
		return data
	def onMessage(self, sender, target, message):
		return ["pass"]
	def onPart(self, channel, user, reason):
		pass
	def onTopicChange(self, channel, user, topic):
		pass
	def namesListEntry(self, recipient, channel, user, representation):
		return representation
	def commandData(self, command, *args):
		pass

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()
## Instruction:
Remove unused functions from the Mode base object
## Code After:

from txircd.utils import now

class Module(object):
	def hook(self, base):
		self.ircd = base
		return self

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
	def namesListEntry(self, recipient, channel, user, representation):
		return representation

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()