Bug 3218 - New flag in users.ini for permanent ban
New flag in users.ini for permanent ban
Status: RESOLVED FIXED
Product: AMX Mod X
Classification: Unclassified
Component: Base Plugins
trunk
PC All
: P4 minor
Assigned To: amxmodx-bugs@alliedmods.net
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-11 16:22 PDT by Darkill
Modified: 2014-02-08 23:53 PST (History)
4 users (show)

See Also:


Attachments
new "temp ban" admin flag (21.91 KB, patch)
2013-08-15 07:32 PDT, connorr
hv.contact: review+
Details | Diff | Splinter Review

Description Darkill 2008-07-11 16:22:15 PDT
Needed a new flag acess for permanent ban in users.ini
Comment 1 connorr 2013-08-08 14:29:38 PDT
This could be a good addition. I can handle plugin changes if needed.

Few things :

> How to handle maximum time that is considered as a temporary ban ?
I suggest a cvar that would be protected.

> Should the new flag be for permanent bans or for temporary ones ?
I suggest temporary, so if administrators don't make any changes in users.ini, bans behaviors gonna stay the same.

> Which flag to use ?
Next avalaible flag is 'v'

> How should regular ban flag and temp ban flag work together ?
cmd_access seems to allow command access level to contain multiple flags
Should see how it works internally to amxx though, and how multiple flags would be reported in cmdaccess.ini

If this is not working, it would require that admins with permanent ban access have also temp ban flag, so the 2nd point could be reviewed and the new flag could handle permanent flag instead of temporary ban flags.

> What with amx_unban then ?
I see 2 possibilities :
- command is avalaible only to admins with perm ban access
- add a new flag for this command (don't think it is worth)

> 3 places to implement new ban flag :
admincmd plugin : commands amx_ban and amx_banip
plmenu plugin : menu amx_banmenu
amx_unban


Let's discuss this hardly and try command multiple flags access behavior before making any changes.
Comment 2 Vincent Herbet [:Arkshine] 2013-08-08 15:39:27 PDT
Multiflags should work. The flag value in cmdaccess.ini is converted as sum of bits, and passed as it is in the function which registers the command.

About amx_unban, there should be the possibility to remove temp ban for an admin without permanent ban access. We could imagine easily the admin has banned a wrong player and if he can't unban, it's not going to be awkward.
Comment 3 connorr 2013-08-15 07:32:31 PDT
Created attachment 3532 [details] [review]
new "temp ban" admin flag

Here a patch adding a new flag 'v' for temp ban

Admins with flag "d" ADMIN_BAN or flag "l" ADMIN_RCON have access to any bans and any unbans.
Admins with flag "v" ADMIN_BAN_TEMP (and with no flag "d" and no flag "l" have only access to temp bans (limited with cvar amx_tempban_maxtime) and can only use amx_unban on bans they have made during the current map.
For this, all bans are stored in a trie created in admincmd.amxx and exported via an xvar handling the trie index.

Making this, i've noticed that dod and tfc plmenu plugins have not been updated as  default (cstrike) and ns ones.


Temp ban flag has been prefered over perm ban flag because if admins don't change anything on their current configs, ban gonna behave the same as before.
Comment 4 Vincent Herbet [:Arkshine] 2013-08-15 09:35:58 PDT
Comment on attachment 3532 [details] [review]
new "temp ban" admin flag

Review of attachment 3532 [details] [review]:
-----------------------------------------------------------------

This looks good.
Comment 5 AM Bugzilla Bot 2013-08-24 14:49:48 PDT
Pushed changeset: http://hg.alliedmods.net/amxmodx-central/rev/09bd5339181d
Changelog:
	Add a new access level flag 'v' for temporary bans (bug 3218, r=arkshine)
Comment 6 AM Bugzilla Bot 2014-02-08 23:53:18 PST
Commit pushed to master at https://github.com/alliedmodders/amxmodx

https://github.com/alliedmodders/amxmodx/commit/784f91e441318eb6f980ad4865df17b45966d47f
Add a new access level flag 'v' for temporary bans (bug 3218, r=arkshine)


Former-commit-id: d09b92cf6c3ffa6ea82b4c4b005056e7875ee80f

Note You need to log in before you can comment on or make changes to this bug.