Author Topic: Check ID then kick  (Read 1412 times)

I'm not joining your server anytime soon :o

Here's a better idea.
Instead of filling up the script file with a bunch of $BlockedID[bla bla bla] = 1;
then having some functions in there.
Do this in the script:
BanBLID(id,-1,"Reason");
pwnt

Now, how would i make this connect to a webpage. I already have connection complete (As seen here).
But I need to know how it will get that data and use it as the blocked IDs

Would this work?
Code: [Select]
package Kicky
{
 function GameConnection::autoAdminCheck(%client)
 parent::autoAdminCheck(%client);
{
  if(%client.BLID == $BadID["%a"])
  {
   %client.delete("You are on the list of bad BL_IDs");
  }
 }
 $BadID["666"]
};
Edit: Forgot to parent XD
« Last Edit: October 10, 2009, 12:37:39 PM by Pah1023 »

You're reinventing the wheel.

Now, how would i make this connect to a webpage. I already have connection complete (As seen here).
But I need to know how it will get that data and use it as the blocked IDs
Using HTML is horrible for what you're doing, do it like this
MEMBERID\t5000\tHi! Hi!(\n)
MEMBERID...

So check if(%client.bl_id == getField(%line, 0))
on the TCPObject's onLine callback.

You're reinventing the wheel.
Using HTML is horrible for what you're doing, do it like this
MEMBERID\t5000\tHi! Hi!(\n)
MEMBERID...

So check if(%client.bl_id == getField(%line, 0))
on the TCPObject's onLine callback.
What does the getfield(%line, 0) do?

I'm pretty sure it gets the text in the %arg's line.

What does the getfield(%line, 0) do?
It gets the first string before a tab. A tab is delimited as \t in TorqueScript (as with most languages).
The way the VCE manual works is like this:
0\tinformation.png\tHistory\tThe Etob was formed sometime around August 27th.
To get "information.png" you would use getField(%line,1);
To get "History" you would use getField(%line,2);
To get "The Etob was formed sometime around August 27th" you would use getField(%line,3);

SO what would I do in a situation like this?

What does the getfield(%line, 0) do?
Gets the stuff in the first tab.
bladda\thurr i cul\toh hai
getField(%line,1) would return: hurr i cul