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)
def suicide(self): '''Force client to commit suicide''' sbserver.suicide(self.cn)