WickedShell / echelon

http://echelon.bigbrotherbot.net
14 stars 7 forks source link

Editing User Level - Un-Registered #23

Open FrikFry opened 13 years ago

FrikFry commented 13 years ago

You need to make some changes to level.php to allow people to change people to un-registered, regardless of whether they add the mysql group or not.

You need to disable the empty input check on the level variable for when $level is equal to 0. I made it into this (line 24): if($level != 0) emptyInput($level, 'level');

You also need to disable the group exists check on line 47 for when level is equal to 0. I did this:

       if(!in_array($level, $b3_groups_id) && $level!=0)

I believe this fixed the issue. Do you have any issues with it?

WickedShell commented 13 years ago

Um... The latest version does accept a level 0 as a valid input (the stuff you had as line 24). The later check for the groups I had missed however (I ran echelon2 against the same bot I was testing the updated b3 groups.

I'm not sure that accepting things that are not a group is a terribly good idea, but since it starts at level 0 usually... So the second change is valid, so thanks. Something to keep in mind, is on most bots a person can just !register themselves to user, but its still needed to be able to change em/fair to expect that.

I'll check this out in a bit, I don't have access at the moment.

FrikFry commented 13 years ago

Well, all I can say is that when I was testing it with a level 0 group in B3, it wasn't accepting it as a valid level when the input was 0. The second change isn't required if you add a level 0 group to B3, but it is if you havn't made that change yet. I wasn't aware that they had cleared that as an okay thing to do.

Thanks.

WickedShell commented 13 years ago

Hm. Yeah the first change had been essentially done by a change I made in my code. The second though is needed if you don't have the updated group.

Xlr8or spat out the change required for the group, and I did some testing that indicated it was fine and stable to use, including with all the common and popular UrT plugins, and some less common ones. That said we don't want to require that change to be able to use it :)