google-code-export / p-g-qvm

Automatically exported from code.google.com/p/p-g-qvm
Other
1 stars 0 forks source link

!flag and !unflag commands #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Modifying admin flags on a per-player basis is very useful, but difficult
in the current implementation. An admin must open the admin.dat file, by
connecting to the server with ftp/ssh/x11/rdc/vnc, finding the admin in
question, and editing their name.

A much better implementation would be to add !flag and !unflag commands.

The reason for 2 commands is that - and + might be used as flags later on.

!flag 0 # would give player in slot 0 permanent designation, or err out if
they allready have it, either via level or individual.

!unflag 0 # would remove said designation, or err out, provided they didn't
have the flag in question. If the flag was given to that admin level by
design, this would add a -# to the admin's name.

This could work similar to the !immunity command.

Both !flag and !unflag should share the same admin flag.

Original issue reported on code.google.com by Paradox460 on 30 Mar 2008 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by Paradox460 on 30 Mar 2008 at 10:16

GoogleCodeExporter commented 9 years ago
Should the wildcard '*' flag be allowed to be set with !flag?

Original comment by Rez...@gmail.com on 31 Mar 2008 at 4:14

GoogleCodeExporter commented 9 years ago
Attached patch:

* adds !flag and !unflag, admin flag 'f'
* changes bulk of the !immunity code to use the new flag helper functions
* fixes typos and such in !immunity console output

usage:
 !flag <slot#> (-)(flag)
   slot# is required, specifying no admin flag will print existing user flags.
   default is to enable the flag,
   prefix flag with '-' to disallow that flag for the user

 !unflag <slot#> (flag)
   this completely clears the flag, which is different than disallowing with !flag
and '-'.

permissions for setting flags:
  you can not change your own flags
  you can not change flags that you do not possess permission to use
  use rcon when the above restrictions apply to you

Additionally, this patch includes the fix in issue#74

Original comment by Rez...@gmail.com on 31 Mar 2008 at 7:01

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Rez...@gmail.com on 31 Mar 2008 at 7:01

GoogleCodeExporter commented 9 years ago
More info:

* '-' and '+' are already reserved by the admin flags implementation, therefor 
using
them as a modifier in !flag is not a problem. '+<flag>' is not supported as it 
is
implied when not using '-'.

* If a user flag already exists there is no warning, it is simply changed as if 
it
was never set.

* You can not change flags for admins higher than yourself :)

* current patch does not allow '*' to be changed with !flag. '*' is probably 
safe to
allow since in theory it will fail unless it is run by console (not tested 
though).

Original comment by Rez...@gmail.com on 31 Mar 2008 at 7:19

GoogleCodeExporter commented 9 years ago

Original comment by Paradox460 on 4 Apr 2008 at 1:51