• Lobby Server & Hiding a gamemode from the server list
    45 replies, posted
[QUOTE=xaviergmail;50046893]Just don't trust the clients. Protecting a "socket" isn't wizardry either. If you want to store logins temporarily in a database (which is more reliable than a lobby<->server socket), hook [url=http://wiki.garrysmod.com/page/gameevent/Listen#/Example_2]player_connect[/url], make your datbase query and then run the kickid console command to boot unauthorized players. It's as simple as that. You don't have to worry about async with CheckPassword. You don't need to hash Steam IDs either. Some people replying to this thread have a lack of gray matter. Also, the password convar is archived and will still be passed to CheckPassword, so don't check for an empty password. Just do as I said above and you'll have no issues.[/QUOTE] thats how I originally wanted to do, just asked if there are better ways I could use later on.
[QUOTE=xaviergmail;50046893]Just don't trust the clients. Protecting a "socket" isn't wizardry either. If you want to store logins temporarily in a database (which is more reliable than a lobby<->server socket), hook [url=http://wiki.garrysmod.com/page/gameevent/Listen#/Example_2]player_connect[/url], make your datbase query and then run the kickid console command to boot unauthorized players. It's as simple as that. You don't have to worry about async with CheckPassword. You don't need to hash Steam IDs either. Some people replying to this thread have a lack of gray matter. Also, the password convar is archived and will still be passed to CheckPassword, so don't check for an empty password. Just do as I said above and you'll have no issues.[/QUOTE] You don't have to worry about async anywhere, what's the difference between these 2 if you're going to kick them the same way? [lua] hook.Add("CheckPassword", "CheckUser", function( steamID64 ) YourCheckingFunction(steamID64) end) gameevent.Listen( "player_connect" ) hook.Add( "player_connect", "CheckUser", function( data ) YourCheckingFunction(data.networkid) end) [/lua] While my idea of protecting a socket was a bit silly, I was just providing options that were asked about. You've pretty much said exactly what I already did. /shrug
[QUOTE=Blasteh;50046955]You don't have to worry about async anywhere, what's the difference between these 2 if you're going to kick them the same way? [lua] hook.Add("CheckPassword", "CheckUser", function( steamID64 ) YourCheckingFunction(steamID64) end) gameevent.Listen( "player_connect" ) hook.Add( "player_connect", "CheckUser", function( data ) YourCheckingFunction(data.networkid) end) [/lua] While my idea of protecting a socket was a bit silly, I was just providing options that were asked about. You've pretty much said exactly what I already did. /shrug[/QUOTE] You said I've to worry because of SQL being Async >.<
[QUOTE=whitestar;50046970]You said I've to worry because of SQL being Async >.<[/QUOTE] Which post did that I say that?
[QUOTE=Blasteh;50046976]Which post did that I say that?[/QUOTE] nvm
[QUOTE=whitestar;50046970]You said I've to worry because of SQL being Async >.<[/QUOTE] I said that! But I didn't know about game.KickID (Thank Blasteh, now I can finally link this with my database).
[QUOTE=Blasteh;50046955] You've pretty much said exactly what I already did.[/QUOTE] Sorry, but I didn't feel like having my brain melt by reading 30-ish posts filled with mostly nonsense (not all yours) [QUOTE=whitestar;50046946]thats how I originally wanted to do, just asked if there are better ways I could use later on.[/QUOTE] That's pretty much the most reliable way and how I would do it personally.
but then theres still the thing, of the gamemode hiding, without blocking packets themself.
you could unlist the server from the master server
[QUOTE=kulcris;50047551]you could unlist the server from the master server[/QUOTE] tell me how? :o
well i thought there was a noheartbeat command-line option but i cant seem to find it anymore. [editline]1st April 2016[/editline] hide_server : 0 : , "sv" : Whether the server should be hidden from the master server [editline]1st April 2016[/editline] so in your config put hide_server 1 (if this command is in gmod) [editline]1st April 2016[/editline] they would still be able to favorite the server though. there is no way around that really.
it doesn't matter if they get the IP or anything, I just dont want to spam a gamemode in the server list, where people cant join directly.
then i believe that config option is exactly what you want [editline]1st April 2016[/editline] again if it is in gmod, i know its in tf2 but i cant find it listed anywhere for gmod
Start the server with the startup parameter "-nomaster" should work in all source games since the creation of this iteration :v
[QUOTE=Leystryku;50047742]Start the server with the startup parameter "-nomaster" should work in all source games since the creation of this iteration :v[/QUOTE] ah ffs, i was looking for noheartbeat XD i knew there was something like that
thanks very much! I'll close this thread for now, and re-open it if I need furhter assistance!
Sorry, you need to Log In to post a reply to this thread.