ro11 - Alliance shows in ranking after kicking

Status
Not open for further replies.
Newbie Spellweaver
Joined
Oct 12, 2005
Messages
31
Reaction score
0
Ok this is a fairly easy fix, someone just forgot the clear the ally_name aswell as ally_id, this will instantly update on the rankings now.

in file alliance.php

FIND ( around line 842 although mine is an edited version so may be diffrent for you )
Code:
doquery("UPDATE {{table}} SET `ally_id`='0' WHERE `id`='{$u['id']}'", 'users');

REPLACE WITH:
Code:
doquery("UPDATE {{table}} SET `ally_id`='0', `ally_name`='' WHERE `id`='{$u['id']}'", 'users');

any problems post here or drop me a pm :)
 
This fix the ally name in the stats but there are a major bug in the query (the original), when you leave the ally, and you have a ally_rank_id != 0 , this query dont make 0 the ally_rank_id , then if you make member of another ally who have the same number of ally_rank_id that you, you will have all the permissions of that rank.

To fix:

doquery("UPDATE {{table}} SET `ally_id`='0', `ally_name`='', `ally_rank_id` = '0' WHERE `id`='{$u['id']}'", 'users');
THere are a lot of bad querys on the ally section, check the leave ally to.
 
Yeah, Leave ally also leaves the rank and ally name in the db.
also, the amount of members in ally wich you left, doesn't change.
Conclusion: Alliance isn't properly coded.
 
Alot of this isnt correctly coded, there are a huge number of bugs and hack fixes, such is the problem with open source projects like this
 
Status
Not open for further replies.
Back