Jump to content
  • 0

Can i Request a script that allows a gm to check ip


Caves

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  06/27/14
  • Last Seen:  

@ipcheck - displays all the characters related to an IP address

@getip - gets the ip of the player / account

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  27
  • Reputation:   4
  • Joined:  01/14/14
  • Last Seen:  

edit: removed, didn't notice this is rA

Edited by Ridley
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

my version

@checkip

-	script	jkbddkk	-1,{
OnInit:
	bindatcmd "checkip", strnpcinfo(3) +"::Oncheckip",99,99;
	end;
Oncheckip:
	.@myname$ = strcharinfo(0);
	if ( .@atcmd_numparameters == 0 ) {
		message .@myname$, "usage : "+ .@atcmd_command$ +" <ip>";
		end;
	}
	.@count = countstr( .@atcmd_parameters$[0], "." );
	explode( .@atcmd_parameters$[0], .@tmp$, "." );
	for ( .@i = 0; .@i < .@count; .@i++ )
		if ( .@tmp$[.@i] != "0" && .@tmp$[.@i] != "%" && ( atoi(.@tmp$[.@i]) <= 0 || atoi(.@tmp$[.@i]) > 255 ) ) break;
	if ( .@i < .@count || .@count != 3 ) {
		message .@myname$, "wrong ip";
		end;
	}
	.@amount = query_sql( "select name, last_ip from `char` join login on `char`.account_id = login.account_id WHERE online = 1 and last_ip LIKE '"+ .@atcmd_parameters$[0] +"' order by name desc limit 128", .@name$, .@last_ip$ );
	if ( .@amount <= 0 ) {
		message .@myname$, "none player found";
		end;
	}
	message .@myname$, "player online with this ip :";
	for ( .@i = 0; .@i < .@amount; .@i++ )
		message .@myname$, .@name$[.@i] +" : "+ .@last_ip$[.@i];	
	end;
}

@getip, what about @accinfo?

 

Edit: fixed a typo

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

if not mistaken, @accinfo allow you to view the IP addresses of player too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...