MantisBT - Zandronum
View Issue Details
0002554Zandronum[All Projects] Suggestionpublic2015-12-21 22:302023-08-11 08:52
Fused 
 
normalfeatureN/A
closeddenied 
3.0-beta 
 
0002554: New ACS functions for server administration
getPlayerIP(PlayerNumber())
forcespecPlayer / kickPlayer(PlayerNumber(), reason)
mutePlayer(PlayerNumber(), length)
banPlayer(PlayerNumber() / IP, length, reason)

These new functions allow mods to manually punish people for doing something they are not meant to do without having to change the server itself.

These functions can be very helpful, as they can for example ban people who ragespectate in Zombie Horde much like Kpatch used to do in Grandvoid.
Right now moderators can't do anything about it unless they check it out themselves, which can be annoying or in ZH's case near impossible if they are not around.

I realise this is discouraged, but please consider adding this in in some way for developers to use. Having a feature like this can really help preventing people from rule-breaking.
No tags attached.
related to 0002593acknowledged Dusk Improvements to the RCON protocol 
related to 0004153resolved  Provide a way to apply (mild) timed bans on players through ACS 
Issue History
2015-12-21 22:30FusedNew Issue
2015-12-21 22:31StrikerMan780Note Added: 0014010
2015-12-21 22:36StrikerMan780Note Edited: 0014010bug_revision_view_page.php?bugnote_id=14010#r8341
2015-12-21 22:37StrikerMan780Note Edited: 0014010bug_revision_view_page.php?bugnote_id=14010#r8342
2015-12-21 22:39FusedNote Added: 0014011
2015-12-21 22:42StrikerMan780Note Edited: 0014010bug_revision_view_page.php?bugnote_id=14010#r8343
2015-12-21 22:47DrinkyBirdNote Added: 0014012
2015-12-21 22:55FusedNote Added: 0014013
2015-12-21 23:11FusedNote Edited: 0014013bug_revision_view_page.php?bugnote_id=14013#r8345
2015-12-21 23:13DuskNote Added: 0014014
2015-12-21 23:14DuskPriorityhigh => normal
2015-12-21 23:21LeonardNote Added: 0014015
2015-12-21 23:53ibm5155Note Added: 0014016
2015-12-23 03:07ZzZomboNote Added: 0014019
2016-01-05 13:13FusedNote Added: 0014043
2016-01-05 13:21FusedNote Edited: 0014043bug_revision_view_page.php?bugnote_id=14043#r8392
2016-01-05 13:26FusedNote Edited: 0014043bug_revision_view_page.php?bugnote_id=14043#r8393
2016-01-05 16:34Visual VincentNote Added: 0014044
2016-01-05 16:34Visual VincentNote Edited: 0014044bug_revision_view_page.php?bugnote_id=14044#r8395
2016-01-07 01:44ArcoNote Added: 0014054
2016-01-07 02:05ArcoNote Edited: 0014054bug_revision_view_page.php?bugnote_id=14054#r8404
2016-01-07 07:25CatastropheNote Added: 0014057
2016-01-07 22:40ArcoNote Added: 0014058
2016-01-08 03:05AlexMaxNote Added: 0014059
2016-01-08 10:35MonsterovichNote Added: 0014060
2016-01-08 11:15FusedNote Added: 0014061
2016-01-08 11:17FusedNote Edited: 0014061bug_revision_view_page.php?bugnote_id=14061#r8408
2016-01-08 14:15CatastropheNote Added: 0014062
2016-01-08 17:31ibm5155Note Added: 0014063
2016-01-08 17:31ibm5155Note Edited: 0014063bug_revision_view_page.php?bugnote_id=14063#r8410
2016-01-24 20:35DuskNote Added: 0014189
2016-01-24 20:35DuskStatusnew => closed
2016-01-24 20:35DuskResolutionopen => denied
2016-01-24 21:08DuskRelationship addedrelated to 0002593
2023-08-11 08:52KaminskyRelationship addedrelated to 0004153

Notes
(0014010)
StrikerMan780   
2015-12-21 22:31   
(edited on: 2015-12-21 22:42)
This could be useful with the database and login system too. (Admin mod, anyone?)

For security, this would have to be made sure that these commands won't work from NET scripts puked by people who aren't considered an admin or didn't use "send_password" for RCON first.

Also, being able to manually specify an IP should not be allowed. Otherwise people will sneak in mods that'll ban specific people on servers they don't control directly. Bans should only be allowed to be 15 minutes max. It should only allow banning by player number, where the server itself will handle the rest (IP banning, etc).

(0014011)
Fused   
2015-12-21 22:39   
Sorry, but ForceSpecplayer is already included under the name KickFromGame. Ignore that one.
(0014012)
DrinkyBird   
2015-12-21 22:47   
I don't agree with this because mod developers could sneak these in and use them to kick/ban/rtc when they shouldn't.

They could do something similar as Demy did with AOW 2.1; not include the source but have the scripts included in the compiled ACS object file. Despite Demy having RCon, it still would be possible using NET scripts and arguments.
(0014013)
Fused   
2015-12-21 22:55   
(edited on: 2015-12-21 23:11)
Then perhaps there could be a warning when something like this is included in a mod? Or perhaps include a flag to enable features like this on a server if it's supposed to be included?

(0014014)
Dusk   
2015-12-21 23:13   
I'm still leaning towards a no but let's see where we go here.

Quote
Then perhaps there could be a warning when something like this is included in a mod? Or perhaps include a flag to enable features like this on a server if it's supposed to be included?

Cannot be done because a function call cannot be detected before it happens.
(0014015)
Leonard   
2015-12-21 23:21   
It's the hoster's responsibility over what's being hosted.
Compiled ACS files can be abused in many ways already and if that's what your concern is, you should just use a trustable source for your mods or compile the acs sources yourself..
(0014016)
ibm5155   
2015-12-21 23:53   
maybe, a way to request a server admin to do some action?
like,
RequestServerActionBan(int Player, str Reason);
RequestServerActionChangeMap(str Map, str Reason);

that show a message over the server console and also to the irc hoster like:
Some server from best-ever requested to change the map, because votemaps were disabled and also the map was broken, so the console log would receive something like "#MAPCHANGEREQUEST E1M2, E1M1 is broken", the irc Channel from BE could implemente a filter for server messages starting with #MAPCHANGEREQUEST so even the admins inside the irc channel could see the request.
(0014019)
ZzZombo   
2015-12-23 03:07   
WHat
(0014043)
Fused   
2016-01-05 13:13   
(edited on: 2016-01-05 13:26)
So I created a script of my Zombie Horde idea, that could be a nice example to showcase this. It's not complete, since the NET script can be puked by players, but this should work online if these features would be added.

'http://pastebin.com/nNynA9dh [^]'

notice line 31 and 49 where this would be used.

(0014044)
Visual Vincent   
2016-01-05 16:34   
Just a little note to ibm5155:
The map can already be changed via the "ChangeLevel" method:'http://zdoom.org/wiki/ChangeLevel [^]'

(0014054)
Arco   
2016-01-07 01:44   
(edited on: 2016-01-07 02:05)
I don't necessarily think that a developer of a mod should have those features. It looks like a security vulnerability waiting to erupt.

(0014057)
Catastrophe   
2016-01-07 07:25   
How would automated moderation ever be a security vulnerability? All modern games have this in some form.
(0014058)
Arco   
2016-01-07 22:40   
Sorry, I meant to say that GetPlayerIP itself may open up a client security vulnerability, as developers could find information on clients that they shouldn't have access to through their IP. I don't really think that a mod developer should concern themselves with administrative actions such as banning people, as it's chiefly the server host's responsibility to handle.
(0014059)
AlexMax   
2016-01-08 03:05   
I am in inclined in favor of this, but only under the circumstance that these ACS functions return nothing at runtime by default unless the server administrator has specifically turned on a flag. Heck, maybe do something like make it a check against the string "Yes, I understand the risks of enabling this flag." instead of a simple true/false.

Without such a flag, count me as a strong - nay, an emphatic - rejection. It would be trivial for somebody to hide an administrative backdoor in their mod that would allow them to take control of any server the mod is running on. Simply compile the ACS source with the backdoor baked-in, then take it out of the SCRIPTS lump (or wherever you're storing the source) before you distribute it.

SourceMod gets around this issue by enforcing all scripts available on their site be distributed under the GPLv3, which requires source disclosure, and is something Zandronum cannot hope to enforce. Garry's Mod gets around this issue because Lua is distributed in source-form. There _must_ be a flag, or else you would be very foolish as a server administrator to run any mod with compiled ACS.
(0014060)
Monsterovich   
2016-01-08 10:35   
>banPlayer(PlayerNumber() / IP, length, reason)

I still remember ZH script that kicked (banned) me on every GV server, because I went to the spectators as the first zombie. Do not let modders to do that, seriously.

>kickPlayer(PlayerNumber(), reason)
The same. ^^^^

>forcespecPlayer
Already in.

>getPlayerIP(PlayerNumber())
This function can be very useful to detect players, because playerid and nickname are not the universal identifiers. Unlike ip they can be easily changed by reconnecting or renaming.
(0014061)
Fused   
2016-01-08 11:15   
(edited on: 2016-01-08 11:17)
> I still remember ZH script that kicked (banned) me on every GV server, because I went to the spectators as the first zombie. Do not let modders to do that, seriously.

Kpatch had this feature and it's the main reason I want this feature to be added. I don't really understand the reason you would not want this added though. Because now you're just implying you prefer to ruin the game for players instead of having a way to get them punished.

>getPlayerIP can be very useful to detect players, because playerid and nickname are not the universal identifiers. Unlike ip they can be easily changed by reconnecting or renaming.

That's very true. This could also work as a very nice way to get data from someone without using the login system.

All in all, I believe this could work out with AlexMax's suggestion. Perhaps there could even be a way to only enable this feature for certain scripts. That way it could only be abused if this script is replaced.

(0014062)
Catastrophe   
2016-01-08 14:15   
> I don't really think that a mod developer should concern themselves with administrative actions such as banning people, as it's chiefly the server host's responsibility to handle.

I agree - but it is also within the server host's right to allow automated moderation. I think the best compromise would be Alexmax's where the server host would have to enable a flag, lets call it sv_allowcustommoderation, to be able to register kick or ban commands from a mod such as Zombie Horde.
(0014063)
ibm5155   
2016-01-08 17:31   
you could mark the player to be banned with a cvar, so a script running clientside could check that cvar if true, execute a command that will only crash that specific player.
But I think a better solution, is a punishment script, like, if a player rq as the first zombie, force he to start only with a pistol or with 20HP for 3 - 4 rounds.

(0014189)
Dusk   
2016-01-24 20:35   
Closing after dev discussion. ACS has no place in server management. Instead, use the RCON protocol to do automated administrative tasks.

I recognize that the current state of RCON protocol makes it unreliable for automated services (at least remote ones anyway) and I hope to address this for 3.0.