////////////// // // Proxy Blocker v1.7.1 by Pri (18th of July 2015) // This script requires Metis v2.82 or higher & RoboMX v2.08 http://bit.ly/ldk6C3 // Website: http://www.renmx.com // Forum: http://www.mxpulse.com/board // /////// COMMANDS // // !Download - Forcibly check for recent Proxy Servers to Ban that were used in other rooms // !Proxy [IP Address] - Check if an IP Address is a known Proxy Server or not // !ProxyPardon [IP Address] - Allows you to whitelist an IP to allow them to bypass the Proxy Blocker when they enter // !Proxy Status - Check the status of the Proxy Blocker and its API's // !Proxy Verbose On/Off - Allow the script to notify you when a user who enters your room is NOT using a Proxy Server (Default is Off) // !ProxyLockdown On/Off - Allow the script to lock down your room when a large proxy spam attack is detected inside your room (Default is Off) // /////// SERVER SUPPORT // // WCS, RCS, ZCS, RSWCS, and FXServer are all supported out of the box // ZCS support is limited, WCS, RSWCS or FXServe are recommended. // ////////////// // Clear some variables for a clean run // Check for a UUID, if one doesn't exist create create one (This is so multiple bots can share the same database cache) %RANDOMNUM[251]%%RANDOMNUM[252]%%RANDOMNUM[253]%%RANDOMNUM[254]%%RANDOMNUM[255]% %USERVAR[Generated_UUID]% // Check that we can actually read/write to the Plugins folder, if we can't tell the Admins and break /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c8#During setup of the Proxy Blocker we were unable to write files to your bots "Plugins" folder. Please make sure the read and write access permissions to this folder are set correctly. // Tell the users about the new Multi-Bot support /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#New Multi-Bot support#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#With this version of Proxy Blocker you're able to run multiple copies from the same computer. To use this feature, simply make a copy of your entire bot in another folder and launch it like normal. You may wish to use this feature for protecting multiple rooms. %USERVAR[Generated_UUID]% // Check that the scripts folder and settings file has been setup. If it hasn't do it. // Break if the IP is private (127.0.0.1, 192.168.x.x, 10.0.x.x and so on) :%IP% 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 // Break here if a Private IP Was detected // Check that the bot is running a version of Metis that can make web queries /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You appear to be running an outdated version of Metis. /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You can download the latest one here#c63#: #c62#http://bit.ly/ldk6C3 /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#To install this file replace your old Metis.r2x file located in your script plugins folder // Perform an online check to see if this version of Metis is supported by this script or not (If you're making your own Metis versions and know yours are compatible, contact me and I will add your versions to the compatability check) // The proxy blocker now requires version 2.82 of Metis or higher, if the user is not using this version or better tell the admins and break /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#This script requires Metis v2.82 minimum, please upgrade from v%VERSION%#c63#: #c62#http://bit.ly/ldk6C3 // Check that the scripts folder and settings file has been setup. If it hasn't do it. cmd.exe /c MD C:\Pri.Script.Dependencies\Proxy.Blocker\Cache 2\nv1.7.1 // Create a Whitelist File if one doesn't exsist and tell the admins how to use it /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Whitelist Feature#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#A Whitelist file has been created here#c63#: #c62#C:\Pri.Script.Dependencies\Proxy.Blocker\.Whitelist.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You may fill this file with Proxy IP's or Usernames of the people you trust to use Proxy Servers You can place Proxy Server IP's OR Usernames in this file, one entry per line, unlimited size, Please do not delete this line explaining how to use the file!\n // For multi-bot support, the exile file has been moved from the main database folder to the bot plugins folder, tell them about the move /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Exile Non-Proxies Feature Change#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Your #c62#exile.room.ini #c9#file has been moved to#c63#: #c62#Plugins\Proxy.Blocker.exile.room.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#This change was made for Proxy Blocker to support multiple bots from the same database /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#If you run more than one bot, you should move this exile file to the bot you use for exiling. %USERVAR[Exileroom_Result_Line01]%\n%USERVAR[Exileroom_Result_Line02]% // Create an 'Exile to x Room' file if one doesn't exsist and tell the admins how to use it /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Exile Non-Proxies Feature#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#An Exile File has been created here#c63#: #c62#Plugins\Proxy.Blocker.exile.room.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You can put your main room name here for the Proxy Blocker to exile users to it #c63#(#c62#Once Verified#c63#) /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#If you do not need this feature simply leave the file as-is and users will not be exiled anywhere Enter the name of your room on the line directly below this one, Make sure it's the correct address. DO NOT DELETE THIS LINE OR BAD THINGS WILL HAPPEN!\n // For multi-bot support, the force login password file has been moved from the main database folder to the bot plugins folder, tell them about the move /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Force Login Non-Proxies Feature Change#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Your #c62#.forcelogin.password.ini #c9#file has been moved to#c63#: #c62#Plugins\Proxy.Blocker.forcelogin.password.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#This change was made for Proxy Blocker to support multiple bots from the same database /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#If you run more than one bot, you should move this password file to the bot you use with forced logins. %USERVAR[ForceLoginPass_Result_Line01]%\n%USERVAR[ForceLoginPass_Result_Line02]% // Create a 'Force Login Password' file if one doesn't exsist and tell the admins how to use it /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Force Login Non-Proxies Feature#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#A Force Login Password File has been created here#c63#: #c62#Plugins\Proxy.Blocker.forcelogin.password.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You can put a password here for the Proxy Blocker to log users in with #c63#(#c62#Once Verified#c63#) /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#If you do not need this feature simply leave the file as-is and users will not be logged in. The command that the bot uses for this is /forcelogin so make sure your server supports this command. FXServe, WCS and RSWCS support it. Enter your password on the line directly below this one to have them logged in with it after they enter your room. DO NOT DELETE THIS LINE OR BAD THINGS WILL HAPPEN!\n // Move the spam lockdown settings file for multi-bot support 0\n // Create the Spam Lockdown settings file if one doesn't exsist and tell the admins how to use it /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c4#Lockdown Feature#c9#: /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#This version of Proxy Blocker supports a "Lockdown" feature - It is OFF by default but you can activate it by typing #c4#!ProxyLockdown On /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#When this feature is active the Proxy Blocker is able to stop any and all users from entering your room for up to a maximum of 1 hour when a large proxy attack against your room is detected 0\n // Move the verbose settings file %USERVAR[Proxy_Blocker_Verbose_Mode]% // Download anti-proxy setup data from the MXPulse API // Verify that the Proxy_API_URL isn't blank, if it is blank, break as the script won't work without a querying API // If the IP supplied to the bot is blank then load in the Access Level reminder counter (should be blank at first, then goes up to 3+) $ReminderCount$ // Break if the IP is blank then tell the Admins that they need to give their Bot high enough access to see IP Addresses /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Your bot doesn't have a high enough access level to see the IP's of people who enter your room, try logging it in as Admin or Host to correct this, alternatively make your bot its own password with the necessary access level /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Reminder #c62#%USERVAR[ReminderCount]%#c9# of 3 // Sometimes the creation of the Folder for the Setup Check is too slow causing the install check file to not save, so let's just re-attempt that if this is a first time install 2\nv1.7.1 // Download a character for use in the Roomname httpget request // Get the roomname, clean it up and add it to the proxy request %ROOMNAME% // Reference the Whitelist file incase this user has been given permission to use a Proxy Server in this room // The whitelist checks for a designated Proxy Server IP Address OR the users Username from this file 0 0 1 1 // Check the Cache for this IP, if the IP is found don't query the IP with the API and just push it to the API Result variable // If the API is requesting the local Cache to be turned off then ignore the cache output and make a web query to the API instead Ignore-Cache // Check the Cache output for a proxy or not and push those variables so that duplicate queries are not made within the past day for this IP 0 Proxy Detected in the Cache // Check if the MXPulse API is telling the script to turn off or not // Query the Proxy API to see if this IP Address is a proxy or not // Format the API output to make it a little nicer 0 Proxy Detected in the Cache Random Public Proxy Random Public Proxy Tor Proxy 0 0 // If the user had permission to use a proxy do not kick them but tell the admins they are using a proxy if they are /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#%NAME% #c16#is using a Proxy but has permission and won't be kicked. #c63#(#c62#%USERVAR[Proxy_UI_Result]%#c63#) // If a match was found, Kick/Ban and alert admins to this users Proxy use unless they had permission in which case skip this part /banip %IP% 2880 /kick %RAWNAME% /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#%NAME% #c8#is using a Proxy and has had their IP banned for 48 Hours. #c63#(#c62#%USERVAR[Proxy_UI_Result]%#c63#) // If this user isn't using a proxy server and the room owner has specified Verbose mode to be on then tell the admins that this is user is not using a Proxy Server /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#%NAME% #c4#is not using a proxy server #c9#[#c62#Verbose Mode#c9#] // If the user has setup the exile in the "Proxy.Blocker.exile.room.ini" file then exile this user to that room if they are not a Proxy Server, Just exile if the user is Whitelisted however /exile %RAWNAME% %USERVAR[Exileroom_Result]% // If the user has setup the forcelogin voice feature then log this user in if they are not a proxy /forcelogin %RAWNAME% %USERVAR[ForceLoginPass_Result]% // Create a cache for this IP so that we don't query it again atleast within 24 hours - Don't save this if the API doesn't want a cache created Ban Date: D%DAY%-M%MONTH%-Y%YEAR%\nProxy Type: Live detection from the API\nBanned By: Banned after it entered your room by the Proxy Blocker Software\nProxy Blocker UUID List: %USERVAR[Proxy_Blocker_UUID]%, Cached Date: D%DAY%-M%MONTH%-Y%YEAR%\nProxy Type: Not a proxy, normal IP Address\nCached Created By: Proxy Blocker Software\nProxy Blocker UUID List: %USERVAR[Proxy_Blocker_UUID]%, // Check for recent bans on the API and cache those !botpreempban // If there is 3 positive detections in the last 60 seconds then send /limit 5 to the server to stop any other connections 0 %MINUTE% /limit 5 /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c8#A proxy based spam attack has been detected in your room. The room has entered into lock down mode. No one will be able to enter your room for %USERVAR[MINUTEUNTILNEXTHOUR]% minutes 1\n%HOUR%-%DATE% If 5 attacks are detected within the past minute tell the admins they can turn the Lockdown feature on (Only give this notice once per day) /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#A large Proxy Spam attack has been detected against your room, you can block this and future large attacks by typing #c4#!ProxyLockdown On 1-%DATE% // Break here if this is a proxy, only check for updates when the user has not been detected as a proxy // Check for an updated version of this script (Now with Auto Update if wget is found!) %RANDOMNUM[1337]% v1.7.1 %DATE% // Check if the Version_Server_Health is okay, if it isn't skip this update entirely // Auto Update Code http://proxy.blocker.mxpulse.com/version.php?rand=%USERVAR[Random_Number]% Plugins\wget\wget.exe -q -O Plugins\%USERVAR[Update_Filename]% %USERVAR[Update_URL]% /opmsg #c4#Proxy Blocker #c63#(#c62#%USERVAR[Version_Info]%#c63#): #c1#Your Proxy Blocker plugin has just downloaded and installed an update. /mxc load // Normal Update Code /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c1#A new version (%USERVAR[Version_Info]%) of Proxy Blocker is available. /opmsg #c4# · Update Notes#c63#: #c62#%USERVAR[Version_Release_Message]% %DATE% !proxy %PARAM% // Check that the command was used at the beginning of a sentence %TRIGGER% // Generate a random number to be used in the query to the API to make sure the results are not from the readweb cache %RANDOMNUM[1337]% // Check the status of the Proxy Blocker API's // Output the status if the user used status as their parameter #c4#Proxy Blocker v1.7.1 API Status#c63#: %USERVAR[PBS_MXPulse_API_Status]% %USERVAR[PBS_MXPulse_PreEmptiveBan_Status]% %USERVAR[PBS_Local_Script_Cache]% // Filter parts of the URL from the Proxy API URL response to display the API version %USERVAR[PBS_Proxy_API_URL]% #c9#Proxy Checker API Version#c63#: #c4#%USERVAR[PBS_Proxy_API_URL_Filtered]%.0 // Check if the user is activating Verbose mode or not // Process which command the user typed 1 0 // Output message to Opmsg explaining which setting was chosen and what it does /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#The #c63#"#c1#Proxy Blocker Verbose#c63#"#c9# mode has been turned #c8#OFF /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#When this setting is OFF the Bot will only notify you when it detects a proxy server has entered the room /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#The #c63#"#c1#Proxy Blocker Verbose#c63#"#c9# mode has been turned #c4#ON /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#When this Setting is ON the Bot will notify you whether a user is using a proxy server or not // Break if the IP is private (127.0.0.1, 192.168.x.x, 10.0.x.x and so on) :%PARAM% 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You cannot check an internal IP with the Proxy Blocker // Break if input doesn't contain a dot (just a really basic check to see if this is actually an IP Address, it isn't foolproof but lots more code would be needed to properly verify input with Metis) #c62#Your parameter #c63#"#c4#%PARAM%#c63#" #c62#is not a valid IP Address. Valid Example#c63#: #c4#!proxy 137.56.163.46 // Push the PARAM to a variable so that it works inside the readweb operator %PARAM% // Check that the user has the correct version of Metis to run this script by quering server and checking for a file, if this file doesn't display right tell the user to update // The reason this variable is called Pulse is because it shares this variable among all my scripts to make sure the right Metis is being used, saves queries // Check if the user is using a compatible version of Metis or not and also check if the server is online or not /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You appear to be running an outdated version of Metis. /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You can download the latest one here#c63#: #c62#http://bit.ly/ldk6C3 /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#To install this file replace your old Metis.r2x file located in your script plugins folder // Check if the MXPulse API is telling the script to turn off or not #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c5#The Proxy Server API Service is currently offline, please try your query again later. // Get the roomname, clean it up and add it to the proxy request %ROOMNAME% // Query the Proxy API to see if this IP Address is a proxy or not // Format the API output to make it a little nicer 0 Random Public Proxy Random Public Proxy Tor Proxy 0 0 // Tell the user if the IP they have queried is a proxy server or not #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#%PARAM%#c63#: #c4#This IP is believed not to be a Proxy Server. #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#%PARAM%#c63#: #c8#Known Proxy Server #c63#(#c62#%USERVAR[Proxy_UI_Result]%#c63#) !ProxyLockdown on !ProxyLockdown off // Check if the command was typed at the start of a sentence, if not break %TRIGGER% // Check if the Metis version is below v2.83 so we know that %USERMODE% works 1 0 0 0 // If the user doesn't have an @ in the User List, tell them they need to login to use this command and break #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Login and show an #c62#@ #c9#in the userlist to use this command. // Process which command the user typed 1 0 // Output message to Opmsg explaining which setting was chosen and what it does /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#The #c63#"#c1#Proxy Blocker Lockdown#c63#"#c9# feature has been turned #c8#OFF /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#When this setting is off the Bot will not attempt to lockdown your room even when it detects a large proxy based spam attack /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#The #c63#"#c1#Proxy Blocker Lockdown#c63#"#c9# feature has been turned #c4#ON /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#When this Setting is On the Bot will be able to block ALL users from being able to enter your room for a maximum of 60 minutes whenever a large proxy spam attack has been detected inside your room /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#To end the lockdown prematurely type #c1#/reload #c62#or #c1#/limit 150 #c62#either of these commands will have the same affect of lifting the lockdown /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#This feature only supports WCS, RCS, RSWCS, FXServe and ZCS - Other servers may not support it // End any lockdown currently in progress if the user turned this feature off /limit 150 /reload /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#The server has exited Lock Down mode, users are again able to connect to the room, if you want to re-enable this feature for future attacks type #c4#!ProxyLockdown On 0\n%HOUR%-%DATE% // If there is 3 positive detections in the last 60 seconds then send /limit 5 to the server to stop any other connections 3 %MINUTE% /limit 5 /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c8#A proxy based spam attack has been detected in your room. The room has entered into lock down mode. No one will be able to enter your room for %USERVAR[MINUTEUNTILNEXTHOUR]% minutes 1\n%HOUR%-%DATE% // This part of the script will check if there is any new IP's to be banned anytime someone in your room changes their username. // I've used this method because I do not want to use an OnTimer event as Metis only allows 1 to be used per Bot and I wouldn't want to 'steal' your only OnTimer and possibly break other scripts you are using. // Check for recent bans on the API and cache those !botpreempban !botpreempban !download // Check for a UUID, if one doesn't exist create create one (This is so multiple bots can share the same database) %RANDOMNUM[251]%%RANDOMNUM[252]%%RANDOMNUM[253]%%RANDOMNUM[254]%%RANDOMNUM[255]% %USERVAR[Generated_UUID]% %USERVAR[Generated_UUID]% // If the channel limit is set to 5 but the hour is up, re-set it back to 150 /limit 150 /reload /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c62#The server has exited Lock Down mode, users are again able to connect to the room 0\n%HOUR%-%DATE% // Generate a random number to be used in the query to the API to make sure the results are not from the readweb cache %RANDOMNUM[1337]% // Check the status of the Proxy Blocker API's - We want these to cache just so it saves bandwidth and query time // Push the current minute to a variable so another check in the script can make sure this doesn't run more often than once a minute %MINUTE% // Break here if the Pre-Emptive system has been set to off by the Proxy API /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c5#The Pre-Emptive Ban feature has been temporarily disabled, please try again later. // Pick the appropriate command to be used for different servers. Use /banip as the default however. /banip /hidecmd /banip /hidecmd /banip /unban /hidecmd /unban /hidecmd /unban // Read in recent ban (start line 1000 then go down) - Due to the way this is coded it actually starts with line 1001 but its then reduced to line 1000 before it begins reading the actual webpage 1001 // Set the Ban Message to off for a clean run 0 // Set the banned IP Count to 0 for a clean run 0 // Reduce the line we are reading by 1, the reason we read the highest line first is so that Metis can cache all the lines and then reference that, basically for performance // Read in the webpage on the Line we have selected // If the divider [:@:] isn't found in the server output then consider the server bugged out or missing data and skip this line // Replace the data seperator with something more Metis friendly // Find the new seperator and push the variables on both sides (Left = IP, Right = Proxy Type) // Check that this Proxy wasn't already banned in the past 24 hours, if it was then just skip forward to the next IP // Figure out what to do with this ban entry, if its been cached, if this specific bot has already banned/unbanned it etc 0 1 2 %USERVAR[Pre_Emp_Instruction_set]%-1 // If Pre_Emp_Instruction_set = 2 then we skip this entry as it's already cached and banned by this bot // Create the cache file content Ban Date: D%DAY%-M%MONTH%-Y%YEAR%\nProxy Type: %USERVAR[Cache_Line02]%\nBanned By: Pre-emptive Banning Service\nProxy Blocker UUID List: %USERVAR[Proxy_Blocker_UUID]%, Unban Date: D%DAY%-M%MONTH%-Y%YEAR%\nProxy Type: Not a proxy, normal IP Address\nUnbanned By: Pre-emptive Banning Service\nProxy Blocker UUID List: %USERVAR[Proxy_Blocker_UUID]%, // Save cache file content to the cache file %USERVAR[Cache_File_Content]% %USERVAR[Cache_File_Content]% %USERVAR[Cache_File_Content]% %USERVAR[Proxy_Blocker_UUID]%, %USERVAR[Proxy_Blocker_UUID]%, // Form the output command for either banning or unbanning IP's in the room %USERVAR[Server_Appropriate_BAN_CMD]% %USERVAR[Cache_Line01]% 2880 %USERVAR[Server_Appropriate_UNBAN_CMD]% %USERVAR[Cache_Line01]% // Run the output command %USERVAR[Output_Command]% // Save a 1 in the ban message so we know to output it later. 1 // +1 the amount of IP's banned if some IP's were banned // Process this code a few more times or until we reach line 1 in which case finish // Proxy Servers were banned message creation %USERVAR[Amount_of_Proxies_Banned]% Proxy Servers have been banned in your room for 48 Hours #c63#(#c62#Pre-Emptive Bans#c63#) %USERVAR[Amount_of_Proxies_Banned]% Proxy Server has been banned in your room for 48 Hours #c63#(#c62#Pre-Emptive Bans#c63#) // Output to the admins that some IP's were banned if they were banned /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#%USERVAR[Proxy_Opmsg_Output]% /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#No Proxy Servers were found to ban at this time #c63#(#c62#Pre-Emptive Bans#c63#) !ProxyPardon %PARAM% // Check if the command was typed at the start of a sentence, if not break %TRIGGER% // Check for a UUID, if one doesn't exist create create one (This is so multiple bots can share the same database) %RANDOMNUM[251]%%RANDOMNUM[252]%%RANDOMNUM[253]%%RANDOMNUM[254]%%RANDOMNUM[255]% %USERVAR[Generated_UUID]% %USERVAR[Generated_UUID]% // Check if the Metis version is below v2.83 so we know that %USERMODE% works 1 0 0 0 // If the user doesn't have an @ in the User List, tell them they need to login to use this command and break #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Login and show an #c62#@ #c9#in the userlist to use this command. // Do a really basic IP Check by checking if the paramter contains a . /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#Your parameter #c63#"#c4#%PARAM%#c63#" #c62#is not a valid IP Address. Valid Example#c63#: #c4#!ProxyPardon 137.56.163.46 // Create a Whitelist File if one doesn't exsist and tell the admins how to use it /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#A Whitelist file has been created here#c63#: #c62#C:\Pri.Script.Dependencies\Proxy.Blocker\.Whitelist.ini /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#You may fill this file with Proxy IP's or Usernames of the people you trust to use Proxy Servers You can place Proxy Server IP's OR Usernames in this file, one entry per line, unlimited size, Please do not delete this line explaining how to use the file!\n // Push the user parameter to a variable %PARAM% // Process which command the user typed Pardoned Date: D%DAY%-M%MONTH%-Y%YEAR%\nProxy Type: Not a proxy, normal IP Address\nUnbanned By: %NAME%\nProxy Blocker UUID List: %USERVAR[Proxy_Blocker_UUID]%, %USERVAR[Pardon_User_IP]%\n // Output message to Opmsg explaining this users IP has been pardoned /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#The IP #c63#"#c1#%USERVAR[Pardon_User_IP]%#c63#"#c9# has been added to your local Proxy IP Whitelist /opmsg #c4#Proxy Blocker #c63#(#c62#v1.7.1#c63#): #c9#To edit the file manually#c63#: #c62#C:\Pri.Script.Dependencies\Proxy.Blocker\.Whitelist.ini