Keitenai Posted July 31, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted July 31, 2017 File Name: WhoisCommand.txt File Submitter: keitenai File Submitted: 31 July 2017 File Category: Utility Script Content Author: keitenai Information: Admins or GMs mostly find it hard to track a player when certain player has many accounts created with many characters on each accounts. I too had this problem so I made this script to simplify tracing a player with a simple @ whois command. How does it work? By typing the complete player's name after the command ( @ whois name of player ) will trigger sql searching for accounts which is linked to the player's IP address. Tracking is limited to last IP used by the player so this script is not capable of completely identifying all accounts of the player if a player use a different IP on a different account. Features: NO src editing needed! Able to track account IDs, Character Names, and current online character on an account. Script LINK: https://github.com/keitenai/keitenai/blob/master/WhoisCommand.txt Give me hugs and kisses if you find this useful 1 1 Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 31, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 22 hours ago Share Posted July 31, 2017 (edited) You can actually replace this whole part here... https://github.com/keitenai/keitenai/blob/master/WhoisCommand.txt#L30-L60 with this for (.@i = 0; .@i < .@atcmd_numparameters; .@i++) .@name$ = .@name$ + (.@i > 0 ? " ":"") + .@atcmd_parameters$[.@i]; or this .@name$ = implode(.@atcmd_parameters$, " "); (may get errors or warnings if the array size is less than 1 or 0) Edited July 31, 2017 by Emistry 1 Quote Link to comment Share on other sites More sharing options...
Keitenai Posted July 31, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Author Share Posted July 31, 2017 Cool!! i didn't know there is such function! haha thanks @emistry Git updated Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 31, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 22 hours ago Share Posted July 31, 2017 when you use query_sql() ... always use escape_sql() for all the string variables that you passed in. otherwise your scripts are vulnerable to SQL injection. query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+.@name$+"'",.@acc_ID$) change to query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'",.@acc_ID$) etc.. Quote Link to comment Share on other sites More sharing options...
Keitenai Posted July 31, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Author Share Posted July 31, 2017 I was totally unaware of that. Thanks a bunch! now i know why i get script errors when there's a special character on a player's name like ' . Git Updated! Quote Link to comment Share on other sites More sharing options...
syndrome93 Posted March 8, 2020 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 36 Reputation: 0 Joined: 09/08/13 Last Seen: September 30, 2020 Share Posted March 8, 2020 @Keitenai awesome. thx for the script ! Quote Link to comment Share on other sites More sharing options...
Gidz Cross Posted March 19, 2020 Group: Members Topic Count: 133 Topics Per Day: 0.03 Content Count: 686 Reputation: 89 Joined: 04/07/14 Last Seen: Yesterday at 08:18 AM Share Posted March 19, 2020 I love this script. Thank you so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.