• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Prevent banned players from getting attacked - Fix

Status
Not open for further replies.
Initiate Mage
Joined
Sep 28, 2008
Messages
3
Reaction score
0
#1: Prevent Banned Players from Being Attacked
On my game, someone got banned, and while he was banned he got attacked repeatedly and went down 15 ranks. I thought that was unfair and coded this.

Open floten3.php and find this line (it probably could go in several different places, but this location worked for me.):
Code:
	$VacationMode = $HeDBRec['urlaubs_modus']
Add this after it.
Code:
	$banned = mysql_result(doquery('SELECT bana FROM {{table}} WHERE id='.$TargetPlanet['id_owner'], 'users'), 0);
	if($banned)
		message("<font color=\"red\">You may not attack a player who is banned!</font>", 'Error', 'fleet.'.$phpEx, 2);

#2: Fix Major Banning Bug in XNova 0.8 (Probably not in RageZone)
I discovered that when a player was banned, it still said they were banned even after the ban expired. This is my fix for it:
Open includes/functions/ChekUser.php and find this line:
Code:
		$user = $Result['record'];
Add this code following that line.
Code:
		if($user['bana'] == "1" && $user['banaday'] < time())
			doquery('UPDATE {{table}} SET bana=0 WHERE id='.$user['id'], 'users');
 
Elite Diviner
Loyal Member
Joined
Nov 20, 2006
Messages
462
Reaction score
1
Re: Banning Fixes

lol but attacking banned players is fuuuuun!!!
 
Status
Not open for further replies.
Back
Top