From 4679dc8b96b3c9f8d168ce8c71f54ce2cf345899 Mon Sep 17 00:00:00 2001 From: unknown_lamer Date: Wed, 29 Jun 2005 20:19:45 +0000 Subject: [PATCH] [project @ 2005-06-29 20:19:45 by unknown_lamer] Fixed --disable-scripting build and release 2.1.8 --- ChangeLog | 6 ++ NEWS | 2 + bobot++.info | 175 ++++++++++++++++++++++-------------------------- configure.ac | 2 +- source/Bot.C | 4 +- source/Parser.C | 5 +- 6 files changed, 95 insertions(+), 99 deletions(-) diff --git a/ChangeLog b/ChangeLog index a16c8cb..be6a68a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-06-29 Clinton Ebadi + * configure.ac: Release 2.1.8 + + * source/Parser.C: Include Commands.H (fixes --disable-scripting build) + + * source/Bot.C (Bot): Fix to make a --disable-scripting build work + * bobot++.texinfo (Configuration): Swapped order of config file placement and config files (User Levels): users not found in the user list *can* execute diff --git a/NEWS b/NEWS index 1f413ec..cd76ce7 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,8 @@ Version 2.1.8: embedded newline + Max nick length is now configurable via 'maxnicklength' option in bot.conf (defaults to 9) +- The bot now builds with --disable-scripting again (this is my fault, + I haven't built without it in a long time) Version 2.1.7: diff --git a/bobot++.info b/bobot++.info index 735a438..b60c532 100644 --- a/bobot++.info +++ b/bobot++.info @@ -42,8 +42,8 @@ Texts. Configuration -* Configuration Files:: * Configuration File Placement:: +* Configuration Files:: Configuration Files @@ -100,13 +100,25 @@ example configuration. * Menu: -* Configuration Files:: * Configuration File Placement:: +* Configuration Files:: + + +File: bobot++.info, Node: Configuration File Placement, Next: Configuration Files, Prev: Configuration, Up: Configuration + +2.1 Configuration File Placement +================================ + +Bobot++ will look in `/etc/bobotpp/default/' for its default config if +none is specified on the command line. Put the configuration files you +want to be loaded by default in this directory. If you are not root or +you want to have your own personal configuration, put it in +`~/.bobotpp/config/default/'.  -File: bobot++.info, Node: Configuration Files, Next: Configuration File Placement, Prev: Configuration, Up: Configuration +File: bobot++.info, Node: Configuration Files, Prev: Configuration File Placement, Up: Configuration -2.1 Configuration Files +2.2 Configuration Files ======================= * Menu: @@ -117,7 +129,7 @@ File: bobot++.info, Node: Configuration Files, Next: Configuration File Placem  File: bobot++.info, Node: bot.conf, Next: bot.users, Prev: Configuration Files, Up: Configuration Files -2.1.1 bot.conf +2.2.1 bot.conf -------------- * Menu: @@ -165,7 +177,7 @@ configuration variables are listed below in the format "VARIABLE  File: bobot++.info, Node: server syntax, Next: channel syntax, Prev: bot.conf, Up: bot.conf -2.1.1.1 server syntax +2.2.1.1 server syntax ..................... SERVER = SERVER_NAME [PORT [PASSWORD]] @@ -184,7 +196,7 @@ to multiple servers at a time in a usable manner).  File: bobot++.info, Node: channel syntax, Prev: server syntax, Up: bot.conf -2.1.1.2 channel syntax +2.2.1.2 channel syntax ...................... CHANNEL = NAME:INITIAL_MODES:MODES_TO_KEEP:CHANNEL_KEY @@ -211,7 +223,7 @@ attempt to maintain any modes.  File: bobot++.info, Node: bot.users, Prev: bot.conf, Up: Configuration Files -2.1.2 bot.users +2.2.2 bot.users --------------- `bot.users' is the default file name of the userlist. It may be changed @@ -236,23 +248,6 @@ in `bot.conf'. The file contains lines with the format: operator priviliges on channel entry (*Note Automatic Op::). - -File: bobot++.info, Node: Configuration File Placement, Prev: Configuration Files, Up: Configuration - -2.2 Configuration File Placement -================================ - - [ I kinda think this should go before the detailed description of - the config file. I was didn't see it at first and was very - frustrated trying to find out _where_ to edit all this wonderful - stuff. ] - - Bobot++ will look in `/etc/bobotpp/default/' for its default config -if none is specified on the command line. Put the configuration files -you want to be loaded by default in this directory. If you are not root -or you want to have your own personal configuration, put it in -`~/.bobotpp/config/default/'. -  File: bobot++.info, Node: Using the Bot, Next: Scripting, Prev: Configuration, Up: Top @@ -321,9 +316,8 @@ File: bobot++.info, Node: User Levels, Next: Protection, Prev: Starting the B There are several user levels available in Bobot++ to provide gradated access to commands. `!adduser' and `bot.users' use the numeric code; Scheme uses the textual name for the level. By default (if no catch-all -setting is found in *Note bot.users::.) a user is not even a -`bot:user-none' and cannot execute *any* commands, even commands -available to `bot:user-none'. +setting is found in *Note bot.users::.) a user has access to commands +with the level `bot:user-none'. 0. `bot:user-none' - No *built-in* commands may be executed _by default_ (commands may be added from Scheme that can be executed @@ -609,17 +603,10 @@ File: bobot++.info, Node: Hook Types, Prev: Creating a Hook, Up: Hooks ---------------- Here is a list of the various hooks funtions and notes on each one. The -general format of each hook description is as if it was was function to +general format of each hook description is as if it were a function to be defined, but these describe the function to be passwd to `bot:add-hook'. Do _not_ name your functions these names. - [ Boy, that's clumsy. I want to say that the hook/xx functions - that are documented below are not funtions that you call. They - are the functions that needs to be passed to bot:addhook for that - kind of hook. - - Still clumsy. Oh well. ] - That said, here is the list of available hooks functions. FIXME: write docs @@ -770,14 +757,14 @@ before using these. If you have no idea what these do, read rfc 2812 `*unspecified*' always, so don't use the return value for anything. -- Function: bot:send-ctcp to command message - `to' is the target of your CTCP message, `command' is the CTCP - command, and `message' is the message (or arguments) of the - command. Make sure to `bot:ctcp-quote' the message! + TO is the target of your CTCP message, COMMAND is the CTCP + command, and MESSAGE is the message (or arguments) of the command. + Make sure to `bot:ctcp-quote' the message! -- Function: bot:send-ctcp-reply to command message - `to' is the target of your CTCP reply, `command' is the CTCP - command, and `message' is the message (or arguments) of the - command. Make sure to `bot:ctcp-quote' the message! + TO is the target of your CTCP reply, COMMAND is the CTCP command, + and MESSAGE is the message (or arguments) of the command. Make + sure to `bot:ctcp-quote' the message! This is used to reply to a ctcp that the bot has received. @@ -794,7 +781,7 @@ might want to know. bot:exit-hook THUNK' where THUNK is an argumentless procedure (a thunk). When the bot exits your thunk will be called. - [ I didn't know where to put any of these, so I jsut stuck them in + [ I didn't know where to put any of these, so I just stuck them in here. There probably needs to be several sections added, like dealing @@ -1126,32 +1113,32 @@ Function Index (line 145) * bot:use-module: Misc Scripting Stuff. (line 188) -* hooks/action: Hook Types. (line 22) -* hooks/ctcp: Hook Types. (line 36) -* hooks/ctcp-reply: Hook Types. (line 38) -* hooks/dcc/chat-begin: Hook Types. (line 83) -* hooks/dcc/chat-message: Hook Types. (line 87) -* hooks/disconnect: Hook Types. (line 40) -* hooks/flood: Hook Types. (line 46) -* hooks/invite: Hook Types. (line 48) -* hooks/join: Hook Types. (line 50) -* hooks/kick: Hook Types. (line 52) -* hooks/leave: Hook Types. (line 54) -* hooks/message: Hook Types. (line 59) -* hooks/mode: Hook Types. (line 57) -* hooks/nickname: Hook Types. (line 30) -* hooks/notice: Hook Types. (line 61) -* hooks/part: Hook Types. (line 55) -* hooks/public: Hook Types. (line 63) -* hooks/public-notice: Hook Types. (line 65) -* hooks/raw: Hook Types. (line 67) -* hooks/send/action: Hook Types. (line 79) -* hooks/send/ctcp: Hook Types. (line 81) -* hooks/send/message: Hook Types. (line 77) -* hooks/send/public: Hook Types. (line 75) -* hooks/signoff: Hook Types. (line 34) -* hooks/timer: Hook Types. (line 69) -* hooks/topic: Hook Types. (line 73) +* hooks/action: Hook Types. (line 15) +* hooks/ctcp: Hook Types. (line 29) +* hooks/ctcp-reply: Hook Types. (line 31) +* hooks/dcc/chat-begin: Hook Types. (line 76) +* hooks/dcc/chat-message: Hook Types. (line 80) +* hooks/disconnect: Hook Types. (line 33) +* hooks/flood: Hook Types. (line 39) +* hooks/invite: Hook Types. (line 41) +* hooks/join: Hook Types. (line 43) +* hooks/kick: Hook Types. (line 45) +* hooks/leave: Hook Types. (line 47) +* hooks/message: Hook Types. (line 52) +* hooks/mode: Hook Types. (line 50) +* hooks/nickname: Hook Types. (line 23) +* hooks/notice: Hook Types. (line 54) +* hooks/part: Hook Types. (line 48) +* hooks/public: Hook Types. (line 56) +* hooks/public-notice: Hook Types. (line 58) +* hooks/raw: Hook Types. (line 60) +* hooks/send/action: Hook Types. (line 72) +* hooks/send/ctcp: Hook Types. (line 74) +* hooks/send/message: Hook Types. (line 70) +* hooks/send/public: Hook Types. (line 68) +* hooks/signoff: Hook Types. (line 27) +* hooks/timer: Hook Types. (line 62) +* hooks/topic: Hook Types. (line 66)  File: bobot++.info, Node: Variable Index, Prev: Function Index, Up: Top @@ -1178,30 +1165,30 @@ Tag Table: Node: Top527 Node: Introduction1816 Node: Configuration2008 -Node: Configuration Files2295 -Node: bot.conf2510 -Node: server syntax3948 -Node: channel syntax4812 -Node: bot.users5655 -Node: Configuration File Placement6558 -Node: Using the Bot7260 -Node: Starting the Bot7510 -Node: User Levels9019 -Node: Protection10475 -Node: Automatic Op11083 -Node: Built-In Commands11372 -Node: Scripting18351 -Node: Adding New Commands19316 -Node: Hooks20639 -Node: Creating a Hook21479 -Node: Hook Types22662 -Node: Scheme User Levels25691 -Node: Sending Messages26825 -Node: High Level Message Functions27441 -Node: Low Level Message Functions28221 -Node: Misc Scripting Stuff29296 -Node: Concept Index35872 -Node: Function Index36091 -Node: Variable Index46222 +Node: Configuration File Placement2295 +Node: Configuration Files2795 +Node: bot.conf2988 +Node: server syntax4426 +Node: channel syntax5290 +Node: bot.users6133 +Node: Using the Bot7036 +Node: Starting the Bot7286 +Node: User Levels8795 +Node: Protection10197 +Node: Automatic Op10805 +Node: Built-In Commands11094 +Node: Scripting18073 +Node: Adding New Commands19038 +Node: Hooks20361 +Node: Creating a Hook21201 +Node: Hook Types22384 +Node: Scheme User Levels25151 +Node: Sending Messages26285 +Node: High Level Message Functions26901 +Node: Low Level Message Functions27681 +Node: Misc Scripting Stuff28744 +Node: Concept Index35320 +Node: Function Index35539 +Node: Variable Index45670  End Tag Table diff --git a/configure.ac b/configure.ac index 9831ba6..423ca02 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PRERQ(2.50) -AC_INIT([Bobot++], [2.1.8CVS], [clinton@unknownlamer.org], [bobotpp]) +AC_INIT([Bobot++], [2.1.8], [clinton@unknownlamer.org], [bobotpp]) AC_LANG([C++]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) diff --git a/source/Bot.C b/source/Bot.C index af8cb31..0260d93 100644 --- a/source/Bot.C +++ b/source/Bot.C @@ -80,9 +80,9 @@ Bot::Bot(String filename, bool debug_on) receivedUserhostID(0), logFileName(DEFAULT_LOGFILENAME), logs_dir (DEFAULT_LOGDIR), - configFileName (filename), + configFileName (filename) #ifdef USESCRIPTS - scriptLogFileName(DEFAULT_SCRIPTLOGFILENAME), + ,scriptLogFileName(DEFAULT_SCRIPTLOGFILENAME), autoexecFileName(DEFAULT_AUTOEXECFILENAME) #endif { diff --git a/source/Parser.C b/source/Parser.C index cbecfe7..7c7a1a4 100644 --- a/source/Parser.C +++ b/source/Parser.C @@ -26,6 +26,7 @@ #include "StringTokenizer.H" #include "Parser.H" #include "UserCommands.H" +#include "Commands.H" #include "Macros.H" #include "Utils.H" #include "ShitList.H" @@ -427,9 +428,9 @@ Parser::parseJoin (ServerConnection * cnx, Person * from, String rest) && !(ch->getUser (n)->mode & User::OP_MODE) && cnx->bot->iAmOp (c)) { // This is a part of the antispoof code - ch->getUser (n)->userkey = Utils::get_key (); + ch->getUser(n)->userkey = Utils::get_key (); Commands::CTCP (cnx->bot, n, "PING", - ch->getUser (n)->userkey + " " + c); + ch->getUser(n)->userkey + " " + c); } } -- 2.20.1