google-code-export / p-g-qvm

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

New warnings system #176

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
attached is the patch of something i brought up in another issue

it doesn't take out g_adminsprintf it is still in there and should stay for
general admin warnings.

g_warningsprintf is the new one all the bans have been transferred to this
command.

syntax is 
g_warningsprintf( 'b', "banned player x");
where b is the flag and banned player x is the message.
this will show 
(WARNING): banned player x
feel free to change the colors etc ATM the brackets are purple and the
warning is yellow

this in the long run should come in handy and i am sure you can see the
benefit of this keeping information to admins who can do something about it
(like ban warnings for admins with !ban etc)

2 minutes to code and a 2 min test period so you might want to test it a
little longer but it works well.
LOGS:
[20:59][8:45]]/!map atcs
`~=-----------------=~`
 MAP: atcs 
`~=-----------------=~`
[20:59][0:10]!map: map 'atcs' started by *UG:/Slacker 
[20:59][0:10]*UG:/Slacker entered the game
[20:59][0:11]developer entered the game
[21:00][0:32]]!ban dev
[21:00][0:32]!ban: using default ban length of 2 days
[21:00][0:32]developer has been banned by *UG:/Slacker duration: 2.0 days,
reason: banned by admin
[21:00][0:32][S] *UG:/Slacker: !ban dev
[21:00][0:41][WARNING] Banned player developer (developer) tried to connect
(ban #1 by UG://Slacker expires 1.9 days reason: banned by admin )
[21:00][0:51][WARNING] Banned player developer (developer) tried to connect
(ban #1 by UG://Slacker expires 1.9 days reason: banned by admin )
[21:00][0:57]]/rcon !flag 7 -b
[21:00][0:57]broadcast: print "!flag: *UG:/Slacker was denied admin flag
'b' by console\n"
[21:00][0:57]!flag: *UG:/Slacker was denied admin flag 'b' by console
[21:01][1:25]]/rcon !flag 7 b
[21:01][1:25]broadcast: print "!flag: *UG:/Slacker was given admin flag 'b'
by console\n"
[21:01][1:25]!flag: *UG:/Slacker was given admin flag 'b' by console
[21:01][1:27][WARNING] Banned player developer (developer) tried to connect
(ban #1 by UG://Slacker expires 1.9 days reason: banned by admin )
[21:01][1:38]]!unban 1
[21:01][1:38]!unban: ban #1 for developer has been removed by *UG:/Slacker
[21:01][1:38][S] *UG:/Slacker: !unban 1
[21:01][1:39]developer connected
[21:01][1:39]8  (*9911C5F9) 127.0.0.1       'developer'
!namelog: 1 recent clients found
[21:01][1:44]developer entered the game

is that normal for that broadcast print when changing flags that's the only
issue i see. but i didn't try flag with an untampered qvm also with rcon (i
dont think its from me - doubt many ppl use flag with rcon)

Original issue reported on code.google.com by SlackerL...@gmail.com on 31 Aug 2008 at 11:08

Attachments:

GoogleCodeExporter commented 9 years ago
I dont exactly understand what this does.

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

GoogleCodeExporter commented 9 years ago
all it does is show the messages to whoever has the flag you program the code 
for

say you make a new command and use R as a flag

then all warnings and messages about that can be just for that flag

g_warningsprintf( 'R', "Warning message");

then only people with that R flag get the warning it essentially hides the 
warnings
for people w/out that command

Original comment by SlackerL...@gmail.com on 4 Sep 2008 at 3:57

GoogleCodeExporter commented 9 years ago
That is brilliant.

Original comment by Paradox460 on 5 Sep 2008 at 11:19