Location: PHPKode > projects > Skrupel User Game Administration > include/commands_vip.php
<?

if(eregi("^\+v",$message))
{
	#Set Vip for user
	$message=eregi_replace("^\+v ","",$message);
	$db->query("SELECT * FROM skrupel_usedcommchatusers WHERE nick='$message'");
	if($db->num_rows()>0)
	{
		$db->next_record();
		if($db->record[mode]!=2)
		{
			$db->query("UPDATE skrupel_usedcommchatusers SET mode = '1' WHERE nick = '$message'");
			$msg = "privatemessagestring $chatuser $message $svip";
		}
		else
		{
			#User is Superuser, we don't want to downgrade him ...
			$msg = "privatemessagestring $chatuser $sdownerr";
		}
	}
}
else if (eregi("^\+n",$message))
{
	#Set normal user for a user
	$message = eregi_replace("^\+n ","",$message);
	$db->query("SELECT * FROM skrupel_usedcommchatusers WHERE nick='$message'");
	if($db->num_rows()>0)
	{
		$db->next_record();
		if($db->record[mode]!=2)
		{
			$db->query("UPDATE skrupel_usedcommchatusers SET mode ='0' WHERE nick = '$message'");
			$msg = "privatemessagestring $chatuser $message $snorm";
		}
		else
		{
			#User is Superuser, we don't want to downgrade him ...
			$msg = "privatemessagestring $chatuser $sdownerr";
		}
	}
}
else
{	
	#VIP Command not found
	$msg="privatemessagestring $chatuser $scommandnothere";
}
?>
Return current item: Skrupel User Game Administration