| Blockland Forums > Modification Help |
| Receiving connection requests |
| (1/4) > >> |
| cucumberdude:
Is there something I can package that will trigger when the server receives a request to connect to my server? I want to be able to intercept it in order to make a whitelist thingy. Thanks. |
| MegaScientifical:
People use the autoadmincheck, if you've searched this forum before. |
| Iban:
Once again Mega, go away. He wants a way to refuse clients before they connect. GameMode_CityRPG/scripts/package.cs --- Code: ---// Marks the client version. // @null function GameConnection::onConnectRequest(%client, %ip, %lan, %net, %prefix, %suffix, %password, %rtb, %arg7, %crpg, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15) { if(!%client.isLocalConnection()) { %client.hasCRPG = false; %client.crpgVersion = 0; for(%a = 0; %a < getLineCount(%crpg); %a++) { %line = getLine(%crpg, %a); if(getField(%line, 0) $= "CRPG") { %password = getField(%line, 1); %version = mFloatLength(getField(%line, 2), 1); if(%password !$= "" && %version !$= "") { %client.hasCRPG = true; if(%password $= $CRPG::Password) %client.crpgVersion = %version; } break; } } } else { %client.hasCRPG = ($CRPG_C::Version !$= "" ? true : false); %client.crpgVersion = $CRPG_C::Version; } return parent::onConnectRequest(%client, %ip, %lan, %net, %prefix, %suffix, %password, %rtb, %arg7, %crpg, %arg9, %arg10, %arg11, %arg12, %arg13, %arg14, %arg15); } --- End code --- I'm sure you can figure it out from this. Delete the client with a schedule if you don't like his face. PACKAGE ALL ARGUMENTS RESPONSIBLY OR I WILL KICK YOUR DOG. |
| MegaScientifical:
--- Quote from: Iban on March 22, 2011, 11:49:33 PM ---Once again Mega, go away. He wants a way to refuse clients before they connect. --- End quote --- Oh shut the forget up dude. That's been asked before, and people have explained why your method is bad or doesn't work right away. I for one have had problems using that to block people, and it still gets connected. Search up the topics, I was about to go to sleep. |
| Iban:
--- Quote from: MegaScientifical on March 22, 2011, 11:52:38 PM ---Oh shut the forget up dude. That's been asked before, and people have explained why your method is bad or doesn't work right away. I for one have had problems using that to block people, and it still gets connected. Search up the topics, I was about to go to sleep. --- End quote --- CityRPG's GUI Check is flawless. The only person who has ever got around it was Badspot, and this is because BanManagerSO::isBanned is not called for him. You are a know-nothing friend. |
| Navigation |
| Message Index |
| Next page |