Private Spam/Invite Detector and Kicker Script Version 4.58.ab Last revised by awyeah (awyeah@usa.net) on 18-06-2004 Copyright © 1999-2004 awyeah All Rights Reserved Please direct any comments, feedback or suggestions about this script to me. If you need help on issues not covered in this document, please email me at awyeah@usa.net for more information. Introduction This TCL script provides the function of removing spammer and inviter bots/drones from channels your eggdrop bot is opped in. For this purpose this script utilizes 2 eggdrop bots. The first bot being a channel cycler bot to detect spammers, and the second one being an opped bot on the channel to kick out those spammers. Contents 1 Purpose of the Script 2 Description of the Script 3 How this Script works 4 Script Requirements 5 Script Functions and features 6 Script Setup and Installation 7 Bug Reports 8 Credits 9 Versions :Purpose of the Script: At first, I came up with the idea of this script on my own. Later onwards with the help of friends and other scripters I turned my idea into reality. An enhanced script of this kind was requested by my friends for their eggdrop bots, to remove unwanted spammers, inviters, advertisers from their channels. So basically, I developed this script to eliminate any kind of spammers lurking around in channels. As we know spammer scripts are getting clever day by day, so we should try and make these spam detector and remover script better as well. Since spammer scripts don't message channel operators/voices now a days so merely 90% of the scripts I have seen on the web have become useless now and leave spam undetected. Therefore, I have developed this one of a kind script which can still detect and remove spammers and their spam! :Description of this Script: Spam bots and drones now a days don't message their spam on the main channel, only in private messages/queries (/MSG) and private notices (/NOTICE) to the non-opped and non-voiced users in the channel. This way all most all opped protection bots in the channel are unable to detect this private spam, as these spammer bots and drones are messaging/noticing channel users privately. What this script basically does is that, it utilizes *2* bots; One for the purpose of spam detection and the other for spam elimination. One bot will be a channel cycler bot, cycling the channel detecting for spammers which private message it in queries or notices. Then, supposing if a spammer is found, it would message another bot (the second bot), which is opped on the channel, which in return would kick/ban that spammer out of the channel. Here is an easy example, if you still are blur: This script utilizes *2 spam checker bots*, namely: One channel cycler bot (Detects spammers on the channel) (This bot continuously cycles the channel to check for spam & is not opped) Another opped bot on the channel (Kicks spammers out of the channel) (This will be a normal bot and will be opped on the spam detection channel) As this script utilizes *2 eggdrop bots*, so both would be using different TCL scripts. Hence this TCL package comprises of 2 'TCL Scripts', each script being used on one bot only. One TCL script will be used for the channel cycler (spam checker) bot (spamdetect.tcl) Another TCL script would be used for the opped channel protection bot (spamkick.tcl) :How this Script works: This scripts works in unity with both its subscripts (spamdetect.tcl and spamkick.tcl). Both scripts work in coherence with one another proving to be an efficient spam eliminator. The working procedure of this script is very simple and is described briefly as follows: Once both scripts are set and loaded into both separate bots, first the spam checker bot will continuously cycle the channels you have defined for it to check to spams and advertisements. The cycle timers on the spam cycling checker bot can be set by bot owners according to their needs. When the bot is cycling the channel continuously, spam bots, drones and inviter bots will obviously message your cycler bot with spam messages. Not all messages sent to the cycler bot by users will be recorded as spam or invites. There is a certain criteria for matching words in the text of the user, which is defined by the word list to detect if a user is spamming or not. (wildcards such as "*" are accepted in the spam detection word list) After determining if a user is spammer, the cycler bot will record the users info and would pass it onto your opped channel bot. The info details maybe such as the nick and IP Address of the spammer. (The PINS are given for additional security so users are not able to exploit your opped bot, supposing if your cycler bot goes offline, or gets lost in a netsplit) Then your spam cycler bot, will message your opped bot with the spammers info (basically relaying the information from one bot to another) for the same channel. After receiving authorization for the info from the cycler bot, your opped bot will verify the information and proceed in punishing the user. Punishments will be a ban place on the IP Address of the user followed by a kick. :Script Requirements: This script has been tested to work one eggdrop-1.5.x and higher. TCL 8.0 or higher will be required to execute/run this script. This script requires *2 eggdrop* bots. (each bot would be configured separately) One eggdrop bot should be opped on the channel on which you are detecting spam from. (It will kick out the spammers from the channel) The second eggdrop bot should be cycling the channel where you will be detecting spammers from. (It will be detecting spammers in the channel) Both eggdrops should be on the same channel(s) from which you want to detect spam from and also kick out the spammers from. (Both work as a team, so they should be on the same channel) As you will need to load 2 TCL scripts in two separate eggdrop bots, you will also need 2 free background processes on your shell to load these eggdrops on. :Script Functions and features: This TCL script has complex features as they are sophisticated to setup. This script performs all functions of what normal spam bots on mIRC Scripts can achieve. Listed below are most of the scripts features described briefly: This script has a very effective spam detection and removal system, due to the usage of 2 enhanced eggdrop bots. Most likely 98% of private spams, advertisements and invites are removed on channels with the help of this script. This script has a fully customizable spam word detection match pattern. Matching words in the word list can be added and modified by bot owners according to their needs. (wildcards such as "*" are accepted) This script detects private messages (/MSG) as well as private notices (/NOTICE) making it more effective than others. If the spammers are think they are clever and they introduce control codes into their spam messages, thinking that matching words will not match the world list due to the presence of control codes. This script has a control code filter specially for removing all control codes before the text is sent for processing and spam detection. This script has intelligent channel cycling timers, which can be preferably customized by bot owners specifically in the delays of joins and parts. (Note this script does not have fast rejoin cycles, joining and parting are in sequence are a bit delayed so spambots would ignore the cycler bot and consider it as a normal user) This script has a multi-channel support, meaning it can be used on more than one channel. Apart from that, more than one cycler bot can be used. People having bigger channels filled with spammers can load more cycler bots. (using the same configurations for all of the bots in the of the spamdetect.tcl) For some clever spammers and spam bots, the bot has a random auto talking ability, with fully customizable word lists to check users for spam, as some spammers do not display their spam message on their first message to a user. (I added this talking feature to outsmart, those smart spamming/advertising scripts) Suppose if your cycler bots go offline like gets lost in a netsplit, even with NickServ's ENFORCE/KILL option on, people can use the cycler bots nick for 60 seconds and might try to exploit the opped bot with it. For this purpose I have added authorization PIN'S in both bots which users can customize and would help to prevent exploitation. A spammer report feature has been added in both the opped bot. The spammer report feature will enable any the opped bot to report the spammer and spammers info to any 'nick' or '#channel' via /msg or /notice. This report would contain the spammers nick, user host and the spam message through which the spammer had been spamming from. Also added a small kick counter. Every time the bot kicks a spammer it would increase the number of kicks in its database. The total number of users kicked by the bot would be shown at the end of each kick message. Users can choose between *2 types* of kick messages. Either display the random kick message of the script, or choose to display the spam message the user was spamming with, in the kick message. (Added on request) Bans enforced by the opped bot are normal channel bans and not sticky (global) bans. (I made it this way because the bots global banlist blacklists an IP and doesn't let users enter until the ban expires, while some people out there might be sitting in cybercafes using same IP addresses which are in the bots banlist, who are not spammers). There is an spammer recorder info included in opped bot. The spammers info such as the ip address, nick, user host, channel and the spam message is recorded and stored in a file. Later onwards bot owners can retrieve the file and can akick/blacklist the ip addresses found in it if they want to keep or they can keep a track of spammers and their spam messages found on the channels their bots are monitoring. The are 20 types of bans which can be selected by bot owners with varying banmasks on the spam kicker bot. These banmasks enforce a greater range of customizable bans for banning spammers. :Script Setup and Installation: This is a complex script, so you need to setup this script in an orderly manner. If you do not follow these steps properly you will not be able to configure the script properly and the script might not work. To begin configuring and setting up the variables on the script refer to the steps listed below: PLEASE FOLLOW ALL INSTRUCTIONS CORRECTLY AND MAKE SURE YOU COMPLETE ALL STEPS PROPERLY, OTHERWISE YOUR BOTS WILL NOT BE SETUP PROPERLY. After downloading the script *PRIVATESPAM.ZIP*, please unzip the file into a separate directory. After unzipping you will have 2 files in your directory apart from this help file (readme.html). (a) spamdetect.tcl (b) spamkick.tcl (c) readme.html (The file you are currently reading) After you have unzipped the files successfully, now we may need to know which would be used for which bot. SPAMDETECT.TCL ====> This script will be used by your spam cycler bot. SPAMKICK.TCL ====> This script will be used by opped spam kicker bot. After you have unzipped the files successfully, now we may begin to configure each of the scripts separately. First we would configure and setup the variables on the 'spamdetect.tcl' script. For this, please open the file 'SPAMDETECT.TCL' in your Windows NOTEPAD or WORDPAD. After you have successfully opened 'spamdetect.tcl' in your notepad. Please scroll down the initial first 10 lines which give an info regarding this script. When you have reached the point with a logo showing this: ### Start editing variables from here! ### From this point onwards you will be start to setup the variables of the script. There are altogether 18 variable settings to be setup in the spamdetect.tcl script. Please make sure you fill all fields correctly and don't leave any field out blank. The instructions to fill in each variable are given in comments. So, there shouldn't be any problem in setting up all these variables as their description and usages are already listed aside them in comments. All variables have been pre-filled out for the purpose of demonstration as well. Please remember you have to input all variables according to your settings. All variables are compulsory to input. (Only the mentioned variables which can be left as empty/blank "" can be left alone) *IMPORTANT* - ***PLEASE SETUP THE 3 AUTHORIZATION PINS CORRECTLY*** While you are setting the variables you will come across the PIN settings for the script. The script has 3 PIN's to be set, for it to work correctly. Please change the current PIN settings to any you want (make sure you don't include and special characters). For a safety measure make sure you only use alphabetical characters and numerical values. Please make sure all 3 PIN's are different from each other. (They are case sensitive as well). After you have chosen to set the 3 PIN's to any random or known words, numbers you should remember them as you will be using them again. For this case, when you will be configuring your 'SPAMKICK.TCL' (the next script) you will need to input these 3 current PIN's in there, making sure they are absolutely same as the ones you are entering now. For a clearer view consider: PIN1 in SPAMDETECT.TCL should *exactly match* PIN1 in SPAMKICK.TCL PIN2 in SPAMDETECT.TCL should *exactly match* PIN2 in SPAMKICK.TCL PIN3 in SPAMDETECT.TCL should *exactly match* PIN3 in SPAMKICK.TCL Meaning PIN1, PIN2 and PIN3 in both of your scripts (spamdetect.tcl and spamkick.tcl) should be the same and vice versa. Remember these PINS are also case sensitive, so please enter them with the correct case-letter settings in both scripts. If you fail to set all three PIN's, PIN1, PIN2 and PIN3 correctly and they do not match between both scripts, your script will not run/execute. If you do not understand the reason why the PIN's need to be set consider this, if your bot goes offline anyone can use your cycler bot's nick and if knowing this scripts settings could exploit your opped channels bot, mainly access on channels. Until the authorization PIN's aren't entered correctly, the opped bot cannot be exploit or used for wrong purposes. After setting in the PIN's correctly and as mentioned above according to the proper settings, continue to fill in the other variables as they come along by scrolling down one by one. All together you should have configured a total of 18 variables, out of which some could be left blank/empty, mainly the ones near to the end of the configuration. You will stop editing your variable configuration of your script when you see this logo. Please don't edit anything after this: ### Don't edit anything else from this point onwards ### That's it! You are done configuring the first script now, you can save the text file 'spamdetect.tcl' and upload it to your shell in your eggdrops/script directory (If you do not use the default eggdrops /script directory for TCL scripts, then you can upload it to the one you use) As you are done setting up the first script, now you can go ahead and open the other 'SPAMKICK.TCL' in your Windows NOTEPAD or WORDPAD and start setting up its variables. After opening the file 'spamkick.tcl', it would have the same procedure for setting up the variables as the previous file. You can start editing the file from where it says 'START EDITING VARIABLES FROM HERE!'. There are a total of 13 variable settings in this script. All variables need to be setup properly. None should be left "" blank or empty as then the script might not work properly. You can read the comments and usage details on each variables description and set them easily. Also I have enlisted pre-set examples of the variables for demonstration. After you have successfully edited and setup all the 13 variables, you don't need to edit anything after where you find a message saying 'DON'T EDIT ANYTHING ELSE FROM THIS POINT ONWARDS'. That's it! you are done with setting up both the scripts now! If you have followed the instructions listed here correctly and comments in both script files your scripts should execute perfectly! Now save the text file and upload the file 'spamkick.tcl' to your shell and eggdrop's /script directory, or whichever you use for your TCL scripts. Once you are done in uploading both TCL files in your scripts directory, now edit both of your eggdrops .CONF (Configuration) files, which would be something as yourbotnick.conf etc. There should be *2* configuration files as there are 2 separate bots for the TCL scripts to run on. Open both bot's configuration files and paste the following lines into them: (If you have changed your scripts/ dir to something else you might want to change that as well) - In your CYCLER SPAM bot's .CONF file paste this line in the end source scripts/spamdetect.tcl - In your OPPED SPAM KICKER bot's .CONF file paste this line in the end source scripts/spamdetect.tcl Save both of your .CONF (Configuration) files. If you have edited them via a shell editor such as 'pico' you wouldn't need to upload the files onto your shell. If you have edited them on Windows NOTEPAD or WORDPAD you will need to upload both of the configuration files on the shells of both the bots respectively. After you have successfully setup, edited the scripts, uploaded them on both the shells of your bots and have also edited both your bot's .CONF (configuration) files and have added a link to your TCL scripts at the end of each configuration file you maybe go ahead & restart both your eggdrop bots. Give a last moment check at everything you have configured and edited is okay then you many proceed to restart your eggdrops. There are many ways of restarting your eggdrops. One would be to logging into the partyline (DCC) with the bot and typing '.restart' for making them rehash and restart themselves. Another way would be to logging into the shell prompts killing their processes with their pid no's and then loading them again into the background. If you have followed the instructions and setup procedures I have given in this help file as well as in the scripts, once both eggdrops are restarted, they should have starting detecting spammers, and kicking spammer asses. :Bug Reports: If you have any suggestions, comments, questions or if you want to report bugs found in this script, please feel free to email me at: awyeah@usa.net / awyeah@awyeah.org You can also contact me on MSN Messenger. My Messenger ID is: awyeah@awyeah.org I would appreciated if you people would give me feedback on this script. I always try to fulfill peoples request (if possible) and try to add them in the release of the newer versions of my scripts. :Versions: Script versions along with their updates, bug fixes and additions are listed below currently in an orderly manner. v.4.58.ab (18-06-2004) - Added multiple channel support for both the eggdrop bots. (users can now run this script in more than one channel) - Added a *NOTICE* detection trigger for detecting private spam notices. - Added multiple cycler bot support. (users can now run more than one cycler bot with the same opped bot on multiple channels). - Spam detection words in the word list are customizable. They can be added and modified (wildcards such as "*" are also accepted) - Added random auto-talk ability for the channel cycler bot to catch more spammers. (users can define their auto-talk word lists and customize the response delay timers) - Added a spam reporter feature in the opped bot so it can /msg or /notice any nick or channel and notify their target about the spammer. - Added a kick counter to which would display the number of persons kicked in the end of each kick message. (kick number records are stored and read through a file) - Added a choice of kick messages, either to kick the spammer with the default script kick message or include the spammers spam message, in the kick message. (Added on request) - Added a spammer info record capability in the opped bot. Bot owners can record spammers info such as userhost addresses, nicks, spam messages and then retrieve them later. - Added a list 20 of banmasks to select from when banning the spammer. - Optimized the channel cycling timers for faster efficiency. - The spam detection and cycling channels will be automatically added in the spam cycler bot dynamic channel lists once the bots are loaded in to background. - Fixed and correct some bugs found as well as modified most of the procedures for a better and faster performance. v.2.6.ab (10-5-2004) - Initial release of the script :Credits: Thanks to everyone who supported me in the making and creation of this script. Also a great thanks to my all friends who helped me all the way through this project by beta testing, verifying and correcting the bugs and errors found in this script. IRC Network: /server irc.dal.net:6667 (The DALnet IRC Network) IRC Nick: awyeah My Website: http://www.awyeah.org/ Eggdrop Help: http://www.egghelp.org/ TCL Scripts: http://www.tclscripts.com/ Email: awyeah@usa.net / awyeah@awyeah.org