___________________________________________________________________ / \ | SPALEWARE LICENSE (Revision 0.1) | |-------------------------------------------------------------------| | This file is part of a package called "GenEthic" and is | | licensed under SPALEWARE. You may freely modify and distribute | | this package or parts of it. But you MUST keep the SPALWARE | | license in it! | | | \ __________________________________________________________________/ _________________________________________________________________________ / \ | GenEthic-Enhanced IRC Server Monitoring Bot | |_________________________________________________________________________| | | | Version : 1.0.0 | | Base Concept : Pascal Gloor & Mehmet Akcin | | Coder : MrIron | | Source : https://github.com/MrIron-no/genethic-enhanced | | | \_________________________________________________________________________/ HISTORY Original GenEthic: After getting my server linked to Undernet, I had some ideas about having a bot, not like the others, but more like looking after what the server is doing, how many users connecting, and it's general healthy. Then I wrote the original GenEthic bot, which was not desgined for portability to another server, all it functions were 'hardcoded' and so on. That's why I decided to rewrite it completly and that's also why you are reading this now ;-P GenEthic-Enhanced: After Oslo.NO.EU.UnderNet.org resurfaced and linked in 2024, we found this great service on the still-existing website of Geneva.CH.* from back-in-the-days. The bot is almost the same - but with some new additional features. REQUIREMENTS Operating System requirements: - perl 5.004 or better - perl IO:Socket module - web server (optional) - MRTG (optional) IRC Server requirements: - Running ircu2.10.11.06 (available at http://coder-com.undernet.org) note: this bot is NOT compatible with any other IRC daemon! - An o line(local oper) for the bot with the following privileges: walk_lchan = yes; deop_lchan = yes; see_chan = yes; # Only if locgline is enabled unlimit_query = yes; # Only if locgline is enabled rehash = no; local_jupe = no; local_gline = no; # Yes if locgline is enabled. - A Class block with at least 3Mbytes of SendQ. - Enable the following features in your ircd.conf: "CONNEXIT_NOTICES" = "TRUE"; INSTALLATION Simply run the configuration software: ./install <absolute_path_to_install> [--force] --force force the creation of the directory Example: ./install /home/genethic Once the installation is done, edit the configuration file, take your time, dont stress, it should be understandable for any OPER/ADMIN with some experience. Everything is explained for each option of the configuration file. cd /path/to/genethic/etc cp sample.conf genethic.conf vi genethic.conf UNDERSTANDING BOT CHANNEL OUTPUT Once your bot is running it will output some informations to the channel every 5 minutes (may be changed in the config). Example: -bot:@&channel- @ COUNT -> 6454(5.60%)/115338 (+208/-246). No 4/29. 48620(+9)chans, 67 unknown -bot:@&channel- @ RPING -> hub2:25(+3) -- hub3:19(-7) -- hub4:47 -bot:@&channel- @ UPLINK -> hub1[rp:19(+4) sq:0 up:1d0h53m] -bot:@&channel- @ TRAFFIC-> xl0 904/2471 kbps 1705/1599 pps xl1 209/49 kbps 52/38 pps on the first line, in the order the fields appear: - number of users on the local server - percentage of local users compared to global users - number of global users - number of users who connected in the last 5 minutes - number of users who disconnected in the last 5 minutes - position of the local server (regarding the amount of users) - number of global server (having at least 5 users) - number of channels - number of more/less channels since 5 minutes - number of unknown connections (as seen in /LUSERS) on the second line: - the last received rping results of all the hubs configured in your server config to which the server is not linked. on the third line: - last received rping result and sendq result for linked server(s) and uptime. rping values are in miliseconds. on the fourth line(1): - traffic status for all the local interfaces(2). its always shown in the format in/out, first 'kbps' then 'pps' (packets per second). USAGE OF THE BOT Once everything is correctly configured, the bot should take place in its channel. You can talk to the bot by PRIVMSG or NOTICE. The bot will also INVITE you to the channel as soon as you use the OPER command. Once in the channel you may communicate with the bot. Most of the stuff happens thru the DCC interface. simply '/msg bot dcc <listen ip>' and the bot will start a dcc. you'll need a password to connect to the dcc and it will be given by the bot in the channel. -> *bot* dcc -bot:@&channel- @ your_nickname requested DCC, code is xy note: if you're running mIRC and you're tired of copying the code from the channel to the DCC, add this to your 'REMOTE' commands. on 1:NOTICE:*:&channel:{ if ( $me $+ ?requested?DCC??code?is iswm $2-6 ) { .timerDCC1 4 1 .echo = $+ $nick mIRC Script: Please wait, your password will be sent to the session in a few seconds .timerDCC2 1 5 .msg = $+ $nick $7 halt } } On another side the bot is putting information into a file at each update (as defined by configuration) in var/genethic.log You can use the informations in this file to do some MRTG Graphs or others... A tool has especially been written for that. look into your 'bin' directory and you'll see 'runmrtg.pl'. just run this script and you'll have nice and cool graphs setup in the 'mrtg' directory. Then you can simply copy the 'mrtg' directory using an ftp script or whatever to your favorite website. Be SURE to protect the graphs. kiddies love to see the graphs drawing buildings while they attack your server! The bot supports iPhone push notifications throgh pushover, and each user tokens can be added to the configuration file. As a new feature, the bot has a "hub mode" which will ommit client statistics. In hub mode, the rping reporting for non-connected C/N's will be limited to other hubs (i.e. with the H flag in /stats v). Reporting to the back channel can be deactivated in the config. The back channel will then only receive warnings. The bot will continue to create the stats files which can be utilised by MRTG or Munin. Inluded are also munin-plugins to show stats on number of channels, global and local clients rping and sendq. And now, HAVE FUN! COPYRIGHT For more information concerning the copyright of this software, please have a look at the file 'LICENSE' in this directory. EOF