Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - script ipinfo -1,{
- OnInit:
- bindatcmd "ipinfo","ipinfo::OnIPInfo", 2, 2;
- end;
- OnIPInfo:
- if(getgroupid() >= 2) {
- input .@chrnm$;
- query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" + .@chrnm$ + "'",.@acid;
- query_sql "SELECT `last_ip`,`group_id` FROM `login` WHERE `account_id` ='" + .@acid + "'", .@lstp$, .@grplvl;
- query_sql "SELECT `account_id`,`userid`,`logincount`,`lastlogin` FROM `login` WHERE `last_ip` ='" + .@lstp$+ "'", .@acidlip, .@acidlip$, .@lgncnt, .@lstlgn$;
- if (.@acid < 2000000 || .@acid > 3000000) { mes "Character Not Found"; close; }
- if (.@grplvl > 0) { mes "GM Accounts Not Available"; close; }
- mes "Name: ^00CC00"+.@chrnm$+"^000000 ";
- mes "IP Address: ^FF0000"+.@lstp$+"^000000 ";
- next;
- mes "Displaying Users with IP: ^00CC00"+.@lstp$;
- next;
- for(set .@i, 0; .@i < getarraysize(.@acidlip$); set .@i, .@i + 1){
- mes .@i+1+". ^00CC00"+.@acidlip$[.@i]+"^000000 ";
- mes "Login Count: "+.@lgncnt[.@i]+" ";
- mes "Last Login: "+.@lstlgn$[.@i]+" ";
- }
- close;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement