Effects of Ban and Blacklist?

Moderator: NADEO

Post Reply
User avatar
slugish
Posts: 129
Joined: 10 Jul 2012, 04:30
Location: United States | Kentucky | Somerset
Contact:

Effects of Ban and Blacklist?

Post by slugish » 06 Jul 2013, 23:24

This seems to be a topic of confusion. In searching through threads related to one or the other, knowledge is somewhat conflicted.
  • Bans are temporary and last only until the server is restarted. So they are stored in memory somewhere and are never written to a file. This seems strange to me, but I do understand it.
  • There is a blacklist file in the server. Does this mean that blacklisting someone writes their login to the file and it is then permanent unless removed?
  • The method, GetBlackList(), returns only the login name, so I imagine that blacklisting is based entirely on login name?
  • The method, GetBanList(), returns both the ip address and nickname of those banned. I have seen posts stating that a ban is based solely on IP and not on nickname. Is this true? Or does it prevent that login and/or that ip address from connecting?
Looking to get this cleared up for myself and anyone else that may search for info in the future.

User avatar
Xymph
Posts: 1334
Joined: 15 Jun 2010, 20:35
Contact:

Re: Effects of Ban and Blacklist?

Post by Xymph » 07 Jul 2013, 09:03

slugish wrote:This seems to be a topic of confusion. In searching through threads related to one or the other, knowledge is somewhat conflicted.

[*]Bans are temporary and last only until the server is restarted. So they are stored in memory somewhere and are never written to a file. This seems strange to me, but I do understand it.
Right.
slugish wrote: [*]There is a blacklist file in the server. Does this mean that blacklisting someone writes their login to the file and it is then permanent unless removed?
No, the BlackList needs to be followed by a SaveBlackList call to actually write the current list to the specified file. But then it is permanent if you specify that same file in <blacklist_filename> in the server's dedicated_cfg.txt, as that is loaded when the dedicated is restarted. In XAseco1/2, this is what the /admin black command does.

The same applies to AddGuest, SaveGuestList, <guestlist_filename> and /admin addguest, btw.

And in both cases, the default filenames blacklist.txt & guestlist.txt do not need to be explicitly specified in dedicated_cfg.txt, so the easiest way is to just use those filenames for SaveBlackList/SaveGuestList and leave the dedicated_cfg.txt fields empty.
slugish wrote: [*]The method, GetBlackList(), returns only the login name, so I imagine that blacklisting is based entirely on login name?
Yes.
slugish wrote: [*]The method, GetBanList(), returns both the ip address and nickname of those banned. I have seen posts stating that a ban is based solely on IP and not on nickname. Is this true? Or does it prevent that login and/or that ip address from connecting?
Only the IP, because nickname is not related to login and can be changed by players into anything, including other logins' nicks. To prevent joins on both criteria, you'd need to BlackList and Ban.

Also note that while the Ban method bans a player and kicks him/her off the server immediately, for blacklisting to have the same effect you'd need to follow the BlackList with a Kick.

Lastly, permanent banning by IP is possible with server controller code that stores IP addresses in its own file and checks them upon player joins. XAseco1/2 does this with /admin banip.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

User avatar
The_Big_Boo
Posts: 1041
Joined: 15 Jun 2010, 15:46

Re: Effects of Ban and Blacklist?

Post by The_Big_Boo » 07 Jul 2013, 11:44

Xymph wrote:No, the BlackList needs to be followed by a SaveBlackList call to actually write the current list to the specified file. But then it is permanent if you specify that same file in <blacklist_filename> in the server's dedicated_cfg.txt, as that is loaded when the dedicated is restarted.
Blacklist and guestlist can also be automatically saved by stopping the server with the QuitGame method.
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310

User avatar
slugish
Posts: 129
Joined: 10 Jul 2012, 04:30
Location: United States | Kentucky | Somerset
Contact:

Re: Effects of Ban and Blacklist?

Post by slugish » 08 Jul 2013, 20:49

Xymph wrote:
slugish wrote: [*]The method, GetBanList(), returns both the ip address and nickname of those banned. I have seen posts stating that a ban is based solely on IP and not on nickname. Is this true? Or does it prevent that login and/or that ip address from connecting?
Only the IP, because nickname is not related to login and can be changed by players into anything, including other logins' nicks. To prevent joins on both criteria, you'd need to BlackList and Ban.
Oops... I meant "login" instead of "nickname", but I get your point. I see no real reason to ban by ip. Sure, players could always purchase or acquire another game key... but I doubt many people would put forth that much effort and give up their player accomplishments just to play on my servers. I think login banning should be sufficient.

I think I am just going to go the route of handling bans entirely through the server controller. There will be no worries this way, and I won't have to backup my blacklist file when updating the server.

thx for the info guys. Hopefully this will help others along the way as well.

Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 2 guests