示例#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)
	sbserver.suicide(cn)
示例#2
0
	def suicide(self):
		'''Force client to commit suicide'''
		sbserver.suicide(self.cn)
示例#3
0
文件: __init__.py 项目: pguenth/xsbs
 def suicide(self):
     '''Force client to commit suicide'''
     sbserver.suicide(self.cn)