Example #1
0
def team(caller,*args):
        """This allows players to switch teams just like with /team."""
	if(len(args)==1):
		if(caller[0]=="ingame"):
			cn=caller[1]
		else:
			raise ServerError("You are not ingame. Please specify cn.")
	elif(len(args)==2):
		cn=args[0]
	else:
		raise TypeError("team takes either 1 or 2 arguments.")
	cn=int(cn)
	
	teamname=args[-1]
	
	if cn!=caller[1]:
		UserSessionManager.checkPermissions(caller,"master")
	
	sbserver.setTeam(cn,teamname)
Example #2
0
	def setTeam(self, team):
		'''Set team client belongs to'''
		sbserver.setTeam(self.cn, team)
Example #3
0
 def setTeam(self, team):
     '''Set team client belongs to'''
     sbserver.setTeam(self.cn, team)