Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(46)  |  Call(46)  |  Derive(0)  |  Import(0)

src/x/s/xsbs-HEAD/src/pyscripts/xsbs/players/__init__.py   xsbs(Download)
	def message(self, msg):
		'''Send message to client'''
		sbserver.playerMessage(self.cn, msg)
	def kick(self):
		'''Disconnect client from server'''
def onAuthSuccess(cn, name):
	if currentAdmin() != None:
		sbserver.playerMessage(cn, error('Admin is present'))
		return
	sbserver.setMaster(cn)

src/x/s/xsbs-HEAD/src/pyscripts/ServerCtlCommands/ctl.py   xsbs(Download)
		raise ExtraArgumentError()
	else:
		sbserver.playerMessage(cn, yellow('NOTICE: ') + blue('Reloading server plugins.  Fasten your seatbelts...'))
		reloadPlugins()
 
		raise UsageError()
		return
	sbserver.playerMessage(cn, info('You have given master to %s') % sbserver.playerName(tcn))
	sbserver.setMaster(tcn)
 
		try:
			if isUser(player(tcn).user.id):
				sbserver.playerMessage(cn, error('%s already has user permissions.' % sbserver.playerName(tcn)))
				return
		except (ValueError, AttributeError):
				user = loggedInAs(tcn)
			except AttributeError:
				sbserver.playerMessage(cn, error('%s is not logged in.' % sbserver.playerName(tcn)))
			else:
				dbmanager.query(UserPrivilege).filter(UserPrivilege.user_id==user_id).update({ 'privilege': None })
				session.add(UserPrivilege(0, user.id))
				session.commit()
				sbserver.playerMessage(cn, info('User privilege has been given to %s (%s)' % (sbserver.playerName(tcn), user.email)))

src/x/s/xsbs-HEAD/src/pyscripts/DuelMode/duel.py   xsbs(Download)
def onDuelCommand(cn, args):
	if args == '':
		sbserver.playerMessage(cn, error('Usage: #duel <mapname> (mode) (cn) (cn)'))
	args = args.split(' ')
	players = sbserver.players()
	if len(players) != 2:
		sbserver.playerMessage(cn, error('There must be only two unspectated players to enter duel mode.'))
			mode = sbserver.gameMode()
		else:
			sbserver.playerMessage(cn, error('Usage: #duel <mapname> (mode)'))
			return
		duelers[0] = players[0]

src/x/s/xsbs-HEAD/src/pyscripts/MapRotation/maprotation.py   xsbs(Download)
	   @public'''
	if args != '':
		sbserver.playerMessage(cn, error('Usage: #nextmap'))
	else:
		try:
			sbserver.playerMessage(cn, info(nextmap_response.substitute(colordict, mapname=getSuccessor(sbserver.gameMode(), sbserver.mapName()))))
		except (KeyError, ValueError):
			sbserver.playerMessage(cn, error('Could not determine next map'))

src/x/s/xsbs-HEAD/src/pyscripts/MapVote/mapvote.py   xsbs(Download)
			p.gamevars['mapvote'] = (mapname, mapmode)
		else:
			sbserver.playerMessage(cn, error('You have already requested this map.'))
	countVotes()
 

src/x/s/xsbs-HEAD/src/pyscripts/xsbs/users/__init__.py   xsbs(Download)
		session.add(user)
		session.commit()
		sbserver.playerMessage(cn, info('Account created'))
		return
	except MultipleResultsFound:
		login(cn, user)
	else:
		sbserver.playerMessage(cn, error('Invalid login.'))
 
@commandHandler('linkname')
		session.add(nickacct)
		session.commit()
		sbserver.playerMessage(cn, info('Your name is now linked to your account.'))
		sbserver.playerMessage(cn, info('You may now login with /setmaster password'))
		return
		return
	remaining = 25-(count*5)
	sbserver.playerMessage(cn, warning('Your name is reserved. You have ' + red('%i') + ' seconds to login or be kicked.') % remaining)
	addTimer(5000, warnNickReserved, (cn, count+1, sessid))
 

src/x/s/xsbs-HEAD/src/pyscripts/SpectatorControl/playerstate.py   xsbs(Download)
	else:
		if sbserver.masterMode() > 1 and not isAtLeastMaster(cn):
			sbserver.playerMessage(cn, error('Master mode is locked.  You cannot unspectate.'))
		else:
			sbserver.unspectate(tcn)

src/x/s/xsbs-HEAD/src/pyscripts/VoteKick/votekick.py   xsbs(Download)
def onVoteKick(cn, args):
	'''@description Vote to kick a player from server
	   @usage <cn>'''
	if args == '':
		sbserver.playerMessage(cn, error('Usage #votekick <cn>'))
	else:
		try:
			tcn = int(args)
			if player(cn).votekick == tcn:
				sbserver.playerMessage(cn, error('You have already voted to kick that player.'))

src/x/s/xsbs-HEAD/src/pyscripts/NamesDb/namesdb.py   xsbs(Download)
		names = dbmanager.query(IpToNick).filter(IpToNick.ip==sbserver.playerIpLong(tcn)).all()
		if len(names) == 0:
			sbserver.playerMessage(cn, info('No names found'))
			return
	except NoResultFound:
		sbserver.playerMessage(cn, info('No names found'))
		return
	except ValueError:
		sbserver.playerMessage(cn, error('Invalid cn'))
	for name in names:
		namestr += name.nick + ' '
	sbserver.playerMessage(cn, info(namestr))
 
Base.metadata.create_all(dbmanager.engine)

src/x/s/xsbs-HEAD/src/pyscripts/xsbs/help.py   xsbs(Download)
def msgHelpText(cn, cmd):
	try:
		helpinfo = command_info[cmd]
	except KeyError:
		sbserver.playerMessage(cn, error('Command not found'))
			msgs.append(usage)
		for msg in msgs:
			sbserver.playerMessage(cn, info(msg))
 
def onHelpCommand(cn, args):
def onPlayerCommands(cn, args):
	if args != '':
		sbserver.playerMessage(cn, error('Usage: #playercommands'))
	else:
		msg = blue('Available commands: ')
		for command in command_info.keys():
			msg += '#' + command + ' '
		sbserver.playerMessage(cn, orange(msg))
		if cmd[1].public:
			str += cmd[1].command + ' '
	sbserver.playerMessage(cn, info(str))
 
def listMasterCommands(cn, args):

  1 | 2  Next