Odamex Message Boards

Community Discussion => Devoblog => Topic started by: Nes on May 01, 2008, 09:18:23

Title: Bans and Exceptions
Post by: Nes on May 01, 2008, 09:18:23
Revision 634 (http://cia.vc/stats/project/odamex/.message/bfa58) brought some extra functionality for Odamex server operators: a working ban list and exception list. As of this revision, though, it will not write the ban and exception lists to any file, meaning that you'd have to either input them all yourself or use the "+exec" function and write the banlist separately into a file.

The new commands for servers are:
- "addban (ip) (reason)" - Adds to ban list.
- "delban (ip)" - Deletes from ban list.
- "banlist" - Displays the ban list.
- "clearbans" - Deletes all from the ban list.
- "addexception (ip) (reason)" - Adds to exception list.
- "delexception (ip)" - Deletes from exception list.
- "exceptionlist" - Displays the exception list.
- "clearexceptions" - Deletes all from the exception list.
- "kickban (client id found using the "who" command) (reason)" - Enhanced version of the "kick" command, adding an "addban" to the end of it. (added r642 (http://cia.vc/stats/project/odamex/.message/c0304))

Some information about bans and exceptions:
- Adding a person to the ban list will not disconnect them immediately. Use the "kick (client id found using the "who" command) (reason)" command to kick them. Otherwise, as of revision 642 (http://cia.vc/stats/project/odamex/.message/c0304), use the "kickban" command.
- The "(reason)" part is entirely optional. If you choose not to give a reason, it will be "none given".
- Wildcards can be used in the add and delete commands (though using them in the delete commands will not wildcard-delete all entries (for example, putting 127.*.*.* will not delete 127.0.0.1)).
- The exception list is essentially a whitelist. The exception list overrides the ban list. (Perfect for those caught in wildcard bans)
- You can choose not to put in the entire IP, the last given part will be repeated. (example: "addban 0" will add an entry for 0.0.0.0) This can be combined with the wildcard and exception list to make a "whitelist-required" server.

And most importantly, we (the Odamex staff) will not produce or require a "global ban/exception list" for all servers in our master list. All bans and exceptions are completely at the server level. (Though, servers can cooperate with each other and make their own "global ban/exception list". We are not responsible for this list.)
Title: Re: Bans and Exceptions
Post by: Ant P. on May 01, 2008, 13:06:23
And most importantly, we (the Odamex staff) will not produce or require a "global ban/exception list" for all servers in our master list.
Good call.

So if I read all of that right, I can do "addban *" to have a whitelist?
Title: Re: Bans and Exceptions
Post by: Hekksy on May 01, 2008, 16:29:34
I don't really understand how you make one. How do I make a banlist/whitelist from the cfg?

banfile /home/usr/odamex/banlist.txt
whitelist /home/usr/odamex/whitelist.txt

Will this work?
Title: Re: Bans and Exceptions
Post by: Ant P. on May 01, 2008, 19:51:30
Put a bunch of addban commands in a file and -exec it on startup.
Title: Re: Bans and Exceptions
Post by: Nes on May 01, 2008, 22:51:42
So if I read all of that right, I can do "addban *" to have a whitelist?

To have a whitelist-only server, yes. People can only get in by requesting an exception. This is great for having both a "private" and unpassworded server that you want to remain visible in the launchers.
Title: Re: Bans and Exceptions
Post by: GhostlyDeath on May 02, 2008, 13:42:33
"Wildcards can be used in the add and delete commands (though using them in the delete commands will not wildcard-delete all entries (for example, putting 127.*.*.* will not delete 127.0.0.1))."

aw
Title: Re: Bans and Exceptions
Post by: Ant P. on May 02, 2008, 23:14:26
Something I was thinking about earlier:

Could this be extended with an option so that anyone can spectate, but only allowed players can join the game?
It'd make it possible to have spectators in tournament games without the risk of interference from accidental joins or whatever.