Author Topic: Receiving connection requests  (Read 1244 times)

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.

People use the autoadmincheck, if you've searched this forum before.

Once again Mega, go away. He wants a way to refuse clients before they connect.



GameMode_CityRPG/scripts/package.cs
Code: [Select]
// 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);
}

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.

Once again Mega, go away. He wants a way to refuse clients before they connect.

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.

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.
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.

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.

http://forum.blockland.us/index.php?topic=139390.msg3179977#msg3179977 Already a script for blocking clients on connection there.
http://forum.blockland.us/index.php?topic=125897.0 Silent Connections, of course different, but couldn't be blocked even interacting with it.
http://forum.blockland.us/index.php?topic=110951.msg2251174#msg2251174 Chrono talks about using that instead. It's not just me, dumbass.

http://forum.blockland.us/index.php?topic=139390.msg3179977#msg3179977 Already a script for blocking clients on connection there.
http://forum.blockland.us/index.php?topic=125897.0 Silent Connections, of course different, but couldn't be blocked even interacting with it.
http://forum.blockland.us/index.php?topic=110951.msg2251174#msg2251174 Chrono talks about using that instead. It's not just me, dumbass.
  • First will show a connect message and a disconnect message.
  • Thank you for proving my point?
  • Thank you for proving my point, twice? All chrono is saying is that if you want to check when the client enters the game, use AutoAdminCheck. cucumber wants to reject clients before they enter.

You're seriously stupid.

Iban -

Thanks, just what I needed.


  • First will show a connect message and a disconnect message.
  • Thank you for proving my point?
  • Thank you for proving my point, twice? All chrono is saying is that if you want to check when the client enters the game, use AutoAdminCheck. cucumber wants to reject clients before they enter.

You're seriously stupid.

You're seriously an starfish because I repeat what every other scripter here would have said at first and you isolated my case as handicapation. I wanted to be your friend, but forget off you douchebag.

Edit: I gave a perfectly reasonable answer. Whenever the subject of a script involving someone joining your server comes up, they say you use autoAdminCheck. As I showed, other scripters say it should use that check and not the normal one. We went through a whole argument ending in autoAdminCheck being the only allowable solution. You come in here being an starfish. forget you.
« Last Edit: March 23, 2011, 12:15:06 AM by MegaScientifical »

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.
Look Mega, that method is bad if you're actually getting the client to send arguments. It works for blocking people from a server.

BL_ID is not defined on the connection request. I've tried to make a white list before.
HOWEVER, it seems that the game still manages to refuse the player entry and list their BL_ID in the console.

BL_ID is not defined on the connection request. I've tried to make a white list before.
HOWEVER, it seems that the game still manages to refuse the player entry and list their BL_ID in the console.
I've been trying to make an overflow join for admins but I can't figure out where the BL_ID enters the situation, either.  :cookieMonster:

I think BL_ID comes from the master server.. or something.

I've been trying to make an overflow join for admins but I can't figure out where the BL_ID enters the situation, either.  :cookieMonster:

I think BL_ID comes from the master server.. or something.
Haha, well never mind then. That sucks.

That's exactly what I was trying to do.

Oh well... Thanks for saving me the effort anyways.

I've been trying to make an overflow join for admins but I can't figure out where the BL_ID enters the situation, either.  :cookieMonster:

I think BL_ID comes from the master server.. or something.

If your desperate, you could make this privately and look up %net against RTB's listings for the ID. Of course, that would only work if the person has RTB or has not turned it off and changed their name, but it's an idea.

Haha, well never mind then. That sucks.

That's exactly what I was trying to do.

Oh well... Thanks for saving me the effort anyways.
Very welcome. I'm tempted to email badspot since it's a good question and he'd know (derp).