Example #1
0
def login(cn, user):
	if isLoggedIn(cn):
		raise StateError('You are already logged in')
	player(cn).user = user
	player(cn).logged_in = True
	triggerServerEvent('player_logged_in', (cn,))
	sauerbomber.message(info(green(sauerbomber.playerName(cn)) + ' is verified'))
Example #2
0
def ban(cn, seconds, reason, banner_cn):
	ip = sauerbomber.playerIpLong(cn)
	expiration = time.time() + seconds
	nick = sauerbomber.playerName(cn)
	if banner_cn != -1:
		banner_ip = sauerbomber.playerIpLong(banner_cn)
		banner_nick = sauerbomber.playerName(banner_cn)
	else:
		banner_ip = 0
		banner_nick = ''
	newban = Ban(ip, expiration, reason, nick, banner_ip, banner_nick, time.time())
	session.add(newban)
	session.commit()
	addTimer(200, sauerbomber.playerKick, (cn,))
	logging.info('Player %s (%s) banned for %s by %s (%s)',
		nick,
		ipLongToString(ip),
		reason,
		banner_nick,
		ipLongToString(banner_ip))
	sauerbomber.message(info(ban_message.substitute(colordict, name=nick, seconds=seconds, reason=reason)))
Example #3
0
def changemap(cn, args):
    args = args.split(' ')
    sauerbomber.message(args[0])
    sauerbomber.message(args[1])
    sauerbomber.setMap(args[0], int(args[1]))
Example #4
0
def onRelAdmin(cn):
	sauerbomber.message(info(ratemp.substitute(colordict, name=sauerbomber.playerName(cn))))
Example #5
0
def onRelMaster(cn):
	sauerbomber.message(info(rmtemp.substitute(colordict, name=sauerbomber.playerName(cn))))
Example #6
0
def onAuthSuccess(cn, name):
	sauerbomber.message(info(authtemp.substitute(colordict, name=sauerbomber.playerName(cn), authname=name)))