Information: This script checks which servers are linked to your irc network every x seconds. It can also check the status of hidden U:lined servers, such as Services and StatServ. When a server splits, the bot will open a socket to the split server, and report whether the connection was either: Accepted, Refused, Failed, or Timed out. This information is also created when you use the status command from a channel or from the partyline. All data is saved to database files. You can set flags separately for different types of commands. The script also optionally creates an HTML web page containing: a list of all linked servers with various information about each one, a list of all split servers, information about the network's users, a graph showing most frequently split servers, a network map, and a log of recent network activity. Its style is fully configurable, and it is updated whenever information changes or when you use the .split HTML command from the partyline. The network map can also be viewed from the partyline. You can also optionally display servers from some or all sections of the page as mIRC links. Thanks to KuNgFo0, guppy, Bass, MatriX-, paulsen, and stdarg for all of their help. Changes log for Split.tcl: Version 4.2 * Released to the public from the |DAWG| Tcl web site. * Added an option to ignore certain servers. * Added 2 missing br's to the web page. * Removed some un-needed globals. * We now send VERSION for the update timer. LINKS is now only sent at 12 AM and 12 PM to check for new server links. This will help prevent IRCops from banning your bot from the server and/or network. * Fixed some possible bugs with the save/readarray code. * Removed nflaglist (the other code now works with flags set to - or -|-). * You can now set the format of the !split list messages. * Added split prediction/netlag detection. * We now send PING for the update timer. * Instead of queuing all PING requests at once, we now send on ping request every x seconds (default 5). Version 4.1 * Released to the public from the |DAWG| Tcl web site. * Fixed tag. * Event logging is now much more efficient. * split_readarray is now more efficient. * Cleaned up server stats stuff a little. * Services servers are now accounted for in server stats. * A failed connection message appeared when an accepted message should have. * Removed some debug code I left in the script. * Removed a lot of on-load putlogs. * Removed log_lupdate. * General code cleanups. * Combined some .split status stuff. * Combined all raw parsing into one proc. * Added the "Data Recording Started" date to the end of the web page. * Added template support. * Removed Server Stats and added average hops and total linked to map. * Added a Max Splits table with graph. * Fixed a bad loop bug caused when HTML is generated right after getting a version reply from services. * Fixed a few bugs with !split. * Many cosmetic changes. * Greatly improved services checking support. * Removed some useless socket error messages. * Changed queuing around a little. * Added a 'Users' table. * 01/08/02: Beta 1 release to the |DAWG| Tcl web site. * Channel notification is now a channel setting. * Many huge cleanups. * Removed some extra settings. * 01/13/02: Beta 2 release to the |DAWG| Tcl web site. * Removed 'No Servers Split' messages. * Removed die lines. * More cleanups. * Fixed some bugs with .status/!split status. * Cleaned up split_do_netmap and renamed it to split_netmap. * Renamed 'Max Splits' table to 'Split Graph'. * Renamed 'Users' table to 'Network Users'. * Many cleanups to the HTML generating code. * Merged some arrays. * Removed all un-needed use of ()'s. * Cleaned up split_queue. * 02/09/02: Beta 3 release to the |DAWG| Tcl web site. * Fixed .split status again. * Added proper HTML indenting. * Added an option to not broadcast splits to all partyline users. * Added Page_GImg to the notpl autoset loop. * Fixed some template bugs. Version 4.0 * Released to the public from the |DAWG| Tcl web site. * Removed a few un-used checks. * Users without the flags required to use .split now see "What? You need '.help'" * Fixed another connection bug. * The server the bot is connected to is now formatted correctly if no servers are linked. * Removed more un-needed code. * Made .split backup use putdcc instead of putlog. * You can now also use .split del to delete a split server. * Removed all "There are more than 3 netsplits. Switching to a slower message queue to avoid flood disconnect." messages. * putserv is now used when there are less than 3 netsplits. * Removed all bold from channel messages. (missed a few before) * If for some reason data is missing (e.g. you manually called a proc before it should have been called), it is filled in as "Unknown" on the web page instead of returning an error. * The bot will no longer try to send data to channels it isn't on. * Fixed a few HTML errors. * Documentation updates. * Web page now fills unused fields with "-" instead of "Unknown". * A log event wasn't being added if a connection failed. * Fixed status again. * Cleaned up database backup code. * Added a HTML tag. Version 3.9 * Released to the public from the |DAWG| Tcl web site. * Fixed yet more no such element in array errors. * Fixed a major bug with non-DALnet services. * Fixed a bug with sending /LINKS before a connection was registered. * Removed some unused code. Version 3.8 * Released to the public from the |DAWG| Tcl web site. * Fixed more no such element in array errors. * Fixed some places where I was using list operations on strings. Version 3.7 * Released to the public from the |DAWG| Tcl web site. * Log-backup and clearing was broken again; fixed now. Version 3.6 * Released to the public from the |DAWG| Tcl web site. * Some HTML cleanups. * Centered the Network Map. Version 3.5 * Released to the public from the |DAWG| Tcl web site. * Fixed a missing-close-quote error. Version 3.4 * Released to the public from the |DAWG| Tcl web site. * Fixed some major bugs when your network only has one server. (Don't know why you need a netsplit script for one server, but heh :)) * Fixed a few more HTML bugs. Version 3.3 * Released to the public from the |DAWG| Tcl web site. * More init-server fixes. * Fixed a table spacing bug. * Reduced a lot of those TCL errors when LINKS hasn't been received yet. * HTML customization fixed. * Added more HTML customization options. * Cleaned up HTML code a lot. Version 3.2 * Released to the public from the |DAWG| Tcl web site. * I'm sorry the last version had so many problems, I messed up some regsubs and it caused some false split/rejoin messages. * Fixed a BIG timer bug. Version 3.1 * Released to the public from the |DAWG| Tcl web site. * Completely removed bold and the SPLIT: prefix in all messages to channels. * Fixed a bug in status. Version 3.0 * Released to the public from the |DAWG| Tcl web site. * Fixed a few stats bugs paulsen reported. * Added a command to list splits regardless of flags. * Added the option to change some of the formatting of messages sent to the channel. * Cleaned up some of the channel and dcc messages a little. * You can now completely customize the netsplit/rejoin/new link/relink messages on both dcc and the channel. * The bold-disable option now works for DCC chat. * Added the option to change font sizes and page title, and add and remove lines from the stats section, on the netstats page. * More documentation fixes. * Fixed a bug where sockets with refused connections were marked as failed. Version 2.9 * Released to the public from the |DAWG| Tcl web site. * Added the option to disable bold in channel messages. Version 2.8 * Released with e-mail authorization from the |DAWG| Tcl web site. * Added the option to display server names as mIRC links on the web page. You can enable/disable it by section. * Combined the code for the html network map and the dcc network map. * Combined the database variables into one array. * Removed some unused globals in the socket code. * Fixed a bug causing the pub netsplit list command to not work if more than 3 servers are split. * Fixed a bug in that occurs when networks change the DNS of a server to point at another server, causing the bot to not be on the server it thinks its on. * Added the option to detect netsplits from services and StatServ. * Renamed all putidx commands to putdcc for forward-compatibility reasons. * Fixed some pub help bugs. * Removed PHP support, PHP natively supports HTML. * Fixed some various bugs in the .split status code. * The netsplit is now announced after the connection is made, cutting down on flooding when a hub splits. * Converted some of the 'if {string == "otherstring"} {' into 'if {[string match string otherstring]} {'. * Divided settings into sections. * Rewrote description. * The HTML for the activity log is now created when the page is updated, so changes to the page layout take effect. * Removed the putlog when an array is reloaded from a file. This is normal operation and does not need to be lodged. * Shortened the HTML code a little bit. Lost some human-readability in the HTML, but decreased the filesize of the script and the page. * Added a "DelSplit" command to remove an absent split from the list. * Fixed a timer bug. Version 2.7 * Released with e-mail authorization from the |DAWG| Tcl web site. * Added a network map to the generated web page. * Added a backup command for backing up logs and databases manually. * Added a dcc map command for displaying a map of the network. * Added the option to disable portions of the web page, or disable it altogether. * Added the option to not automatically backup the databases at midnight. * Added the option to not automatically clear the activity at midnight. Version 2.6 * Released with e-mail authorization from the |DAWG| Tcl web site. * Added something to the bottom of the pub command list telling users how to get more info on a command. * Added version checking so the script will not attempt to run on anything but eggdrop 1.6.x. Version 2.5 * Released to the public from the |DAWG| Tcl web site. * Added statistics to the netstats page. Includes Average Hops, Max Hops, Server With Most Hops, Currently Linked Servers, Record Linked Servers, Currently Split Servers, Record Splits Per Server, and Most Frequently Split Server. * Removed an unused date regsub. * Cleaned up almost every proc by combining redundant code and removing unused code, reducing the size of the script, and improving speed. * Added a new column on the netstats page to keep record of each server's total split count. * Added more information to the status command. * Fixed a bug causing the script to save the database files up to 3 times in one proc. * Updated documentation. * The midnight backup no longer logs each file being backed up, just one "backup" event. * Added something to the bottom of the dcc command list telling users how to get more info on a command. Version 2.4 * Released to the public from the |DAWG| Tcl web site. * Fixed some help and documentation errors. * You can now change the "./!split" command. Version 2.3 * Released to the public from the |DAWG| Tcl web site. * Merged all of the script's commands into one .split syntax. * Added a flag for running script maintenance functions. * You can now set the default port to connect to when a server splits. * Fixed a logfile switch bug. * Reordered event detection so that netsplits are detected before other events, thus fixing a few bugs. * Cleaned up SaveArray/ReadArray procs. * Added a new event for when a server links to the network for the first time, fixing a bug. Version 2.1.9 * Released to a few beta testers. * Fixed a small array loading bug from 2.1 Version 2.1 * UnReleased. * Fixed some timestamp bugs. * Moved some procs around in a more logical order. * Fixed a few grammatical errors. * Fixed a bug with the nightly logfile switching. * Updated message queuing system. * Removed split_broadcast_links_update, replaced with split_log_update, which uses putlog instead of dccbroadcast. Version 2.0 * UnReleased. * Fixed some table formatting bugs. * Added meta tags to the generated page. * Now supports PHP. * Fixed some bugs having to do with switching logfiles. * The time of the last HTML/PHP update is now appended to the bottom of the page. * Added a "Connection" column to the event log table. * Updated credits and documentation. * Completely reworked the logfile system. Now uses only one logfile, making a backup daily before clearing it. * You can now change the output colors for the HTML/PHP page. * Added a command to update the HTML/PHP page manually. * The manual server check commands now only check the first arg of the text entered. A notice is now sent out when a user checks a server. * Added the option to log commands to the eggdrop logfile. * Added the option to not send a notice when a user enters a command. Version 1.9 * Released to a few beta testers. * Added dcc and public commands for manually checking a server's status. * Fixed some formatting bugs, and a minor socket error. Version 1.8 * UnReleased * Added some queue optimization to the public netsplit listing command. Results are displayed faster when fewer splits have occurred. * Changed how the logfiles are made/posted. * Formatting fixes for announcing splits. * Updated documentation. Version 1.7 * UnReleased. * Finally got the sockets working. * Cleaned up HTML output. * Bug fixes. Version 1.6 * UnReleased. * When a netsplit occurs, the script will now open a socket to the split server, and see if the connection: Timed Out, Is Refused, Failed, or Was Accepted. * More bug fixes. Version 1.5 * UnReleased. * Fixed some initialization bugs. * Combined procs for logging splits, relinks, and rejoins. * Combined procs for making the making html files. * Combined all 3 HTML files into one file, divided into sections. * Combined timers for saving the databases, and updating the links list. Version 1.4 * UnReleased. * All info is now saved, thanks to guppy's SaveArray and ReadArray procs. * A log of splits, joins, and relinks has been added. * Update timer was changed to the seconds format. Version 1.3 * UnReleased. * Added public and dcc commands for updating the links list manually. * Made many features setable and customizable. * Optimized message queuing. * More bug fixes. * Converted update interval to seconds. * Cleaned up code. Version 1.2 * UnReleased. * Added comments and settings. * Added dcc commands to list splits and send the links command. * Massive bug fixes. * Added very basic HTML. * Added event logging. Known Issues: NOTE: I am aware of these issues and do not consider them bugs. * When started for the first time, if services tracking is enabled, Services and Stats will be announced as a new link.