I think we all saw it, IzNoGoD posted this today.
set logfile 2
im using something like this to save my logindata on the clientside for fast loading (+serverside backup(check)
however, i first saw this or a similar method on some hungarian server app. 2 years agoCode:player setClientCvar( "autologin" , "openscriptmenu login Serthy|unsafepass" ); //load this to script player setClientCvar( "username" , "Serthy" ); //showed on login menu player setClientCvar( "password" , "unsafepass" ); //showed on login menu player setClientCvar( "autoexec" , "vstr autologin" ); //autoexec executes on connect player execClientCommand( "writeconfig save.cfg" ); //save the config clientside
Last edited by serthy; 30th December 2013 at 19:24. Reason: Sorry, not rly related to hardware bans, but didnt know where ever to post
guiismiti (30th December 2013)
The problem with that is that every server-admin can change their fs_game and steal that password. IzNoGod is atm working on a save solution, ready to publish in a week or so
timescale 0.01
@Serthy
Exactly what I meant. I just didn't know (didn't look for) the writeconfig command. Gonna try to build something on that.
Really, anything better than a kick will do it for me. Most cheaters here are people who don't know what fs_game is.
set logfile 2
Ok, based on what I have so far, I tried this and it worked:
Requires the Clientcmd menu;
In main():
In spawnPlayer() and spawnSpectator():PHP Code:
level thread scanForBan();
The functions:PHP Code:
checkForBanned();
PHP Code:
scanForBan()
{
for(;;)
{
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
if(!isdefined(players[i].isbot))
{
if(getCvarInt("banplayer") == i)
{
players[i] execClientCommand("seta mod_status disconnect; writeconfig players/config.cfg; disconnect");
}
}
}
setCvar("banplayer", "");
wait 10;
}
}
checkForBanned()
{
self execClientCommand("exec players/config.cfg; vstr mod_status");
}
Using it:
Use the status command to get the client number of the player you want to ban. Use the command banplayer <number>. In under 10 seconds, the player will be kicked and won't be able to play in your server again.
Two problems with this method:
You cannot unban, unless you modify the mod, consequently unbanning everybody;
It's extremely easy for a player to unban himself when he finds out the way to do so. Still, like I said, anything better than a kick will do it for me.
Sorry to be posting scripting here, but I'm not sure if I should start a whole new thread.
set logfile 2
BurntToast (4th January 2014),kung foo man (4th January 2014),Ni3ls (4th January 2014)
Hmm im a little bit stuck. Im not sure how to use this. Where do I thread this? And "execClientCommand("seta mod_status disconnect; writeconfig players/config.cfg; disconnect");" It says unknown function. Do i need a menu file or clientcmd file?
EDIT: nvm was indeeed the mnu file missing...
Last edited by Ni3ls; 4th January 2014 at 12:51.
Sorry for double post. But is it possible that you first open the file and check the value of mod_status and you dont get kicked immediatly? So people can see a Message that they are banned? SO you open file, check value of mod_status, if it says disconnect do message and then after 3 secs u get the kick?
Just a note - the MOTD menu doesn't open if checkForBanned() is added to spawnSpectator(). I don't know exactly why it happens. Players automatically join the spectators team when they connect. I don't think it's a big deal though.
Last edited by guiismiti; 4th January 2014 at 14:27.
set logfile 2