Pages: [1]
  Print  
Author Topic: How do you ban a user?  (Read 22820 times)
Aileras
Nub


Cakes 0
Posts: 23


« on: February 25, 2018, 06:28:08 PM »

I've tried /kick and they just come right back in. I've also tried /banUser and /banClient and nothing happens. Is there a permanent or semi-permanent ban command?

thanks
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: February 26, 2018, 03:19:39 AM »

This is something that I would be curious to know, too.

A possible way should be using the "!admin system", which is part of recent OA releases gamecode: https://github.com/OpenArena/gamecode/wiki/Admin

But considering that the "!admin system" did not exist in the original Quake 3, I suppose there may be some other way to ban people. I would be curious to know it!


About banning through the !admin system, some weeks ago I heard there are some problems with it: on the Guild Clan Discord server, a guy named "Rdnt Cntrl" said there is a bug with the !admin system:
Quote from: Rdnt Cntrl
Actually, the !ban command is broken. It fails to write the ban to the admin.dat file, so I think it only works until the map changes.
and then he posted a patch for that:
Quote from: Rdnt Cntrl
--- a/code/game/g_admin.c
+++ b/code/game/g_admin.c
@@ -2049,7 +2049,7 @@ qboolean G_admin_ban( gentity_t *ent, int skiparg )
   if( !g_admin.string[ 0 ] )
     ADMP( "^3!ban: ^7WARNING g_admin not set, not saving ban to a file\n" );
   else
-  if(strlen(g_admin_namelog[ logmatch ]->guid)==0 || strlen(g_admin_namelog[ logmatch ]->ip) )
+  if(strlen(g_admin_namelog[ logmatch ]->guid)==0 || strlen(g_admin_namelog[ logmatch ]->ip)==0 )
       ADMP( "^3!ban: ^7WARNING bot or without GUID or IP cannot write to ban file\n");
   else
     admin_writeconfig();
(NOTE: the line numbers might be slightly off because of other modifications made to that file...)
I have never used the !admin system, so at the moment I haven't tested myself if that bug acutally exists (so I can't 100% exclude he simply didn't have write permissions on admin.dat file or was using an insufficient admin level... however I find such cases unlikely)
(Also, I have the impression in that second "warning" line maybe an "or" o "-" may be missing...)

Furthermore, still on the Guild Clan Discord, I think they (probably the same "Rdnt Cntrl" guy) mentioned another bug which may affect bans: they said that GUID (client unique identifier) of a client switches from the "server-specific" one to the "generic" one after a map change/restart ("cl_guidServerUniq" 1 tells the client to use a different GUID for each server, while 0 tells the client to use the same GUID for all servers... If I understood correctly, the bug is that after a map change/restart the client switches to working like 0 even if the cvar is 1). They mentioned the fix of this bug would just be a line of code in the client engine part... but they didn't post the fix itself (if Sago or Fromhell are interested into looking into this bug, I can try to contact that Rdnt Cntrl guy to ask more infos). Also in this case, I haven't tested myself if said bug actually exists.
I can guess workarounds may include banning the guy two times (to ban both his server-specific and generic GUID), or to ban him via IP (which in theory isn't optimal, as IPs may vary and may be shared between different players... but however maybe there is some trick to also change the GUID, I'm not sure about how they are generated).
« Last Edit: February 27, 2018, 01:12:10 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
lister
Nub


Cakes 1
Posts: 15


« Reply #2 on: February 26, 2018, 11:32:20 PM »

if you are using a linux-based os and have access to either /etc or the iptables, then the easiest way to ban parties is directly by ip address:

https://askubuntu.com/questions/23163/how-to-edit-hosts-deny-and-hosts-allow

this has the additional benefit of dropping all connections, not just game-related ones, and each ban can be easily extended to a subnet, in case if the griefer keeps moving around.
Logged
Aileras
Nub


Cakes 0
Posts: 23


« Reply #3 on: February 27, 2018, 09:02:21 PM »

The server owner is using linux and the game is running on a linux server but I don't have access to those. I can only use the admin console controls. I was hoping for a console command, I guess I'm out of luck. Thanks for your answers guys. If anyone thinks of something please let me know.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #4 on: February 28, 2018, 03:32:46 AM »

The server owner is using linux and the game is running on a linux server but I don't have access to those. I can only use the admin console controls. I was hoping for a console command, I guess I'm out of luck. Thanks for your answers guys. If anyone thinks of something please let me know.
If the !admin system has been configured, then you may give it a try and tell us if you experience those bugs that Rdnt Cntrl mentioned, or not...
Anyway, even temporarily banning someone up to the first map change would already be better than just kicking him out!  Smiley
« Last Edit: February 28, 2018, 03:35:32 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
EvilDrBrain
Nub


Cakes 1
Posts: 15



« Reply #5 on: March 01, 2018, 06:45:02 PM »

I use \rcon banaddr <ip address> to ban a player's IP. To unban, I use \listbans and then \bandel <ban number>. Hope that helps.
Logged

Here to chew bubblegum and nuke base.
Aileras
Nub


Cakes 0
Posts: 23


« Reply #6 on: March 09, 2018, 05:15:30 PM »

Thank you EvilDrBrain I was hoping there was a command like this. Hopefully it works with the mod this server uses.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #7 on: March 02, 2021, 01:12:36 PM »

It looks like rdnt cntrl proposed a fix for the cl_guidServerUniq bug mentioned above.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Pages: [1]
  Print  
 
Jump to: