Raised This Month: $ Target: $400
 0% 

AMXX 1.8.3-dev-git3910 Ban bug.


Post New Thread Reply   
 
Thread Tools Display Modes
Flasher
Senior Member
Join Date: Apr 2008
Old 06-14-2014 , 18:32   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #11

PHP Code:
    register_concmd("amx_ban""cmdBan"ADMIN_BAN|ADMIN_BAN_TEMP"<name or #userid> <minutes> [reason]")

public 
cmdBan(idlevelcid)
{
    if (!
cmd_access(idlevelcid3)) // Pass when user has ADMIN_BAN|ADMIN_BAN_TEMP
        
return PLUGIN_HANDLED

    
if( ~get_user_flags(id) & ( ADMIN_BAN ADMIN_RCON ) && (nNum <= || nNum get_pcvar_num(p_amx_tempban_maxtime)) )
    {
        
// Shoundn't be here if user has ADMIN_BAN _OR_ ADMIN_RCON
        // Currently it is not pass here only if user has both ADMIN_BAN _AND_ ADMIN_RCON
        
console_print(id"%L"id"NO_ACC_COM");
        return 
PLUGIN_HANDLED
    

There is similar code in other places and in plmenu.sma.
Flasher is offline
luxor
Member
Join Date: Jan 2014
Old 06-14-2014 , 19:42   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #12

Quote:
Originally Posted by isotonic View Post
@luxor: now it's time to check access flag for temp bans and amx_tempban_maxtime cvar ;) That code is fine.

Major => bcefijnopv (i put the acces flag, but it don`t works )


amx_tempban_maxtime 60
luxor is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 06-14-2014 , 21:34   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #13

Quote:
Originally Posted by Black Rose View Post
I'm not sure what you're asking.
No they don't give the same result.
And it is the reason why original plugins do not work as they should ;)
Flasher has explained nice.
The only question I have why my 'fix' is the same as original)

Quote:
Originally Posted by Black Rose View Post
Afaik, you're supposed to have both flags to be able to access that command. Is this incorrect?
Yes, it is. ADMIN_RCON is here just in case. I think it is from ancient times and it was not carefully coded (for amx_ban you will get 'You have no access to that command' anyway).
To be able to use permanent bans you only need to have ADMIN_BAN flag, temporary ones - ADMIN_BAN_TEMP flag.
__________________

Last edited by isotonic; 06-14-2014 at 21:42.
isotonic is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 06-14-2014 , 22:58   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #14

Quote:
Originally Posted by isotonic View Post
why my 'fix' is the same as original)
It was before you edited your post.
__________________
Black Rose is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 06-15-2014 , 07:30   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #15

I just removed 2nd proposed variant. Of course both my variants were the same because they serve the same purpose.
__________________
isotonic is offline
luxor
Member
Join Date: Jan 2014
Old 06-16-2014 , 11:48   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #16

and why flag "v" don`t works ?

that is the acces : Major => bcefijnopv

cvar : amx_tempban_maxtime 60

but it don`t works .


it`s verry annoying, when was the bug with ~get_user_flags(id) & ( ADMIN_BAN | ADMIN_RCON ) it works with flag "d", but now, when i use !get_user_flags(id) & ( ADMIN_BAN | ADMIN_RCON ) it don`t works... why ?
luxor is offline
luxor
Member
Join Date: Jan 2014
Old 06-19-2014 , 20:35   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #17

problem solved..
it was my mistake, i forget to change acces on cmdacces.ini
luxor is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 06-20-2014 , 05:49   Re: AMXX 1.8.3-dev-git3910 Ban bug.
Reply With Quote #18

I told you to do so ;)
Anyway thank you for the response.
__________________
isotonic is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode