Table of contents
VooDoo cIRCle is an IRC (ro)bot.
Release version 1.0.53
Date: 2005-07-10
Bug fix: Stuck in the loop while "ERROR" response from IRC server while in authentication state.
Bug fix: *NIX: Registration timeouts.
Bug fix: *NIX: Strange message "513 nick :Your client may not be compatible with this server." from some exotic IRC servers, while bot on *NIX, but not on Win32. Thanks to Varun for reporting this.
Bug fix: Possibility of infinite loop ending with stack overflow in "on_internal_event" event procedure, when a C++ exception is thrown due to ".rehash".
Improvement: Win32: Binary distribution: Upgraded .dll's to OpenSSL-0.9.8 (major release from 2005-07-05) - see http://www.openssl.org/ .
Release version 1.0.52
Date: 2005-07-09
Bug fix: Non-critical bug, where user on DCC/telnet connection in some conditions stopped receiving PING? messages according to enabled "dcc_chat_ping_interval=xxx" ping period.
Bug fix: There was missing EOL sequence (\r\n on telnet, \n on DCC) connection while ".getfile <name_of_file>" failed due to reasons like "No such file", "Access denied", and "I/O error".
Bug fix: In certain conditions, if user is downloading file from filesystem, and issuing next ".getfile" command, s/he could get greeting as on DCC chat/telnet connection, instead of real file. Now fixed.
Bug fix: On DCC CHAT connection, there were \0x08 characters after password supplied, which should be only on telnet connection. Now fixed.
Bug fix: Forgotten to close file "logic.txt" after unsuccessful ".rehash", so roll-back to old configuration was malfunctioning.
Semi-bug fix: On DCC/telnet connection, there was in ".filesystem" -> ".editfile <name_of_file>" -> ".attr" nothing displayed if user wrote bad command, so it was confusing. Now displays list of available commands in this case.
Semi-bug fix: Errors reported in file "logic.txt": Now we are counting lines from one - not zero-based from now on. I've decided to do so, because many text editors count them from one.
Improvement: Added "on_internal_event" event, for better monitoring of your bot. See documentation.
Improvement: PING? message on DCC/telnet connection is now timestamped, and shows your idle time.
Improvement: Changed format of channel logs to much clever messages (believe me or not). Now shows actual mode of user (op, voice,...) for better orientation in logs.
Improvement: Channel logs now contains entries if an IRC operator is detected on channel by WHOIS on their JOIN, or bot's JOIN followed by WHOIS burst, and also if an IRC operator QUITs/PARTs/gets-KICKed.
Improvement: Added "dcc_always_want_nick" attribute to "conf.txt" file. See documentation.
Improvement: Bot now silently ignores user name and password on DCC/telnet connections that matches mask "### *" ('#' stands for one numeric character) for better compatibility with "/dcc chat 127.0.0.1:2010" command while using mIRC.
Release version 1.0.51
Date: 2005-07-01
Bug fix: If procedure in "logic.txt" for on_kick event of user with "host_bot" flag (the bot itself) contained command "join" to re-join channel, the command weren't performed.
Release version 1.0.50
Date: 2005-06-29
Bug fix: Forgot to close filesystem file after it has been sent to client. (Saving resources)
Bug fix: Forgot to close file "pass.txt" in certain conditions. (Saving resources)
Bug fix: PONG response to server's PING: forgotten colon separator between command and "comment" (PONG argument).
Bug fix: DCC invitation was not working if supplied address was compressed IPv6 address (containing "::" sequence).
Semi-bug fix: Fixed annoying PING? message on DCC/telnet connection that wasn't in order of "dcc_chat_ping_interval" interval.
Semi-bug fix: Less doubled messages on ".broadcastping" command (pinging all bots on BOTNET).
Improvement: Bot now detects DCC invitation IP address spoofing. Until now, it accepted any address passed to CTCP DCC invitation, now accepts only IP address that coresponds (afte DNS resolution) to user's host (nick!ident@HOST).
Improvement: If CPU load were *really* high, bot didn't get response to each 60 seconds' "keep-alive" WHOIS to itself in 120 seconds, you've seen quitting it by EOF from client and reconnect. Now timeout to receive response is 3 minutes, sending PING to server as "keep-alive" (WHOIS could be penalised!) each 30 seconds. Hope this will help.
Improvement: ".broadcastping" now receives also version of remote connected bot(s) - but only if both sides are version >= 1.0.50.
Improvement: Added "admin_msg" command to "logic.txt". See documentation.
Release version 1.0.49
Date: 2005-06-15
Bug fix: Bot could crash if there was attemp to run script which andiminstrator forgot to create (.php file).
Bug fix: Resolved problem while using ".getfile" command issued on private query when user's host wasn't numeric IP address, but DNS name.
Bug fix: There was incorrect timestamp reported when user read message/downloaded file.
Release version 1.0.48
Date: 2005-06-13
Bug fix: Old-style php scripting: user's mode had nick, not mode string.
Release version 1.0.47
Date: 2005-06-13
Improvement: Added list of groups for users to PHP scripting facility.
Improvement: Now bot logs a record to debug log if there are incorrect lines inside magic command section of script's output.
Release version 1.0.46
Date: 2005-06-10
Bug fix: Win32: Service didn't start up the bot if defined pre-startup idle was non-zero.
Release version 1.0.45
Date: 2005-06-09
Bug fix: On telnet connection, there was \n character instead of \r\n sequence while setting expiration on new FileSystem object.
Bug fix: Linker error unresolved external logic_on_flood() while using Dev-C++. (Still it should use implicit typecast while having "time_t" in header file and "int" in source file, like other compilers do.)
Bug fix: Now using ident username as argument to "USER" command, not nick.
Bug fix: If there was no access to log files (permission denied) there wasn't also write to console (if enabled).
Improvement: Made "library_php_2.inc.php" needed for "php_2" method scripting compatible also for earlier versions of php (<5).
(see documentation here, here and here)
Release version 1.0.44
Date: 2005-06-06
Semi-bug fix: PHP preprocessor sometimes returns error code 255, when there is parse error in the script, but it is also handled by set_error_handler(). Bot ignored output of script with return codes not equal to zero. Now accepts *everyting*, continues to seek for magick commands in the output.
Improvement: Less warnings on compile.
Release version 1.0.43
Date: 2005-06-05
Bug fix: When script runs longer than 10 minuters, the bot crashed.
Semi-bug fix: No message after ".filesystem" command, now tells to use ".help" to get available commands.
Release version 1.0.42
Date: 2005-06-04
Bug fix: PHP scripting: There was incorrect UserNotified value taken from OwnerNotified.
Bug fix: Fixed DCC SEND problem when someone requested file via ".getfile" as private query.
Bug fix: Bot wasn't remembering +b bans and +e exceptions when someone set it, while bot was already on channel.
Semi-bug fix: Added check whether the procedure is already defined (no overloading support!).
Improvement: Added "php_2" method for PHP scripting. See documentation.
Improvement: Added modes and topics of channel to PHP scripting support.
Improvement: When channel is +k (key-protected), and bot has tried all keys in history of keys listing, it schedules JOIN to 15 secods later (if someone removes key, or set key to one from the history of keys listing).
Release version 1.0.41
Date: 2005-05-30
Bug fix: Removed forgotten write (printf()) of debug string to console.
Bug fix: Win32: Turned off handle inheritance while spawning new instance by ".upgrade" and ".restart" commands causing not to close some handles.
Bug fix: Fixed missing string in file "lang01.txt" causing display of incorrect string when user with no password yet set logs-in to telnet connection. However, user logging in for the first time still needs to use DCC CHAT, not telnet for security reasons, or admin of bot should set them password.
Improvement: Better logging and copying log to console while ".restart" command. Now notifies in case of error spawning new instance, and writes real error code, in this case it is 2, in case of success it is 0.
Improvement: Win32: Service application ("vdcsvc.exe") gets now control over ".restart" command, so if it is used, bot on ".restart" command leaves respawning on it. This fixes problem after two ".restart" commands.
Release version 1.0.40
Date: 2005-05-25
Bug fix: No longer setting "internal mode" status on op/deop/voice/devoice, but when we do so, we wait for acknowledgement from IRC server (response). There was problem when bot was deopped and script told to op other users, bot thought that it has op (seen in ".stat" status). Occured sometimes on mass deopping (-ooo).
Bug fix: Don't send JOIN on "join" command if we are already on channel, don't send PART on "part" command if we are not on channel.
Bug fix: Win32: "NET_SEND" command was not working.
Semi-bug fix: We are not waiting now for response to MODE +b mask and KICK nick (commands "ban_mask" and "kick"), because these commands should be posted as soon as possible (takeover hot while).
Release version 1.0.39
Date: 2005-05-24
Bug fix: Automatic backup was invoked on also startup, now really after elapsing time period.
Bug fix: There was 20 seconds wait after KICK command, response from IRC server was ignored in error (in order to kill 20 seconds wait before next command).
Release version 1.0.38
Date: 2005-05-23
Improvement: Added ".apply" command, "access_to_apply", "access_grant_apply" rights. See docuemntation.
Improvement: Added "auto_backup_interval" attribute to "conf.txt" file. See documentation.
Improvement: Bot automatically backs-up configuration ("logic.txt") on die/restart/upgrade.
Release version 1.0.37
Date: 2005-05-22
Improvement/semi-bug fix: Now bot is doing "synchronous communication" with IRC server - always waits for response from IRC server after message, then sends next message (no WHOIS flood on startup!).
Improvement: Now using "MODES" parameter from 005 ISUPPORT message to find out how many modes can be used in "compressed mode" (for "MODES=3": MODE +ooo nick1 nick2 nick3), till now it was fixed to 3.
Improvement/semi-bug fix: Now after ".upgrade" command bot copies itself from "upgrade" dir to one level upper ("..") only once, not every while.
Release version 1.0.36
Date: 2005-05-17
Bug fix: Win32: Forgot to close unused handles for sub-processes, such as PHP script and sendmail after they exits, which consumed resources under Win32.
Improvement: Now we are accepting also PHP preprocessor in the SPACE character in path.
Bug fix: Linux/BSD: Fixed errors while trying to compile (depfiles problem).
Release version 1.0.35
Date: 2005-05-11
Improvement: Fixed *NIX build problems, updated documentation.
Release version 1.0.34
Date: 2005-04-27
Bug fix: Not correctly set argument to memset() as size of buffer in module botnet.cpp at various places (set 4 bytes instead of much more) causing on remote side of BOTNET connection possibility of false positive buffer overflow detected and closing connection while replication of "private definitions" section of logic.txt configuration file.
Bug fix: Forgotten debug string in win_sock.cpp/sock_connect() for my internal purposes to comment out.
Improvement: BOTNET packet receive code botnet.cpp/botnet_receive() completely recoded to be much clear code to understand.
Improvement: Buffer overflow detection routine recoded to be much clear code to understand.
Improvement: botnet.cpp module clean up of old commented out code.
Release version 1.0.33
Date: 2005-04-26
Bug fix: No more responses to CTCP quoted NOTICE's (RFC is saying strictly that there MUST NOT be automatic reply to NOTICE). However, CTCP request is only PRIVMSG, not NOTICE.
Bug fix: ...many forgotten bug fixes related to CTCP messages handling.
Bug fix: Packets received on BOTNET with commands from protocol BOTNET 5 and later were not fully functioning.
Security minor bug fix: There was possibility of buffer overflow while receiving specially crafted packet on BOTNET connection which could crash bot. Since the length of buffer was not tested inside the packet frame, but packet as whole was tested, there is not possibility of disclosure of sensitive information, nor execution of arbitrary code. However, it is still needed for intruder to know password of remote bot, and, if SSL connection is only allowed for remote bot, it needs correct client's certificate to process these crafted packets; without previous successful authentication it is not possible. (affected versions: from 1.0.20 to 1.0.32 inclusive)
Semi-bug fix: Fixed unknown mode +i panic warning in debug log on UnrealIRCd.
Improvement: Added on_broadcast event to catch IRC operators' PRIVMSG's and NOTICE's separately from other messages so far passed to private definitions section's on_privmsg and on_notice events - from now not.
Improvement: Added on_server_msg event to channel definition and private definition.
Improvement: Added informations about current IRC server host/port to PHP script.
Improvement: From now on, using YYYY-MM-DD style of timestamp in ChangeLog, as recommended international format of date, instead of YYYY/MM/DD :-)
Release version 1.0.32
Date: 2005/04/16
This release is to support developers and to support FreeBSD builing.
Semi-bug fix: If domain part of user's host mask contains "#" (hash) symbol, it is not passed to DNS resolver while compiling "logic.txt" (chacheing DNS names).
Bug fix: Segmentation fault on FreeBSD while unsuccessful DNS resolve.
Improvement: Now compilable and working well on FreeBSD.
Release version 1.0.31
Date: 2005/04/13
Bug fix: on_join event for user "unknown" was called twice.
Release version 1.0.30
Date: 2005/04/09
This release is to support developers and to support Linux builing.
Added: Documentation how to build using MSVC 7, Dev-C++ 4.9.9.1, GCC 3.3.2, KDevelop 3.
Updated: Project files.
Release version 1.0.29
Date: 2005/04/05
Bug fix: Attribute last_changed in various DCC/telnet administration routines was not properly updated.
Bug fix: .private command on DCC/telnet connection was not properly working.
Improvement: Now MD5-encoded (hashed) "passwords" in file "pass.txt" are compared case-insensitive.
Release version 1.0.28
Date: 2005/04/04
Bug fix: Deadlock in new user's .pl command (access to partyline number of lines/seconds to limit the flood).
Improvement: PHP scripts can now modify filesystem. See documentation.
Improvement: Added on_fnc event. See documentation.
Release version 1.0.27
Date: 2005/03/23
Bug fix: Corrected telnet EOL sequence on telnet connection while displaying message from filesystem (telnet uses \r\n, not just \n!).
Bug fix: Problem with accepting TCP connections on listening socket on Linux.
Semi-bug fix: Corrected message from filesystem splitting into multiple PRIVMSG's when sending as private query, it was splitted into multiple lines every 128 characters in filesys.cpp while reading the file + new line character (\n), which was ignored while counting; now it is correctly splitted in irc.cpp every 256 characters, or on new line character (\n), whichever comes first. So now we will have less number of PRIVMSG's.
Semi-bug fix: Fixed incompatibility while compiling with GCC.
Improvement: Now messages from filesystem (such as "Subject:", "Message from owner:", hints how to download file with DCC) can be also localized to more native languages (file "lang/lang01.txt").
Release version 1.0.26
Date: 2005/03/17
Improvement: Security: Remote bot on BOTNET need to have access_usage_procedure on event's procedure to change existing user's on_XXX events.
Improvement: Security: Remote bot on BOTNET need to have access_usage_procedure on event's procedure to set existing user's on_XXX events.
Improvement: Security: Remote bot on BOTNET need to have access_grant_can_send_unknown_users right to change or set user's can_send_unknown_users flag.
Improvement: Security: Procedures are replicated first, users then.
Improvement: BotNet: After pulling of new procedure, bot sets access_usage_procedure right to remote bot on that procedure.
Improvement: Flags access_usage_procedure can now contain string "*" (without quotes) indicating all procedures.
Release version 1.0.25
Date: 2005/03/16
Bug fix: Problem with socket communication - previous release is unstable.
Release version 1.0.24
Date: 2005/03/16
Bug fix: I/O error on socket was not reported to upper application layer.
Bug fix: "Address already in use" error on Win32 was not reported (SO_REUSEADDR bug in Win32).
Improvement: Added commands "delete_irc_servers" and "delete_nicks", so BOTNET protocol increased to 6 (while keeping backward compatibility). See documentation.
Release version 1.0.22
Date: 2005/02/13
Bug fix: .stats always enclosed host name of IRC server in "[]" (typo), now only for IPv6 addresses.
Bug fix: There could be conflict in writting of files "logic.txt", "pass.txt", and "filesystem/index.txt" in upgrade state of bot, if some user were changing password, or invoked .backup, or made change to filesystem in both instances of bot (now on old one, these functions are blocked).
Bug fix: Forgotten support for Botnet over IPv6 network.
Bug fix: Resolved Botnet linking problem due to dead connections.
Improvement: Added .showbots command. See documentation.
Improvement: Added .broadcastping command. See documentation.
Release version 1.0.21
Date: 2005/02/05
Improvement: Added .chpass command.
Release version 1.0.20
Date: 2005/02/02
Bug fix: Fixed strange problem related to change of one's nick.
Improvement: Added .upgrade command. See documentation. Increased BOTNET protocol version to 5.
Release version 1.0.19
Date: 2005/01/31
Improvement: Less CPU load consumption due to BOTNET connections.
Improvement: BOTNET/OpenSSL/security: Now checks incomming BOTNET via SSL client's certificate *really* against "ssl.txt"'s definition of that client's certificate (not only against trusted CA's). If this client has other client certificate, it is rejected.
Improvement: In PHP script, added +R reop hints ("reops") to array of channel dump (IrcNet).
Release version 1.0.18
Date: 2005/01/27
Bug fix: IDENT daemon emulation could be malfunctioning after redirect message from IRC server (Shutdown too soon).
Bug fix: If compiled with IPv6 support, in case of unsucessfull connect to IPv6 IRC host, there was always confusing message "Not compiled with IPv6 support" instead of real error reason (e.g. "Host not found").
Improvement: Added support for IPv6 IDENT daemon emulation. See documentation for command "bot_ident_ipv6". Increased BOTNET protocol to version 4.
Improvement: Now IPv6 address (if not given host, but numeric address) in log message "Connecting to" and "Using IRC server host/port" is enclosed in "[]"
...maybe some forgotten minor bug fixes...
Release version 1.0.17
Date: 2005/01/26
Bug fix: Security: Possible security flaw on WinNT, related to NET_SEND command.
Bug fix: Bad handling of escaped double-quote (\") in string parser for logic.txt file.
Release version 1.0.16
Date: 2005/01/19
Bug fix: On IRCnet, unique ID message has been parsed wrong way, and 043 numeric to force nick change to unique ID while in nick collision caused deadlock in infinite loop.
Bug fix: RPL_ISUPPORT (005 numeric) was parsed omitting first parameter.
Release version 1.0.15
Date: 2005/01/17
Bug fix: In the past, on_banned event could be called for some other user as well as for user who is actually banned on channel.
Release version 1.0.14
Date: 2005/01/11
Security bug fix: Lockout after numerous bad logins could had been malfunctioning, due to invalid argument to function inet_ntop().
Security bug fix: There could be attack on bot in the BOTNET without successful authentication of remote peer by sending incorrect packet sequence (but only with hacked sources, or if attacker spoofed that it is a bot).
Improvement: Now you can use in strings escaped characters like in C (\" \n \r \xAB etc...).
Improvement: PHP script can put as output "EXECUTE" command to execute procedure in file "logic.txt".
Improvement: Increased BOTNET protocol to version 3, there can be call of procedure on remote bot on BOTNET remotely. (on DCC/telnet console there is new command ".rproc").
Improvement: For security reasons and whishes to eliminate DoS attacks and to save memory resources, in the "conf.txt" file, there can be defined maximum DCC/telnet connections from one IP ("dcc_max_sessions_per_ip=3").
Bug fix: Redundant new line character in timestamp of filesystem event.
Release version 1.0.13
Date: 2005/01/10
Bug fix: In filesystem, notify messages for files: possibility of buffer overflow.
Improvement: Now the filesystem notify messagess for file are also checked for length ("msg_force_secure_lines" in "conf.txt" times 128 characters per line).
Improvement: Now bot should accept compressed IPv6 numeric notation syntax in host mask, and/or on receive it from IRC server as host for user ("123::4:5").
Improvement: In file "conf.txt" there can be now "dcc_max_message_size" set to number of maximum bytes for message - helps to control amount of memory resources.
Improvement: Now events in the filesystem are also timestamp-ed.
Release version 1.0.12
Date: 2005/01/09
Bug fix: Redirect to other server (if enabled) was malfunctioning.
Bug fix: Identd module shutdown is now on 001 numeric reply, not on any; if there was 020 (wait request) it was sutted down which could be abortive.
Release version 1.0.11
Date: 2005/01/05
Improvement: Security: Now can be specified DCC/telnet log in lockout after numerous bad login's. It is strongly recommended that you set "lockout_duration=300" and "lockout_count=5" in your "conf.txt" file! This can make intruder guessing password harder. Lockout is IP-address based, so bot remembers bad login's and records IP-addresses of origin. See documentation for users.
Bug fix: On non-Win32 platforms, there was logical error if "sock.cpp" in function "sock_async()" making all sockets blocking instead of non-blocking(!) - true / false exchange issue... (I recommend you not to drink another coffee, and go to sleep when you are overworked, or you'll make such mistakes! ;-)
Improvement: .die/.restart are now faster... removed redundant sleep()'s.
Bug fix: Sendmail: On non-Win32 platforms sendmail was not working.
Improvement: IPv6 support works also on non-Win32 platforms.
Improvement: On non-Win32 platforms added "irc_bot.lock" lock file to detect if there is not accidentally other instance running. On Win32 it was already handled in other way (try to unlink() fopen()'ed file).
...maybe some forgotten minor bug fixes...
Release version 1.0.10
Date: 2004/12/24
Improvement: Bot now parses RPL_ISUPPORT (005 numeric) message, which explains server's/network's features, such as list of modes and how to use them.
Improvement: Added command "raw" into procedure, so you can send raw data to server. Botnet protocol version 2 introduced. So if your procedure contains command "raw", this procedure will not be replicated to other bot which doesn't support Botnet protocol 2 (version <1.0.10) for compatibility reasons.
Improvement: Added file system listing to script, RPL_ISUPPORT parsed variables, and such informations.
Obsoletes: Setting "send_+R" in file "conf.txt" is now ignored for backward compatibility - now using RPL_ISUPPORT message for such informations.
Release version 1.0.9
Date: 2004/12/19
Fixed bug: Related to processing output / execution of php script on non-win32 platforms. Now 2 separate methods, one for win32, one for unix.
Improvement: Added CLI options.
Release version 1.0.8
Date: 2004/12/15
Fixed bug: Again, php script concurrency problem. Now works fine, long term various tests succeeded, it seems to be non-bugie-woogie.
Improvement: Faster filesystem operations (no more forced to save index file every moment in filesystem module, scheduled once per minute).
Release version 1.0.7
Date: 2004/12/13
Fixed bug: There was a poossiblity of crash due to bug in php script handling.
Fixed bug: Cycle channel failed if there were more than one channel to cycle.
Fixed bug: Checking of concurrency of php scripts was malfunctioning. Now really ony one php script (from same template) is executed.
Fixed bug: "link" command sometimes failed. Also botnet linking problem fixed.
Improvement: Botnet replication optimised - there is scheduling of backup + rehash now. It is done after 2 minutes from the last backup + rehash request from remote bot after object pulling, but new version of object will take effect even if backup + rehash is not executed yet.
Improvement: Bot should be compilable also under unices (tested uder i686 GCC 3.3.2 20031022 (Red Hat Linux 3.3.2-1)).
Improvement: Service (under win32) is not needed now, bot after .restart command tries to spawn itself, if succeeded returns BOT_DIE exit code, if not returns BOT_RESTART and leaves respawning on service.
Release version 1.0.6
Date: 2004/12/10
Fixed bug: Malfunctioning setting of user flags "access_to_replication" and "access_grant_replication" in DCC/telnet administration.
Fixed bug: .whois <user_name_mask> on DCC/telnet connection now gives much more (at least full basic) informations from user's definitions.
Fixed semi-bug: No more repeating groups in ".edituser"/".groups"/".add" in DCC/telnet administration. Each group is listed only once now.
Fixed semi-bug: In DCC/telnet administration ".edituser": redundant empty line.
Improvement: DIE's and RESTART's of the bot causes broadcasting kill message to all logged-in users on DCC/telnet (not BOTNET) connections ("DIE/RESTART by <user_name>").
Improvement: Rehashing of the bot (whichever is caused by user, or another bot in BOTNET) puts rehash message to all logged-in users on DCC/telnet connections.
Improvement: If .die/.restart commands has invoked user (not OS on Ctrl+C, service nor system shutdown), the same user gets full kill log with statistics to their console (DCC/telnet). That log is one that is written also to "logs/bot.log" as in previous versions.
Improvement: Added ping message on DCC/telnet (not BOTNET) connection to console to help detect if user is alive, or the connection was broken without notification from IP stack. This could prevent (in theory) hung "zombie" users on partyline. Ping message interval can be set by "dcc_chat_ping_interval=<seconds>" line in "conf.txt" file; zero for dissable.
Documentation: There was possibility of "motd.txt" file (for DCC/telnet connections) since first release; forgotten to notice it in documentation: now updated.
...maybe some forgotten minor bug fixes...
Release version 1.0.5
Date: 2004/12/09
Fixed bug: When on one channel bot got op, it thought that it is opped on every channel.
Fixed bug: Event on_other_mode was not working.
Release version 1.0.4
Date: 2004/12/08
Fixed bug: Undefined language string in file "lang01.txt" causing an empty string in DCC/telnet console.
Improvment: At BOTNET telnet/SSL connection sends at first PING, and after PONG is received sends password (this is check for SSL handshake validity).
Release version 1.0.3:
Date: 2004/11/21
Fixed bug: DCC chat login problem.
Improvement: Now DCC chat / send works over IPv6 too.
Release version 1.0.2:
Date: 2004/11/19
Fixed bug: in smart_mode enabled, there was problem when there was longer time
difference between IRC server's op/voice user after net split and time when bot
got the WHOIS on "new" users on channel.
Release version 1.0.1:
Date: 2004/11/17
Fixed bug related to unsuccessful reverse DNS lookup (entry wasn't inserted
to resolver cache correctly).
Release version 1.0.0:
Date: 2004/11/16
Initial revision by VooDooMan.
Note: If you want to join a mailing-list to get along with new releases, please send me a mail to ghostvoodooman [NOSPAM] (at) [NOSPAM] users (dot) [NOSPAM!] sourceforge (dot) net with subject "VooDoo cIRCle" (to know that your mail is not a spam).
Note, that configuration of this IRC bot is not as easy as configuration of
for example IRC bot Eggdrop.
Main logic of the bot is stored in file "logic.txt". This file contains:
user YOUR_BOT_NAME { last_changed 0 host_bot host "mybot!*mybot@host.org" member_of_group "bots" } user USER_NAME { last_changed 0 host "nick!ident@host.com" host "*!ident@another.host.com" full_name "I am an IRC user. My real name is unknown..." access_to_partyline 1 replication another_bot push access_grant_partyline 0 access_to_backup 0 access_to_rehash 0 access_grant_backup 0 access_grant_rehash 0 access_to_+user 0 access_grant_+user 0 access_to_+proc 0 access_grant_+proc 0 access_grant_replication 0 meta "key" "value" meta "description" "this is an user!" channel "#your_channel" { member_of_group "your_channel_user" on_deop revenge2($channel,$source,$target,$source_nick,$target_nick) on_ban revenge2($channel,$source,$target,$source_nick,$target_nick) on_kick revenge2($channel,$source,$target,$source_nick,$target_nick) on_banned banned($channel,$user,$ban_mask) on_privmsg msg_flood 3 10 notice_flood 3 30 repeat_flood 2 10 nick_flood 3 30 join_flood 3 60 mode_flood 5 10 allow_dynamic "super_users" "+@" "@" allow_dynamic "other_users" "+@" "+" dynamic1 dynamic2 can_send_unknown_users 1 } }Let's go to explain what it means.
user "another_bot" { host "a_bot!ident@host.org" full_name "This is another bot" replication_partner access_to_+user 1 }
There must be line "replication_partner" in order to link with this bot. You
should also set "access_XXX" privileges, that this another bot will have
access in your main bot.
Replication types can be:
1) "push" - this object (user, procedure or channel definition) will be pushed
to another bot, if that bot has an older version for that object
2) "pull" - this object will be pulled from another bot, if this bot has an older
version than other bot
3) "pushpull" - this object will be pushed or pulled to / from another bot,
the replication will be done, if one of them has older version of object
You could ask how the remote bot knows if it has older or newer version of
some object. There is "last_changed" property, which is set to current time
when the object is modified. Bots also sends to each other their current
system time, and computes time difference. If the object is older that 60
seconds, it will be replicated by specified replication rules.
Line "access_to_partyline 1" means, that this user has access to party line.
Party line is telnet or DCC connection to bot, often used for its
administration, or for chatting. If there is "0" (zero), user doesn't have
access.
Line "access_grant_partyline 0" means that user cannot grant access to party
line to other user. If there is "1" (one), user can.
Basic knowledge:
Flags "access_to_XXX" means, if user has access to feature "XXX",
Flags "access_grant_XXX" means, if user can grant access to feature "XXX" to
other user (if can set "access_to_XXX" flag for other user.
Flags "access_to_XXX" and "access_grant_XXX" is followed by space and number
of "0" (zero) or "1". "0" means no access, "1" means access is granted.
Other access flags has little bit similar meaning:
"access_to_backup": whether user can use ".backup" command at party line.
"access_to_rehash": whether user can use ".rehash" command at party line.
"access_grant_backup": whether user can grant access to usage of ".backup" command at party line.
"access_grant_rehash": whether user can grant access to usage of ".rehash" command at party line.
"access_to_+user": whether user can grant access to usage of ".+user" command
at party line.
"access_grant_+user": whether user can grant access to usage of ".+user" command at party line.
"access_to_+proc": whether user can grant access to usage of ".+proc" command
at party line.
"access_grant_+proc": whether user can grant access to usage of ".+proc" command at party line.
"access_grant_replication": whether user can modify replication parameters to
other bots on the botnet.
"access_to_restart": whether user can use ".restart" command on DCC / telnet
connection to restart the bot.
"access_grant_restart": whether user can grant to other one access to
".restart"
"access_to_die": whether user can use ".die" command on DCC / telnet
connection to shutdown the bot.
"access_grant_die": whether user can grant to other one access to ".die"
"access_to_filesystem": whether user has access to filesystem, thus can
upload, download files stored in local bot's filesystem directory.
"access_grant_filesystem" whether user can grant to other one access to filesystem
"access_to_private": whether user can modify "private" section of file
"logic.txt"
"access_grant_private": whether user can grant "access_to_private" right to
other users.
"access_to_can_send_all_users": whether user can send message /
file to all users (filesystem).
"access_grant_can_send_all_users": whether user can grant privilege to other
user to send message / file to all users.
"access_to_can_send_unknown_users":
whether user can send message / file to unknown users (according to flag "host_unknown")
"access_grant_can_send_unknown_users": whether user can grant privilege to other
user to send message / file to unknown users (according to flag "host_unknown")
"access_to_upgrade": whether user can use command ".upgrade". NOTE: You need to have at least version 1.0.20 of remote bot on the BOTNET in order to replicate this attribute to it.
"access_grant_upgrade": whether user can grant privilege to use command ".upgrade" to other user. NOTE: You need to have at least version 1.0.20 of remote bot on the BOTNET in order to replicate this attribute to it.
"access_to_apply": whether user can use ".apply" command.
"access_grant_apply": whether user can grant privilege to use ".apply" command to other user.
Let's go to channel definition for our "USER_NAME" user.
There are also meta-data used for PHP scripting. It is useful for example
for declension in PHP script in some human languages the bot to speak in. See PHP scripting section.
After word "channel" is name of the channel, in which user has some defined
rules. Note that name of channel MUST be in double-quotes.
Line beginning with "member_of_group" contains group membership of user on
this channel, in double-quotes.
Lines beginning with "on_" are events. These events contain name and
declaration of procedure, which is executed on specified event. Syntax is:
procedure_name($parameter1,$parameter2) and so on. Note that there must NOT be
any space character!
List of events that can be assigned to user on channel:
List of flood limits assigned to specific user on channel:
After specified flood keyword, there is number of occurrences and number of
seconds, delimited by space. For example:
msg_flood 5 10
means that when user posts 5 messages in 10 seconds, it will be considered as
flood, and specified procedure is called.
channel "#your_channel" { last_changed 0 member_of_group "my_channel" replication another_bot push on_mode mode($channel,$source,$source_nick,$plus_modes,$minus_modes) on_key key($channel,$source,$source_nick,$prefix,$key) on_limit limit($channel,$source,$source_nick,$prefix,$limit) on_ircop ircop($channel,$source,$source_nick,$on) on_privmsg proc_chan_msg($channel,$source,$source_nick,$msg) on_part part($channel,$source,$source_nick,$msg,$type) on_dynamic_ban dynamic_ban($channel,$source,$source_nick,$prefix,$ban_mask) on_ctcp ctcp($source,$source_nick,$channel,$command,$parameters) dynamic_ban "some!ident@host.org" "do not do a lame things!" partyline_dynbans_editors "super_users" allow_dynamic "super_users" "sp" "sp" dynamic1 dynamic2 }After word "channel", there should be name of your channel, in double-quotes.
Syntax:
proc_chan_msg($channel,$source,$source_nick,$msg)
Syntax:
part($channel,$source,$source_nick,$msg,$type)
Syntax:
dynamic_ban($channel,$source,$source_nick,$prefix,$ban_mask)
Notes:
Dynamic ban is ban, that doesn't need to be set on channel
(remember that most IRC networks limits number of bans on channel to 30), so
there is a list of dynamic bans, and when someone joins a channel and bot
detects that there is dynamic ban entry in its configuration, it can set ban
(for couple of minutes) and kick this user. In this procedure, it is useful to
check if $source user is member of group who can set/remove dynamic ban. The bot
doesn't remember dynamic ban, so you need to use "dynamic_ban" command to set
dynamic ban. Also, bot will not automatically set channel ban and kick user that
matches dynamic ban mask, you need to do it explicitly in logic.txt file in some procedure.
Syntax:
on_ctcp ctcp($source,$source_nick,$channel,$command,$parameters)
Parameters
See also private definitions of "on_ctcp".
Syntax:
on_server_msg server_msg($channel,$source,$type,$msg,$server,$port)
Parameters
See also private definitions of "on_server_msg".
Private definitions - handles private queries
private { last_changed 0 on_privmsg private_msg($source,$source_nick,$msg) on_notice private_notice($source,$source_nick,$msg) on_ctcp ctcp($source,$source_nick,$channel,$command,$parameters) on_filesys_got_new fs_got_new($user_name,$nick,$ident,$host,$internal_name) on_fnc fnc($old_nick,$new_nick) on_broadcast bdc($source,$source_nick,$source_ident,$source_host,$bcast_mask,$type,$msg,$server,$port) on_server_msg smsg($channel,$source,$type,$msg,$server,$port) on_internal_event internal_event($type,$timestamp,$time_string,$flags1,$flags2,$flags3,$flags4,$severity_numeric,$severity_string,$msg1,$msg2,$server,$port) }
Syntax:
private_msg($source,$source_nick,$msg)
Parameters
Syntax and parameters are same as "on_privmsg".
Syntax:
on_ctcp ctcp($source,$source_nick,$channel,$command,$parameters)
Parameters
Note: This event will be triggered also when user posts a CTCP request to
channel, together with channel's definition "on_ctcp" event. Your procedure will receive also "ACTION"'s.
"DCC", "PING" and "TIME"
should be ignored, because they are handled by the bot automatically. When
someone posts message "\001ACTION is doing a bugie-woogie style of
crashing\001", $command will contain "ACTION" and $parameters will contain
string "is doing a bugie-woogie style of crashing".
Syntax:
on_filesys_got_new filesys_got_new($source,$nick,$ident,$host,$internal_name)
Parameters
Note: This event will not be replicated to/from bot version < 1.0.28, that is BOTNET protocol version 7 due to compatibility reasons.
Your procedure should look like this:
See PHP scripting section.
Syntax:
on_fnc fnc($old_nick,$new_nick)
Parameters
Note: This event will not be replicated to/from bot version < 1.0.28, that is BOTNET protocol version 7 due to compatibility reasons.
Your procedure should look like this:
This attempts to change nick after 30 minutes and 2 seconds - on IRCnet is currently the old nick temporarily unavailable for 30 minutes after nick collision.
Syntax:
on_broadcast bcast($source,$source_nick,$source_ident,$source_host,$bcast_mask,$type,$msg,$server,$port)
Parameters
Note that if broadcast message is CTCP PRIVMSG, the proper event will be also called to process CTCP message.
Note: This event will not be replicated to/from bot version < 1.0.33, that is BOTNET protocol version 8 due to compatibility reasons.
Syntax:
on_server_msg server_msg($source,$type,$msg,$server,$port)
Parameters
See also channel definitions of "on_server_msg".
Note: This event will not be replicated to/from bot version < 1.0.33, that is BOTNET protocol version 8 due to compatibility reasons.
Syntax:
on_internal_event internal_event($type,$timestamp,$time_string,$flags1,$flags2,$flags3,$flags4,$severity_numeric,$severity_string,$msg1,$msg2,$server,$port)
Parameters
Types of events follows:
Note: Before rehash
Note: After rehash
Note: After successful roll-back
Note: After unsuccessful roll-back
Note: This could occur if bot wasn't spawned by service, and ".restart" command failed to re-spawn the bot.
Note: It will be fired if an IRC operator is found on some channel.
Note: There you can get informations about linking/delinking remote bots.
Note: It will be fired if replication event occur on BOTNET.
Note: You can use "if_match" and "!if_match" on "$type" argument to filter it out, and then command "admin_msg". To send ALL events, use procedure:
Basic knowledge:
You can use php-like scripting syntax. Note that scripting in logic.txt is poor, for advanced scripting you should use PHP script (see "SCRIPT" command, which executes a PHP script). There are some limitations: use only one SPACE as white-space (except of at beginning of the line), don't use semi-colon ";" at the end of the line, and beginning and end of block ("{" and "}" brackets) must be one separate line. Parsing engine should be advanced in future, it was written fast, just to fit basic syntax.
If the procedure contains in declaration, for example "$channel" and "$nick" variable, you can use this command for giving user +o status:
op HIGH $channel $nick
(see definition of "op" command)
Contatenating strings:
If you want to ban (+b) some user on specific channel, you can use this command:
ban_mask $channel "*!".$ident."@".$host
which means that ban mask will be set on channel name in variable "$channel". If we assume that "$ident" variable contains user's ident (for example "someuser") and "$host" variable contains user host (for example "user.host.org"), the ban mask will be "*!someuser@user.host.org". Note that there CANNOT be any space character between double-quote mark, dot and dollar sign.
For commands "op", "deop", "voice", "devoice", "msg", "msgq", "notice", "noticeq" and "chan_mode" there is first parameter indicating priority of action (it will be put to another buffer if "compress_mode_wait" inf conf.txt is non-zero). Commands "ban_mask", "unban_mask" and "kick" are always considered as HIGH priority. The valid priorities are:
Let's go to definition and usage of commands:
Definition:
Gives +o flag to user
Syntax:
op LOW "#channel_name" "nick"
Definition:
Gives -o flag to user
Syntax:
deop HIGH "#channel_name" "nick"
Definition:
Gives +v flag to user
Syntax:
voice LOW "#channel_name" "nick"
Gives -v flag to user
Syntax
devoice HIGH "#channel_name" "nick"
Definition:
Kicks user away from channel
Syntax:
kick "#channel_name" "nick"
Definition:
Sends user message as private message
Syntax:
msg LOW "nick" "message for you is here!"
msg LOW "#channel" "message for the channel!"
Definition:
Sends quoted message (message will begin and end with 0x01 character)
Syntax:
msgq LOW "nick" "" "ACTION says hello!"
So the result will be like:
PRIVMSG nick :<0x01>ACTION says hello!<0x01>
Note: If there is not an empty string for third parameter, you should add to end of second parameter a SPACE before ending quote, because second and third parameters will be concatenated together, but in between them there will be 0x01 character.
Definition:
Compares two strings or variables (case sensitive), if they are the same, executes next block in "{" brackets, if not, skips next block.
Syntax:
if_match $some_variable "check for this string" { msg LOW "nick" "Strings ARE the same!" }
Definition:
Compares two strings or variables (case sensitive), if they are NOT the same, executes next block in "{" brackets, if yes, skips next block.
Syntax:
!if_match $some_variable "check for this string" { msg LOW "nick" "Strings are NOT the same!" }
"if_match_case_insensitive" command
Definition:
Compares two strings or variables (case insensitive), if they are the same, executes next block in "{" brackets, if not, skips next block.
Syntax:
if_match_case_insensitive $some_variable "check for this string" { msg LOW "nick" "Strings ARE the same! (case insensitive comparsion)" }
"!if_match_case_insensitive" command
Definition:
Compares two strings or variables (case insensitive), if they are NOT the same, executes next block in "{" brackets, if yes, skips next block.
Syntax:
!if_match_case_insensitive $some_variable "check for this string" { msg LOW "nick" "Strings are NOT the same! (case insensitive comparsion)" }
Definition:
Scans if string as second parameter is a part of string as first parameter
Syntax:
if_in $some_variable "some" { msg LOW "nick" "String ".$some_variable." contains string \"some\"" }
Definition:
Scans if string as second parameter is NOT a part of string as first parameter
Syntax:
!if_in $some_variable "some" { msg LOW "nick" "String ".$some_variable." does NOT contain string \"some\"" }
Definition:
Checks if object named as first parameter is member of group specified in the second parameter.
Syntax:
if_group $some_user "group_of_super_users" { msg LOW "nick" $some_user." is member of group group_of_super_users!" }
Definition:
Checks if object named as first parameter is NOT member of group specified in the second parameter.
Syntax:
!if_group $some_user "group_of_super_users" { msg LOW "nick" $some_user." is NOT member of group group_of_super_users!" }
Definition:
Returns from procedure (terminates the execution of procedure).
Syntax:
return
Definition:
Sets a timer, and when specified time elapses, executes specified procedure, and then deletes a timer (executes it only once).
Syntax:
timer_once "name_of_timer" 0:00:05:00 unbanproc($channel,"*!".$ident."@".$host,$source_nick)
"0:00:05:00" means that timer executes procedure "unbanproc" after 0 days, 00 hours, 05 minutes and 00 seconds.
Definition:
Sets a timer, and when specified time elapses, executes specified procedure, and then resets time counter, and when time elapses again, it again executes a procedure. It doesn't deletes a timer.
Syntax:
timer_every "name_of_timer" 0:00:05:00 msg_to_user($nick,"Once again, 5 minutes has elapsed")
"0:00:05:00" means that timer executes procedure "msg_to_proc" after 0 days, 00 hours, 05 minutes and 00 seconds.
Definition:
Calls a procedure.
Syntax:
execute some_procedure($parameter1,"parameter #2")
Definition:
Sends an e-mail.
Syntax:
SMTP { server "mail.somehost.org" port 25 HELO "somehost.org" MAIL_FROM "MyBot@somehost.org" RCPT_TO "your_eamil@somehost.org" DATA From: My Bot <MyBot@somehost.org> To: VooDoo cIRCle administrator <your_email@somehost.org> Subject: WARNING! - $nick has de-opped me on channel $channel !!! . }
Definition:
Sends an administrator message.
Syntax:
NET_SEND "127.0.0.1" "BOT WARNING! Check your e-mail messages!"
or:
NET_SEND "your_computer_name" "BOT WARNING! Check your e-mail messages!"
Definition:
Writes a message to the log (file "logs/bot.log")
Syntax:
LOG "There is a log message"
Definition:
Joins a channel.
Syntax:
join "#your_channel"
join "#your_channel" "key"
Definition:
Parts a channel.
Syntax:
part $channel_name
Definition:
Disconnects from IRC server (should be called before connection commands)
Syntax:
disconnect
Definition:
Adds a server and port for later "try_connect" command
Syntax:
irc_server "irc.host.org" 6667 irc_server "irc2.host.org" 6667
Definition:
Tries to connect to IRC server, with values and order given by "irc_server" command, and moves server list iterator to the next server / port.
Syntax:
label again try_connect if_error { sleep 10 goto again }Notes: this sequence tries to connect to IRC server, if an error occured, it waits 10 seconds and jumps to label again (see "goto" and "label" commands)
Definition:
Sets the nick name of bot (you can define multiple nicks, for case that nick is taken over)
Syntax:
bot_nick "MyBot" bot_nick "MyBot2"
Definition:
Sets the bot's ident name. When the bot is connecting to IRC server, it enables the IDENT server (for IPv4 network), and after successful reply to ident request it shuts it down. Should be omited if OS has its own IDENT daemon.
Syntax:
bot_ident "MyBotRulez"Note:
Definition:
Sets the bot's ident name. When the bot is connecting to IRC server, it enables the IDENT server (for IPv6 network), and after successful reply to ident request it shuts it down. Should be omited if OS has its own IDENT daemon.
Syntax:
bot_ident_ipv6 "MyBotRulez"Note:
Definition:
Sets the full name of the bot.
Syntax:
bot_fullname "This is a VooDoo cIRCle bot! GNU rulez!"
Definition:
Sends authentication to IRC server.
Syntax:
label again disconnect bot_nick "MyBot" bot_nick "MyBot2" bot_ident "MyBotRulez" bot_fullname "This is a VooDoo cIRCle bot! GNU rulez!" bot_auth wait_if_error { disconnect sleep 60 goto again }
Definition:
Allows bot to use different server, if the IRC server is overloaded and sends on connect message saying "I am overloaded, so use this server/port instead"
Syntax:
allow_redirect 1
Definition:
Waits (do nothing) for specified time
Syntax:
sleep 30
Note: this exaple waits 30 seconds
Definition:
Bot exites with return code 2 (two), which means for parent process that bot wants to restart itself.
Syntax:
restart
Definition:
Send a notice message to specified nick
Syntax:
notice LOW "nick" "This is a notice!"
Definition:
Sends quoted notice (message will begin and end with 0x01 character)
Syntax:
noitceq LOW "nick" "" "VERSION VooDoo_cIRCle"
So the result will be like:
NOTICE nick :<0x01>VERSION VooDoo_cIRCle<0x01>
Note: If there is not an empty string for second parameter, you should add to end of second parameter a SPACE before ending quote, because second and third parameters will be concatenated together, but in between them there will be 0x01 character.
Definition:
Removes a ban mask (-b)
Syntax:
unban_mask $channel "*!*@*.org"
Definition:
Sets a ban mask (+b)
Syntax:
ban_mask $channel "*!*@*.org"
Definition:
Binds to specified IPv4 address and port, and listens on that port for DCC clients
Syntax:
dcc_server 0 "10.0.0.1" 2010 type
Notes: the first parameter (here is it zero) means that this is DCC server group zero. If it is zero, the dcc connection to bot can be established by sending "dcc" or "dcc 0" message to query of the bot. If it is, for example "1" (one), this DCC server will be accessible by sending "dcc 1" to query of the bot. You can specify more than one DCC server (each with different group number). For example one for WAN clients, and one for LAN clients, which resolves some proxy/firewall limitation issues.
"type" means type of DCC server. This parameter is optional. It can have values "chat" or "send". If it is a "chat", this DCC server is for chatting with bot, or when it is "send", it is for sending files. This is support for mIRC protocol, for commands /dcc chat IP_address:port
Example:
dcc_server 0 "10.0.0.1" 2010
dcc_server 1 "127.0.0.1" 2011 chat
dcc_server 2 "127.0.0.1" 2012 send
For some firewall issues, you can use this configuration, and connect to DCC CHAT or DCC SEND with mIRC by these commands:
/dcc chat 127.0.0.1:2011
/dcc send 127.0.0.1:2012
Note, that you need to set property key "127.0.0.1_dcc_user" in file "conf.txt", thus bot knows who is the one who connecting with loop-back IP address.
Definition:
Binds to specified IPv6 address and port, and listens on that port for DCC clients
Syntax:
dcc_server_ipv6 0 "fe80::210:a7ff:fe28:8b4d%5" 2013 type
(see "try_connect" command)
Definition:
Label checkpoint for "goto" command. Must be written BEFORE "goto" command.
Syntax:
label jump_here
Definition:
Jumps to specified "label". Must be AFTER "label" command.
Syntax:
label jump_here ... goto jump_here
Definition:
Returns ident name of specified nick
Syntax:
$ident=ident $source_nickNote: this command sets variable "$ident" to ident name of nick in "$source_nick" variable
Definition:
Returns host name of specified nick
Syntax:
$host=host $source_nick
Note: this command sets variable "$host" to host name of nick in "$source_nick" variable
Definition:
Executes an external script. Currently is supported only PHP.
Syntax:
SCRIPT "php" 1 $channel ($source_nick,$msg)
Note: The first parameter is type of script (must be always "php"). Second parameter is number of script in "conf.txt" file. Third parameter is name of channel to pass to script, and rest are parameters for that script.
Definition:
Binds to specified IPv4 address and port, to listen for telnet users and other bots in the botnet.
Syntax:
telnet_server "10.0.0.1" 4444
Definition:
Binds to specified IPv6 address and port, to listen for telnet users and other bots in the botnet.
Syntax:
telnet_server_ipv6 "::1" 4444
Definition:
Links to another bot on the botnet.
Syntax:
link telnet "other_bot" "0.0.0.0" "10.0.0.1" 6666 bot_unlinked("other_bot")
link telnet_ssl "other_bot" "0.0.0.0" "10.0.0.1" 6666 bot_unlinked("other_bot")
Note: The first parameter is type of connection (currently only "telnet" and "telnet_ssl" connection are supported) describes if to use plain binary telnet connection, or encapsulated in SSL tunnel. Note that for SSL connection, the other bot should have properly configured the certificate chain to use (see "ssl.txt"). Second parameter is name of remote bot (as in "logic.txt"). The third parameter is local IPv4 address to bind to. Fourth parameter is remote address for other bot. Fifth parameter is remote port. And last parameter is function to call when bot connection will be broken (this is useful to call "link" command in this procedure)
Definition:
After successful connect and authentication on IRC server, you should use this command. When connection to IRC server will be broken, bot will continue execution after this command.
Syntax:
work
Definition:
Changes the mode of channel.
Syntax:
chan_mode LOW "#your_channel" "+tn"
Definition:
Changes the nick of the bot.
Syntax:
change_nick "MyBot"
change_nick $nick
Definition:
Kills all timers that matches the mask by their name, so they won't be called anymore, until they are defined again.
Syntax:
kill_timers "timer_*"
kill_timers "timer_1"
Definition:
Returns channel mode of specified channel
Syntax:
$mode=get_chan_mode $channel
Note: this command sets variable "$mode" to channel mode of channel in "$channel" variable (e.g. "nt",...)
Definition:
Returns channel topic of specified channel
Syntax:
$topic=get_chan_topic $channel
Note: this command sets variable "$topic" to channel topic of channel in "$channel" variable (e.g. "There is a topic!", or an empty string for no topic)
Definition:
Sets a new topic for channel
Syntax:
topic $channel "A new topic!"
Definition:
Checks if there's an entry for dynamic ban
Syntax:
$match=check_dynamic_bans $channel $nick $reason
Notes:
Above command checks for dynamic ban entry on given channel and user on that channel with given nick, if there's an entry, it sets $match variable to "1", if not to "0". Also if there's a match, it sets variable $reason to dynamic ban's reason.
Future compatibility note:
For testing return value ($match here), use:
if_in $match "1"
Definiton:
Sets a dynamic ban entry
Syntax:
dynamic_ban $channel $prefix $ban_mask $reason
Definition:
Forces bot to process "on_banned" events if it finds out that some user(s) is banned. Useful to call after "ban_mask" command (see notes below).
Syntax:
process_on_banned $channel $nick."!".$ident."@".$host
Notes:
Do not call this command directly after "ban_mask" command, because bot has queue for commands to IRC server. Every command is placed there, and it waits for incoming "MODE" command from server as confirmation that ban was set. It can be useful call a procedure with this command approximately 5 seconds after command "ban_mask":
procedure process_banned($channel,$mask) { process_on_banned $channel $mask } ... $ident=ident $nick $host=host $nick ban_mask $channel $nick."!".$ident."@".$host kick $channel $nick $reason
timer_once "process_banned" 0:00:00:10 process_banned($channel,$nick."!".$ident."@".$host)
Definition:
Send raw command to IRC server.
Syntax:
raw HIGH "MODE ".$channel." +h someone" raw LOW "PRIVMSG ".$channel." :I have set mode +h to someone!" raw CRITICAL "KICK ".$channel." ".$nick." :Go away!"
Notes:
If your procedure contains this command, the whole procedure will not be replicated to bot of version <1.0.10, that is BOTNET protocol <2, for compatibility reasons, since this command was introduced in version 1.0.10.
Use "CRITICAL" priority at your own risk, because message with this priority class is sent immediatelly, thus there is no flood protection/check, and your bot could possibly end up with server's KILL (excess flood) if you'll send too much messages.
Definition:
Calls a procedure stored on remote bot on BOTNET.
Syntax:
$result=remote_execute "botname" some_procedure($parameter1,"parameter #2")Notes: This executes above procedure on bot named "botname". In the variable "$result" there will be stored string saying if it was successful. NOTE! You should test this string with command:
procedure test($channel,$what) { last_changed 0 remote_bot_call abc msg LOW $channel $what }If your procedure contains this command, the whole procedure will not be replicated to bot of version <1.0.14, that is BOTNET protocol < 3, for compatibility reasons, since this command was introduced in version 1.0.14.
Definition:
Erases server mask from irc server list. It is good to re-initialize list of servers before chunk of commands "irc_server".
Syntax:
delete_irc_servers "*"
delete_irc_servers "[*.org]:*"
delete_irc_servers "[irc.non-existing-domain.org]:6667"
Note: Domain of server must be enclosed in "[]" and port is defined after ":".
Note: If your procedure contains this command, the whole procedure will not be replicated to bot of version <1.0.24, that is BOTNET protocol < 6, for compatibility reasons, since this command was introduced in version 1.0.24.
Definition:
Erases bot's nick mask from nick list. It is good to re-initialize list of servers before chunk commands "bot_nick".
Syntax:
delete_nicks "*" delete_nicks "Nick*"
Note: If your procedure contains this command, the whole procedure will not be replicated to bot of version <1.0.24, that is BOTNET protocol < 6, for compatibility reasons, since this command was introduced in version 1.0.24.
Definition:
Sends an administrative message to local users, or to users on other connected bots (a message to DCC/telnet connections).
Syntax:
admin_msg "@telnet@" "Voo*Man" "Hello!" admin_msg "@telnet@" "*" "Bot is going down in 5 minutes for maintenance." admin_msg "@telnet@" "VooDooMan@*" "Hello VooDooMan on all connected bots!" admin_msg "@telnet@" "*@*" "Bot will be delinked and go down in 5 minutes."
Notes:
The first argument are flags telling where the message will go to, and SHOULD contain sub-string "@telnet@". In the future, there may be also other flags specified, now, others are ignored. If the string doesn't contain "@telnet@", nothing will be done.
The second argument is mask of users (using wildcards "*", "?", and "#" for one numeric character) to send message to. If they are connected to DCC/telnet connection, they will receive message. If this string contains at-sign ("@"), then follows mask of names of bots to send message to users on those bots. Names of users and bots used to match the specified mask are taken from user's / bot's name as defined in "logic.txt".
The third argument is the whole message.
Examples:
admin_msg "@telnet@" "*" "message here!"(will send message to all DCC/telnet-connected users, but LOCALLY connected, because here is missing "@" character.)
admin_msg "@telnet@" "user*" "message here!"(will send message to all DCC/telnet-connected users whose names - as name defined in "logic.txt" - begins with "user", but LOCALLY connected, because here is missing "@" character.)
admin_msg "@telnet@" "user*@bot2" "message here!"(will send message to all DCC/telnet-connected users whose names - as name defined in "logic.txt" - begins with "user", but only those connected to bot named "bot2" - as in file "logic.txt". This requires bot "bot2" to be currently linked.)
admin_msg "@telnet@" "*@*" "message here!"(will send message to all DCC/telnet-connected users on all connected bots.)
Note: The message will receive also user(s) who is connected to DCC/telnet connection, but it is not required them to be on any partyline channel.
Note: The message to other bot(s) is forwarded between all linked bots on all the BOTNET, and on remote bot it is passed to all linked bots on its side, to provide propagation of the message, but message is processed (e.g. sent to users) on one bot only if that bot's name matches bot name mask (which is following to at-sign in second argument).
Note (compatibility): If your procedure contains this command, the whole procedure will not be replicated to bot of version <1.0.50, that is BOTNET protocol < 10, for compatibility reasons, since this command was introduced in version 1.0.50.
Note (compatibility): Bot of version < 1.0.50 will also forward messages to other bots, but will not process it (e.g. will not show it to its locally-connected users).
Good tip. Administrators of multiple linked bot(s) will find useful this procedure:
set on this procedure right "access_usage_procedure" to yourself, and then use this commands on DCC/telnet connection:
.execute shutdown()This example will produce message similar to this on locally connected users:
*** ADMIN MESSAGE on Wed Jun 29 09:51:32 2005 received from bot (this local bot) sent to *: Bot will be restarted for maintenance, you will need to re-establish your DCC/telnet connection.
and on other linked bots:*** ADMIN MESSAGE on Wed Jun 29 09:51:32 2005 received from bot your_bot_name_here sent to *@*: Bot will be de-linked for maintenance.
This will inform users on partyline channels that something unusual will happen, to not to worry and not to spam you with messages on IRC saying "hey! why users connected to your bot has left our partyline channel, saying that botnet-split occured?!?! what are you doing with that bot?!".Let's got to explain what each line means:
You should start with this logic.txt file:
Botnet are two or more bots (of same vendor) connected together.
Basic knowlegde:
replication PUSH - means that this bot will push this object to another bot if it has an old version of object
replication PULL - means that this bot will request other bot to get object from it if it has a newer version of object
replication PUSHPULL - means that this and another bot will check who has newer version of object, and, if needed, it will be replicated
In order to replicate object (an user, procedure, channel definition, or private section), one bot need to be PUSH, the second PULL or PUSHPULL, or vice-versa, or both PUSHPULL.
Example to add to logic.txt file of bot1:
and bot2:
You can also add line:
replication bot_name push
to procedures, channel definitions and private section. Note that the other bot needs privileges, such as "access_to_+user 1" to add a new user. Since version 1.0.26, the remote bot needs to have locally flags "access_usage_procedure" on procedures which are assigned to user's on_XXX events; if event has already assigned procedure, it needs also this flag for old assigned procedure. Also, since version 1.0.26, remote bot needs to have also flag "access_grant_can_send_unknown_users 1" in order to change from "can_send_unknown_users 0" to "can_send_unknown_users 1", or vice-versa, to existing user, or to set to "can_send_unknown_users 1" to new user in process of creating/updating new/existing user.
You must also set password for this bot in pass.txt encoded via MD5 algorithm, and set it also to remote bot itself. You can use ".chpass" command on DCC/telnet connection, if you have "access_to_user" flag for that bot.
It is strongly recommended that all your bots on the botnet are connected in "mesh topology" - each one with each one. But do not connect your bot1 to link to bot2, and bot2 to link to bot1 - use only one connection to other bot. However, there is algorhitm to detect and kill these doubled connections attempts.
Example of link procedure:
and then call procedure "link_bot_once" in "_sys_startup" procedure.
There is another scenario used when we don't know predefined IP address of remote bot (DHCP), so we use for "on_join" event procedure "another_bot_join()":
Your PHP script should look like:
Note, that you need comment lines with strings "// INIT" and "// RESULT" keep untouched, since bot will replace them with channel information. Result code, that will be processed by php preprocessor will look like this:
The bot processes the output of PHP script (stdout pipe). So the result should look like this:
Which means than on second line raw NOTICE command put to queue with high priority to put to IRC server, on next one raw message for low queue, another one, deop some nick in critical mode (the raw message is sent IMMEDIATELLY to IRC server - which is not recommended, because multiple of these could violate flood rules on server, and your bot could end up with "excess flood" - should be used only for deopping and banning at critical moments). On another one, there is put log entry for channel "#channel" into logs, and on the last one, there is execution of procedure in "logic.txt" - this feature was introduced in version 1.0.14.
To modify filesystem attributes, use script that looks like:
Note that you need use doubled escape characters in NotifyUserMessage and NotifyOwnerMessage messages, so "\n" should be "\\n" in order to bot process it correctly, because "\n" will generate new line.
See section about filesystem too.
PHP scripting ("php_2" method)
Your PHP script should look like:
Note, that you need comment lines with strings "// INIT" and "// RESULT" keep untouched, since bot will replace them with channel information. Result code, that will be processed by php preprocessor will look like this:
The bot processes the output of PHP script (stdout pipe). So the result should look like this:
Which means than on second line raw NOTICE command put to queue with high priority to put to IRC server, on next one raw message for low queue, another one, deop some nick in critical mode (the raw message is sent IMMEDIATELLY to IRC server - which is not recommended, because multiple of these could violate flood rules on server, and your bot could end up with "excess flood" - should be used only for deopping and banning at critical moments). On another one, there is put log entry for channel "#channel" into logs, and on the last one, there is execution of procedure in "logic.txt" - this feature was introduced in version 1.0.14.
To modify filesystem attributes, use script that looks like:
Note that you need use doubled escape characters in NotifyUserMessage and NotifyOwnerMessage messages, so "\n" should be "\\n" in order to bot process it correctly, because "\n" will generate new line.
See section about filesystem too.
Note: When you are connecting via telnet, you MUST enter your "nick name", it is the name from "logic.txt" (user "your_name_here"), but it is case-sensitive, so "MyNaMe" is NOT the same as "myname"!
Note: Every command MUST begin with dot ("."), in other case, if you are on a partyline channel, it will go to the partyline chat.
Displays list of these commands.
Displays parameters for user as known in logic.txt (under user "your_name_here")
Examples:
.whois your_name_hehe
.whois your*
.whois *name*
Adds new user. You need enough privileges (access_to_+user).
Use this for editing an user. You need enought privileges (access_to_group XXX, and that user must be member of group XXX)
Adds new procedure. You need enough privileges (access_to_+proc).
Use this to edit a procedure. You need enough privileges (access_to_procedure XXX)
Use this to edit channel definitions.
You need enough privileges (access_to_channel)
Use this to add a channel definition.
Closes DCC / telnet connection.
Saves configuration to logic.txt
Note: This command should be followed by ".rehash" to make changes affected.
Rehashes configuration (reloads logic.txt)
Enters the filesystem.
Note: You need to have privilege ("access_to_filesystem").
See section filesystem.
Use this to store message in filesystem for another user
Gets file from filesystem.
Note: You need to have privilege ("access_to_filesystem").
The last parameter is optional, and indicates which DCC server to user (see dcc_server command for details).
Examples:
.getfile abc.txt
.getfile sound.mp3
.getfile abc.txt 1
Note: Name of the file is case-sensitive!
See section filesystem.
Enters the partyline channel.
Examples:
.partyline
(Enters partyline channel "partyline")
.partyline
my_channel
(Enters partyline channel "my_channel")
Leaves a partyline channel.
Restarts a bot.
Note: The bot MUST be invoked by service, in order to run again. In other case, it simply dies.
Note: You need privilege "access_to_restart".
Causes the bot to die.
Note: You need privilege "access_to_die".
Adds a new group of name <groupname>.
Tip: Always do this before you add a new object (user, procedure), in order to put it to a new group!
Edits a private query messages for bot.
Note: You need to have privilege "access_to_private".
Edits a replication parameters for objects.
Note: You need to have privilege "access_grant_replication".
Puts / removes user to / from terminator.
Note: You need to have enough privileges ("access_to_group XXX", and that user must be member of group XXX).
Changes current bot's language for current DCC / telnet connection.
Note: There is only english ("en") supported yet. I am searching for localizers! :-)
Parts (leaves) a channel, as first parameter is channel name and, optionally, following with reason
Examples:
.part #channel
.part #channel just testing :-)
Note: You need to have access_to_channel privilege on that channel.
Joins a channel as first parameter and, optionally, followed by channel key (if the channel is +k for key, this can be omitted, so bot will try every key that has in the key history for that channel)
Example:
.join #channel
.join #channel this_is_key
Note: You need to have access_to_channel privilege on that channel.
.rproc
By typing this command you can edit list of another bots on BOTNET wheter they can call procedures remotely. At default it is dissabled on all procedures. You'll get list of procedures of those you have access to ("access_to_procedure") to select one, and then you can edit list of bots for it.
This command has been introduced in version 1.0.20. It is for safer upgrading of your bot. Place new executable binary of new version into directory "upgrade", with name of file that doesn't contain space character. As a first parameter to this command use name of that file (plain, just a file name, not path!). At this moment bot will close any listening sockets (in order to new instance of bot could bind/reuse them), and in the console (the old bot) will inform you if new instance of bot, that will be ran, joins channels. This is done by comparing host and full name mask associated with user (bot) with "host_bot" attribute in file "logic.txt". Also, you will be informed when new instance of bot changes its nick, or if it have received "+o", "-o", "+v", and "-v" status on channels. If this mode change has origin of the old instance of bot, note that there is queue for "LOW" and "HIGH" priorities, for example, of command "op" in "logic.txt", so if you have "compress_mode_wait" enabled, it may take that numer of seconds (or few more) from you receive information in the console to real post the mode change to server. If the new instance is not detected to join another channel (the old bot is on) for 3 minutes, the old instance is automatically shuted down. You can force shut down by command ".die".
Note: You need to have "access_to_upgrade" privilege in order to use this command.
Changes password. Syntax:
.chpass <name_of_user> <new_password>
Note: Name of user is also case-sensitive. You can change your own password; if you need to change other user's password, you need to have access_to_group privilege on group that is that user member of.
Shows bots that are linked to local bot, and those which were delinked (marks them as "trying to connect").
Broadcasts to each connected bot ping message and shows pong's and their lag. Note that this is done by special partyline message, as you have had posted it to some channel, so bots in the Botnet are forwarding this message, thus you can get doubled results. This message is also limited by partyline flood limit setting.
Executes a procedure stored in "logic.txt".
Example:
.execute unban_user("#mychannel","nick!ident@host.org")
Note: You need "access_usage_procedure" right on procedure you want to execute.
This command causes re-validation of users on channels (something like "soft rehash"), e.g. who should get +o, or +v status. For example, if you want to delegate some user to be dynamic ban editor on some channel, and you don't want to give them "access_to_backup" and "access_to_rehash" rights, they should have "access_to_apply" right and use this command to apply changes they made. See section "Good tips" for explanation why you should not to give "access_to_backup" and "access_to_rehash" rights to common users, because ".backup" and ".rehash" in reverse order could be dangerous.
Note: You need "access_to_apply" right in order to use this command.
There are in the filesystem stored messages and files.
Files and messages are these attributes:
Inernal name (this is name of file stored in the filesystem, it is only for internal purposes)
Public name - this is original name of file from user who sent it, and it is representing the public name (.getfile <public_name> command). For case of message, this is the subject of the message.
Subject of the message (see Public name)
Time - timestamp of creation of the object.
Published - internal flag, indicating that the user who uploaded the file has set attributes.
Complete - internal flag, indicating that user has successfully uploaded the file via DCC SEND, or if file is not complete, thus user will be notified that it should try apply DCC RESUME, or DCC SEND to overwrite the file and upload it again.
Expiration - timestamp when will be object discarded.
Access attributes of the object:
OWNER - this flag is set if the user is owner, thus have right to delete object, or set attributes, and an expiration. Note that there can be multiple owners for one object.
READ - this flag is set if user can read the message, or download the file via DCC SEND.
DELETE - this right gives user right to delete the object from the filesystem.
SECURE - this flag is set if authentication before download the file / read the message is required (user is notified that it must connect via DCC CHAT, authenticate by password, and then it gets thru). Note, that there is "conf.txt" file, which contains value for key "msg_force_secure_lines", so if number of line of this message excess this value, message is automatically flagged as SECUREd, to prevent bot from flooding the IRC server with PRIVMSG.
NOTIFY_OWNER - this flag is set if owner(s) is (are) notified if someone have read the message or downloaded the file.
NOTIFY_USER - this flag is set if user who has READ permission should be notified to download file, or the message will be sent to them, or if there is SECURE flag set, it will be notified that it should connect via DCC CHAT and read the message.
Every object also has set of events, saying such as "user was notified according to flag NOTIFY_USER", "user has read the message", or "owner was already notified about someone has read message / downloaded the file".
VooDoo cIRCle service (Windows(TM) only)
enter directory with file "vdcsvc.exe"
run command "vdcsvc.exe -install"
Configuration file must be stored in "C:\vdc.txt"
First line is a path, where is located file "irc_bot.exe" and configuration files
Second line is a number of seconds to wait to run the bot, after the service has started. (This allows you to run more bots, avoiding IDENTD server conflicts).
Third line must contains only . (a dot)
Fourth line is path to next bot (as step 1.).
This example runs two bots.
There is possibility for these bots on BOTNET to talk via SSL to each other. Here is sample file describing certificates:
Note: All certificates must be in PEM format.
This means that bot will accept ONLY connecting client's certificate issued by CA's with its certificates stored in file "cert\CAs.crt" passed one by one.
As Telnet Server, it uses as server's certificate chain and key files "cert\server.crt" and "cert\server.key" respectively.
As a client connecting to other bot, it will use certificate chain and key files "cert\client.crt" and "cert\client.key" respectively.
And finally, "[abc]" section means, that when remote bot with name "abc" (from logic.txt file) connects, it will be checked against file "cert\abc.crt" (against its SHA1 hash) - this client should use this certificate.
Important security note: You should ALWAYS generate your own certificates, and/or certificates of your own Certification Authority due to security reasons. You should use default ones in distribution only for testing.
MOTD - Message Of The Day file
There could be "motd.txt" file (in the same directory as executable), which is copied to console when user successfully logs-in on DCC/telnet interface. This feature was there since first release, but it was forgotten in this documentation.When you creating new user, ALWAYS put them to group that you have "access_to_group" privilege, or you will not have access to them!
On DCC / telnet connection, you should type ".help" command to get available commands. Note, that you would not have access to some of them, unless you set it "logic.txt" or (if you have privileges) via DCC / telnet.
Always do ".backup" and then ".rehash" on DCC/telnet connection, not in reverse order, because ".rehash" flushes current configuration and reloads it from file "logic.txt" and you could lost your changes. You can consider using ".apply" in combination with "auto_backup_interval" attribute in "conf.txt" file
I hope, that this section will contain more information later, since this is the very first release.
Q: How can I delete user?
A: You cannot delete user, because of simple reason. When you would delete user, another bot in the botnet would find out, that bot on which you have deleted an user doesn't have this user, so the replication would cause to user exist again. Instead of deletion, you should use command ".terminator" in DCC / telnet connection, and set user as "terminator". Bot will flag this user as terminator, and update its last_changed value, so the record (with terminator flag) should replicate to all bots. If an user is "terminator", it tells the bot to
silently ignore them at all, but it still exists in the database.
Q: Which host masks/wildcards are supported?
A: You can use wildcard
"*" to match any or zero number of characters, "?" to match one character, or
"#" to match one numeral character (0-9) for nick, ident, or host. You can match
host by CIDR notation, but in this case, you can't use wildcards in host part.
If host mask is for instance "*!ident@0:0:0:0:0:ffff:10.0.0.2/120"
(any nick, "ident" as ident, and IPv4-mapped address "10.0.0.2" with CIDR 120
bit long) will match users with any nick, "ident" as ident, and IPv4 address
"10.0.0.x", where "x" is any number (0-255). So you can freely use IPv6
addresses, or IPv4-mapped IPv6 adresses, as well. IPv4 addresses, given by IRC
server, or you, will be converted to IPv4-mapped IPv6 address first. Another
example for host mask is "nick!ident@10.0.0.#",
which match user with "nick" as nickname, "ident" as ident and IP address
"10.0.0.x", where "x" stands for any one numeral character (0-9). For your
consideration: It should be better for this instance to use host mask "nick!ident@10.0.0.0/24",
which means that "x" can be number in range 0-255. You can also specify
wildcarded host name in the mask, such as "*!ident@*.net". If you specify exact
host name, such as "*!ident@host.net", the
bot will try to resolve it to IPv4 address, and then, if succeed, convert it to
IPv4-mapped IPv6 address and then check for match. Remember: Do not mix both
CIDR notation and wildcards in host name part of host mask, so host mask "*!ident@10.0.*.23/24"
is wrong.
Q: Does IPv6 host masks for IPv6 IRC users work even bot is not compiled with
IPv6 support?
A: Yes, it works. IPv6 support in VooDoo cIRCle is experimental, and fact that
it is compiled with this support means only that you can use IPv6 socket for
telnet user/bot connections. There is also IPv6 connection to IRC
server, and DCC CHAT/SEND thru IPv6 as well. However, if the bot is not compiled with IPv6 support, DNS resolving of IPv6 host (needed to satisfy host masks) will not work.
Q: How could I compile bot with IPv6 support?
A: Define global preprocessor
directive:
#define IPv6
or un-comment that one in file "params.h", but do not touch directive INET6 in match.cpp, because this code is hacked from
ircd for IRCnet, and it is only for matching IPv6 host masks, not for IP
traffic, so it must be defined to work properly.
Q: There is feature that supports recognition also by their "full name mask".
Can I turn it off?
A: The full name is field in the WHOIS command, initally set by USER command at
IRC protocol authentication. In some IRC clients it is "real name" field in
connection dialog. If you don't want to use this feature, you can simply set for
particular user full name mask of "*" wildcard, so it will match any full name.
Q: How can I compile this bot?
A: See documentation for your platform in the source package in direcory "voodoo_circle-src/docs/compile/".
If you have some questions, feel free to send me a mail to ghostvoodooman [NOSPAM] (at) [NOSPAM] users (dot) [NOSPAM!] sourceforge (dot) net. (Please use "VooDoo cIRCle" as the subject, so I will know that it is not a spam).
This IRC bot was developed and tested on Windows 2003 Server, using these compilers:
Microsoft Visual C++ 7 (.NET)
Borland C++ Builder 5 (Service pack 1) - but according to large .obj files, this compiler began to display an internal error, so it is no longer supported
Dev-C++ version 4.9.9.0
Successfully tested on IRCnet, UnderNet, UnrealIRCd.
I am now searching for "porter developer" who could port this bot to other Operating System(s). I am also searching for localizers, who could localize file "lang01.txt" to other languages. If you are, or you know some, please, send me a mail.
At first, thank to Jarkko Oikarinen for ideas and code for first IRC protocol, and to all the people who help to develop and keep IRC alive.
I would like to thank to MacO (http://www.cw.sk/) for founding name VooDoo cIRCle, and for logo for this bot.
My thanks also goes:
To Robey Pointer, and the Eggheads Development Team for developing IRC bot Eggdrop (for inspiration).
To http://www.sourceforge.net/, and Free Software Foundation, Inc. for great ideology.
To Pharmacy, for benzodiazepines, which are making a good mood for coding ;-) and also for Magnesium pills I am using to get energy when I'm beginning to be overworked.
And last, but not least, to caffeine and nicotine for better (but shorter) life ;-)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.