Download SearchBot.zip (289.89 KB)
Current version: 2.22
SearchBot is a very fast searching system for file serving channels. It detects and downloads lists from SDFind/OmenServe type fileservers. Users type their search request in the channel - for example, "@search something" (the search keyword is configurable) - SearchBot searches for "*something*" in all the lists that it has from that channel and sends the results to the user in a (zipped) text file. Note that SearchBot includes sbClient, a SearchBot client that makes searching easier.
To load SearchBot from the zipped version, extract its contents into your mIRC folder (keep the directory structure), type "/load -rs SearchBot\SearchBot.mrc" into any mIRC window and press enter.
Main advantages of SearchBot:
- Users don't have to download lists to search from them. The user can come into a channel and instantly search from all of the servers.
- Gives results from servers who have @find search disabled.
- Searches from both online and offline fileserver lists. Note that sbClient can determine online status of a fileserver.
- Searches are true wildcard, i.e. a search for "Bernard Cornwell" finds both "*Bernard*Cornwell" and "*Cornwell*Bernard*"
- Gives more results then @find/@locator and also lightens "message load" on servers.
- Thanks to searching dll written in asm by Iczelion, very fast searches - see table below. Searches run on separate thread (i.e. searching doesn't lock mIRC) and on lowest priority. I've hosted UT2003 on same machine as SearchBot, CPU constantly maxed - searching times were longer but no drop in framerates in UT.
- Highly configurable, multi-channel and multi-network.
- Users can get filelists directly from SearchBot (configurable, see below)
Due to the fact that SearchBot downloads lists from fileservers, I recommend that you run SearchBot in separate mIRC, clean installation. Other scripts that download list files, such as AutoGet or vPowerGet will interfere with downloading lists. There are ways to bypass that problem, but it is easier to use a separate mIRC.
How fast is SearchBot?
In a nutshell: very fast. If you are using fast CPU, searching speed is close to 100 MB/s or more - and that is wildcard search from ASCII text files!!! Actually, a lot of time is spent on opening and closing list files, otherwise the speed would be even faster. You will get very high speeds where the size of the lists is up to approx. 300 MB - more than that and searching speed will start to drop.
Table below shows SearchBot searching speed on various CPU's. I used "standard" set of 100 lists totalling 120.9 megabytes, average file size 1.2 MB. I'll try to make that set of lists available for downloading as well. How does one test searching speed? See more below.
Searching speed (MB/s)
AMD AthlonXP 2800+ (Barton)
AMD AthlonXP 2500+ (Barton)
AMD AthlonXP 2000+
Intel Pentium 4 2.4 GHz
Intel Pentium 4 1.4 GHz (lists on RAM drive)
Intel Celeron 2000 MHz
Intel Pentium 4 1.4 GHz (lists on hard drive)
Intel Pentium III 450 MHz
During script loading, SearchBot verifies that all required files exist and are in respective folders. i.e. all files are in subfolder "SearchBot\" except two files needed for zipping - mIRCZip.dll and zip32.dll - which must be in same folder as mIRC.exe. During use, SearchBot will create various files and folders into its own folder; no files will be placed elsewhere. Note that searchbot.mrc loads two other script files as well - searchbot.engine and searchbot.lg. The first is the main SearchBot file, the second is list grabber.
After script is loaded, it will display its options menu - like that:
- "Enable SearchBot". When that item is not checked, SearchBot is disabled. Did you really need help with that?
- Yes, second item is link to this page.
NOTE: There is stupid restriction with multi-network - you cannot run SearchBot in channels with similar names on different networks. I.e. SearchBot cannot run in both #books@UnderNet and #bookz@EFNet. Yes, I know that it is a stupid limitation and I must have been braindead or at least in a coma when I did that portion of SearchBot. But hey, at least there is something to add in v3.
- In upper box, channels in which the user is present are listed in format "channel@network"
- Button "Add" adds channel to the lower box
- The lower box lists channels in which SearchBot is currently active.
- Button "Remove". Would you like to guess?
- box "Global options."
- "Enable message/filesend buffer." Default is checked and I recommend to keep it that way. That creates a 3 sec delay between messages and filesends, preventing SearchBot from flooding itself out.
- "Enable debugging." Pretty pointless, as it is not normally needed. Creates file "SearchBot.debug" in SearchBot folder where various search data is stored.
- "Zip search results." Default is enabled and it is really also recommended - due to the repeatibility of results they compress really well. 100 kB results file (approx. size of 1000 results) is 10-12 kB when zipped, reducing greatly amount of data that needs to be transferred.
- "Enable 'live' stats window." When enabled, a window "@SearchBot.stats" is created and info about finished searches is displayed. The first search after midnight clears the window. Note that you can change how time is shown by going to mIRC options --> IRC --> Messages, Timestamp as SearchBot uses your current timestamp settings there.
- "Send messages as..." Chooses the method by which SearchBot sends messages to clients. Note that cprivmsg and cnotice are only available on Undernet and you must be voice or op in that channel to send it. It is safe to have it enabled in other networks or if you are a regular user in the channel as well - SearchBot will just send normal notice or message instead. Cnotice and cprivmsg are useful because they prevent the "Target change too fast" error in UnderNet.
Tab 2: Channel settings
- "Select channel." Select channel from drop-down menu and press "Load" button. Settings for that channel will be loaded. Note that image shows current configuration, i.e. what you will get when adding new channel from first tab.
- "Search trigger." Default is @search, but I recommend that you change it, because OmenServe 1.40 responds to @search as well. Sheesh, like having both @find and @locator isn't bad enough. Fortunately, it is removed from latter versions of OmenServe , so test @search in the channel and if you get no responses, it is OK to use it. I'd recommend that search trigger starts with '@'.
- "Max. search results." Maximum number of search results allowed. 1000 is fairly safe, I mean, if a person cannot find what he is looking for in 1k results then his search was really generic. Note that minimum length of search is 3 characters after "'*? etc is removed.
- "Send ad notice for @find/@locator." This is a nice way of advertising SearchBot. When a person does @find/@locator search, SearchBot will send them a notice "You should use @search <their-search-here> for searching. @search uses different method for searching; answers will be sent to you in .txt or .zip file. Using @search is much faster then using @find/@locator and gives you usually more answers - it also lightens load on servers." SearchBot keeps lists of nicks to whom it has sent that ad notice - roughly same size as many people are in that channel but no less then 50. That way ad will not become annoying if people insist in using @find. Also, after replying, SearchBot does not reply to other @find/@locator searches for 10 seconds.
- "Enable list sending." When checked, people can request list of lists used for searching in that channel with list sending trigger; also they can get those lists using @trigger listname
- "Enable listgrabber". If you don't have that checked, SearchBot will not download any lists.
- "Slow mode..." When checked, SearchBot will delay the amount of seconds in editbox between list request. Recommended to be enabled, but not mandatory - especially if you have good connection.
- "Lists expire." Determines if and how often SearchBot will update its list database. Note that if this feature is enabled, lists will be checked on mIRC start and every 3 hours afterwards. Data about lists checking is shown in mIRC status window.
- "Check lists now." Does exacly what it says.
- "Advertisement." This allows you to show a SearchBot ad on a channel. You can insert color, etc. codes in the same way as into any mIRC text - by pressing ctrl+K, ctrl+U, ctrl+B or ctrl+R. Remember that the maximum limit of a single line that mIRC can display is 255 characters - and that includes control codes, so keep your ad below that limit.
- "Preview." Shows how SearchBot ad looks in channel by echoing it into mIRC status window.
- "Insert variable." Select variable from drop-down menu and press "Insert" button. Variables should be self-explanatory by their names - they will be replaced with their actual values when ad is shown in channel:
Tab 3: Statistics
All should be clear here except "Speed test"
- When you click on the "Speed test" button, a directory select dialog will open. Select the directory with the lists and a small dialog, "Speed test started" will appear. Note that if SearchBot has another search active at the moment, speed test start will be delayed. After speed test is finished, results will be displayed in yet another dialog
Not tab items
- "Close". Guess?
- "Local search" (or press F4). This opens local search dialog.
Global" means that all subfolders in SearchBot lists folder will be searched. I do not recommend checking "No max answers limit", because search results will be displayed in mIRC window - and if you get 100 000 results, well, loading them will take quite a lot of time and freeze mIRC for a while. Most likely you will ping out as well.
Local search results will be shown in window @SearchBot. LocalSearch. Results from nicks that are offline are shown in red color. When you right-click on that window, you will get following popup menu:
All items should be self-explanatory. As you can see, I don't have AutoGet or vPowerGet.NET loaded.
When you right-click on a channel nicklist, you will notice a new item in there - SearchBot.
Once again, most items should be self-explanatory.
- "Request list." Requests list from currently selected nick.
- "View list." Explanation not necessary.
- "Custom trigger." Some fileservers do not follow convention that list trigger == @nick. You can determine custom trigger that will be used for list requesting.
- "Not server." If person has stopped serving or newbie has pasted some really wrong things in channel, then marking them with "Not server" will stop SearchBot requesting lists from them.
Other important stuff
SearchBot also has few extra channel commands. They begin with a search trigger. I will use @search in examples as it is the default trigger.
@search-stats - displays some general statistics. This is an example: <<SearchBot>> From this channel I've got 57 lists. I have done 30385 searches; average search took 1.94 seconds and gave 133 matches.
@search-help - sends help notice. Note that the notice varies according to list sending status. <<SearchBot>> To search, use @search <keywords> on channel. Answers will be sent to you in a text file. You can also try @search-stats. To get list of lists used for searching or an individual list, use @SendList
There are also two "special" commands. Typing @sbClient in the channel will send sbClient.zip to the person who requested it. sbClient uses @SearchBot-trigger to get SearchBot trigger for that channel; the answer is sent as a ctcp message.
- 2.1. Added .rar list support. Some general minor changes/fixes.
- 2.2. Works fine on mIRC 6.16 now - as it came out, it was problem with the way mIRC unloaded the dll. Included sbClient 2.2.
- 2.21. Huh? I really don't remember this version. Probably just updated sbClient.
- 2.22. Fixed a dumb local search-related bug. Thanks to Gambit32 for reporting it.
* auto join channels & networks
* allow similar name channels in diff networks
* searching also via private msg/query window
* results zipping configurable by channels
* same for messages
* ListGrabber messages go to separate window - optional
* channel menu to open UI
* whole thing as a dll
* limit result from one list
* random list search order
* maybe - storing all the lists in the memory/RAMdrive? Or allow user to specify list folder location?
Aknowledgements and thank-you's
Without Iczelion, this script wouldn't exist. He wrote incredible searchbot.dll for it and updated it in a few minutes every time I asked for something new. He also created mIRCZip.dll and recompiled zip32.dll. Iczelion codes assembler faster then normal people type. Thank you!
Tipi nagged me into creating SearchBot v2. Without him, SB would never have become multi-channel and multi-network. I still damn him for asking the latter. Tipi also alpha and beta tested SB1-2 and gave me lots of ideas. Some parts of the script are his creation, or, at least based on his creation.
Tipi and Mr_Cool tested the search speeds with the standard speed test set. Thanks!
Bookworm ran the SearchBot v1 for a quite a long time and helped me to debug it. He also checked this page for grammar and language, as his english is far superior to mine. (Too true, you Mad Estonian! - Bookworm)
Vadi wrote loader for the installer.