1 2005-01-06 Clinton Ebadi <clinton@unknownlamer.org>
3 * source/BotConfig.C (set_option_value): Fuck you STL
4 (push_back_): Reimplemented so that it doesn't need std::bind1st
5 because the STL is being stupid
7 2004-12-26 Clinton Ebadi <clinton@unknownlamer.org>
9 * source/BotConfig.C (read_config): Implemented properly
10 (get_option_values): Implemented properly
11 (set_config_file): Fixed
13 2004-07-10 Clinton Ebadi <clinton@unknownlamer.org>
15 * bobot++.texinfo (Built-In Commands): Added empty stubs to the
18 2004-06-22 Clinton Ebadi <clinton@unknownlamer.org>
20 * source/BotConfig.C: New file (implementation of configuration database)
22 * source/BotConfig.H: New File (semi-generic configuration database)
24 2004-06-17 Clinton Ebadi <clinton@unknownlamer.org>
26 * bobot++.texinfo (Starting the Bot): New section
28 2004-06-14 Clinton Ebadi <clinton@unknownlamer.org>
30 * bobot++.texinfo (Protection): Added Section
31 (User Levels): Rewrote section to be useful
32 (bot.users): Added section
34 2004-06-12 Clinton Ebadi <clinton@unknownlamer.org>
36 * source/DCCChatConnection.C (connect): Checks to make sure the
37 person initiating a DCC CHAT with the bot is at least a FRIEND of
40 * README: Fixed a typo
42 * scripts/bobot-utils.scm (ctcp-quote): Implemented ctcp-quote
43 (bot:ctcp-quote): Renamed ctcp-quote to bot:ctcp-quite (whoops)
45 2004-05-28 Clinton Ebadi <clinton@unknownlamer.org>
47 * bobot++.texinfo (bot.conf): Finished section
48 (server syntax): New section, documents the bot.conf SERVER syntax
49 (channel syntax): New section, documentes the bot.conf CHANNEL syntax
51 2004-05-13 Clinton Ebadi <clinton@unknownlamer.org>
53 * source/Main.C (real_main): std::exit instead of exit
55 2004-05-12 Clinton Ebadi <clinton@unknownlamer.org>
57 * source/DCCConnection.C (DCCConnection): Intialized `nuh' in the
58 constructor with `n' This should fix the segfaulting.
60 2004-01-28 Clinton Ebadi <clinton@unknownlamer.org>
62 * ChangeLog: Updated copyright notice
64 2004-01-09 Clinton Ebadi <clinton@unknownlamer.org>
66 * source/Interp.C (interp_init_helper): Register
67 bot:change-command-level
69 * source/ScriptCommands.C (ChangeCommandLevel): Added
70 ChangeCommandLevel to change the level a user needs to be to run a
73 * source/ScriptCommands.H: Added ChangeCommandLevel
75 2003-10-12 Clinton Ebadi <clinton@unknownlamer.org>
77 * source/String.H: Changed #define STRING_H to BSTRING_H
79 2003-08-04 Clinton Ebadi <clinton@unknownlamer.org>
81 * scripts/bobot-utils.scm (bot:sent-to-me?): New procedure, used
82 to see if a message was sent to the bot (this is better than
83 bot:match-to-me because the hook isn't invalidated when the bot's
86 * source/DCCConnection.H: Added `nuh' back and added an
88 Added setter `set_autoRemove(bool)'
90 * source/DCCConnection.H: Removed all friends
91 Added accessors (get_bot, get_lastSpoken, get_autoRemove; get_bot
92 reveals the pointer to the bot [PRIVATE POINTER] which probably
93 isn't so nice, but there isn't much to be done about it with the
94 current design of the bot)
96 * source/DCCChatConnection.H: Removed all friends
98 * source/DCCConnection.H: DCCConnection is now a pure virtual
99 class with the subclass DCCChatConnection
101 2003-07-29 Clinton Ebadi <clinton@unknownlamer.org>
103 * source/Socket.C (connect): log errors to the bot log instead of
106 2003-07-23 Clinton Ebadi <clinton@unknownlamer.org>
108 * source/Parser.C (parseMessage): use the find method of std::map
109 to find the command to call instead of [] and then extract the
110 pointer to the userFunction from that if it exists. This appears
111 to fix the crash when one uses an undefined command followed by
114 2003-04-09 Clinton Ebadi <clinton@unknownlamer.org>
116 * source/Interp.C (interp_init_helper): Bind bot:setfloodrate to
117 ScriptCommands::SetFloodRate
119 * source/ScriptCommands.C (SetFloodRate): New Method: SetFloodRate
121 * source/Bot.C (init_user_functions): Make SETFLOODRATE available
124 * source/Bot.H: Made MAX_MESSAGES writeable
126 * source/UserCommands.H: New method: SetFloodRate
128 * source/Commands.H: New method: SetFloodRate
130 2003-04-03 Clinton Ebadi <clinton@unknownlamer.org>
132 * configure.ac: Merged all AC_OUTPUTs at the end
134 2003-04-02 Clinton Ebadi <clinton@unknownlamer.org>
136 * scripts/bobot-utils.scm: Make exported symbols from
137 the-bot-module available in the guile-user module so that scripts
138 loaded with Interp::Load function.
140 2003-03-30 Clinton Ebadi <clinton@unknownlamer.org>
142 * scripts/bobot-utils.scm (bot:load-module): Loads a file from the
143 %bot:loadpath into its own module and returns that (unnamed) module
144 (bot:use-module): Calls bot:load-module and then adds the newly
145 loaded module to the (current-module)'s use-list
147 * source/Interp.C (interp_init_helper): New procedure to initialize
148 the-bot-module (this is the old Interp::Startup verbatim)
149 (interp_post_startup_helper): New procedure to export
150 the-bot-module from bot_module
151 (Startup): Now calls interp_init_helper and
152 interp_post_startup_helper to initalize the bot module system
154 * source/Interp.H: Added private variable bot_module to Interp
156 2002-11-04 Clinton Ebadi <clinton@unknownlamer.org>
158 * scripts/bobot-utils.scm: Added bot: to regex functions (yes,
159 this breaks existing scripts, this is the unstable tree after all)
161 2002-11-03 Clinton Ebadi <clinton@unknownlamer.org>
163 * source/Mask.C (match): Made Mask::match case insensitive
165 2002-09-23 Clinton Ebadi <clinton@unknownlamer.org>
167 * source/Interp.C (scm_apply_wrapper): turned off locking of
168 Interp::mutex to see if this makes the bot work again...and it
171 2002-09-07 Clinton Ebadi <clinton@unknownlamer.org>
173 * configure.ac: Removed arguments to AM_INIT_AUTOMAKE and updated
174 everything to use aclocal/automake 1.6
176 2002-08-27 Clinton Ebadi <clinton@unknownlamer.org>
178 * source/DCCPerson.H (class DCCPerson): Added
179 UserCommands::DCCList as a friend (friends are better than the old
180 DCC() function at least).
182 * source/DCCManager.H (class DCCManager): Added
183 UserCommands::DCCList as a friend
185 * source/Interp.H (class Interp): Made function scm_apply_wrapper
186 a friend so it can lock Interp::mutex
188 * source/Interp.C (scm_apply_wrapper): Lock Interp::mutex if
189 MULTITHREAD is defined (it is always defined when scripting is
190 enabled) so that Sockets can be made multithreaded using
193 * source/DCCPerson.H: Removed DCC method and made Bot a friend
194 Made DCCManager a friend
196 * source/DCCManager.H (class DCCManager): Removed MAP() method
197 and made Bot a friend of DCCManager
199 2002-08-18 Clinton Ebadi <clinton@unknownlamer.org>
201 * source/Interp.C (Startup): Renamed bot:DCC-chat-send to
204 * bobot++.texinfo (Hook Types): Fixed a typo (I wrote
205 user!nick@host instead of the correct nick!user@host).
207 * source/Interp.C (Startup): Register bot:DCC-chat-send
209 * source/ScriptCommands.C (sendDCCChatMessage): Added method again
211 2002-08-08 Clinton Ebadi <clinton@unknownlamer.org>
213 * source/String.C (String): The std::string copy constructor now
214 extracts the c_str of the std::string and then takes the strlen of
215 that before copying it. This fixes a bug with DCC where if you did
216 e.g. "!help" the bot would reply with "No TOPIC PRIVMSG FOUND" or
217 something like that, depending on what the last message was
218 because Socket will insert a \0 into its semi-static buffer, so
219 the len of the String will not equal the strlen of its char*.
221 2002-08-07 Clinton Ebadi <clinton@unknownlamer.org>
223 * source/DCCPerson.H: Removed destructor (I = idiot)
225 * source/DCCConnection.H: DCCManager is now a friend of
226 DCCConnection (ugh, the bot has way too many friends).
228 * source/DCCPerson.H: Added DCC member that returns a const
229 DCCConnection* (the dcc connection). This isn't saved anywhere
230 because when a DCCPerson is destroyed, its connection is also
233 * source/Bot.H: dccConnections is now a DCCManager
235 * source/DCCPerson.H: Added destructor
236 Added handleInput method
238 * source/DCCManager.C: New file
239 (addConnection): Wrote method, add a DCCConection to the manager
241 * source/DCCManager.H: New file
243 * source/Interp.C (Startup): Register bot:DCC-chat-send
244 (Startup): Removed sendDCCChatMessage stuff
246 * source/ScriptCommands.C (sendDCCChatMessage): New method:
247 sendDCCChatMessage (to, message) sends message to to.
249 * source/DCCConnection.C (connect): Run DCC_CHAT_BEGIN hook with
250 one arg: from (user!nick@host).
252 * source/DCCParser.C (parseLine): Runs DCC_CHAT_MESSAGE hook with
253 two args: from (user!nick@host) and line
255 2002-08-06 Clinton Ebadi <clinton@unknownlamer.org>
257 * source/Interp.C (Startup): Two new Scheme values:
258 hooks/dcc/chat-begin and hooks/dcc/chat-message for the
259 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE hooks.
261 * source/BotInterp.H: Added two new enum values to Hook:
262 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE for the DCC chat start and DCC
265 2002-08-05 Clinton Ebadi <clinton@unknownlamer.org>
267 * source/Parser.C (parseCTCP): Removed call to htonl and fixed
268 DCC! Ack, sockets take their arguments in network byte order so
269 there is no need to convert to host...now DCC _sort of_ works.
271 2002-08-04 Clinton Ebadi <clinton@unknownlamer.org>
273 * source/UserList.C (save): Increment iterator twice to get around
276 * source/ServerQueue.C: Now sends SEND_* hooks instead of
277 triggered general hooks.
279 * source/Interp.C (Startup): New scheme side defines: hooks/send/*
280 (* = the new SEND_ hooks, but lowercase).
282 * source/BotInterp.H: New hook types (SEND_..., ... = ACTION,
283 CTCP, PUBLIC, MESSAGE). These are triggered on send messages.
285 2002-08-01 Clinton Ebadi <clinton@unknownlamer.org>
287 * source/Bot.C (set_log_file): Oops! Fixed logging. Now the bot
290 * source/Socket.C (readLine): Now uses a static std::string that
291 starts out with 512 chars. This will never need to be resized for
292 usualy IRC messages, but might be for DCC messages
294 2002-07-31 Clinton Ebadi <clinton@unknownlamer.org>
296 * scripts/bobot-utils.scm (not-from-me): New syntax.
298 * source/ScriptCommands.C (AddHook): Now takes another optional
299 arg--name that will name the hook (see the hooks section in the
300 manual for what this does).
302 * source/BotInterp.H: Added name field to Hook
304 2002-07-29 Clinton Ebadi <clinton@unknownlamer.org>
306 * source/ServerQueue.C (sendPrivmsg): Now calls hooks on own
307 PRIVMSGes because the IRC server doesn't echo them back to the
308 bot. This could be useful for something (e.g. log script).
310 2002-07-27 Clinton Ebadi <clinton@unknownlamer.org>
312 * source/Interp.C (Shutdown): Runs bot:exit-hook hooks
313 (Startup): New var for Scheme: bot:exit-hook. Calls the thunks
314 associated with the hook when Interp::Shutdown is called (bot exit).
316 2002-07-23 Clinton Ebadi <clinton@unknownlamer.org>
318 * source/BotInterp.H (Hook<): Changed behavior of Hook's <. If a
319 hook is greater than or less than the other hook, only the
320 priority is considered. However, if both hooks have the same
321 priority, then the fallthru-ness is considered, with fallthru
322 hooks being greater than non-fallthru hooks.
324 * source/BotInterp.C (hptr_lt): Added this static function to be
325 used to sort the hooks list (now hooks should be sorted using
326 Hook's operator < instead of using pointer comparision, meaning
327 the new hook system will work correctly)
329 * scripts/bobot-utils.scm: Make bot:log use for-each instead of
330 map because we don't need the result of the displays (this would
331 just be a list of #<undefined> values and is a waste of memory).
333 2002-07-13 Clinton Ebadi <clinton@unknownlamer.org>
335 * source/Bot.C (Bot): userFunctions is now a map for efficiency
336 (worst case search is now NlogN instead of N). This improvement is
337 not as drastic as the one gained by making the Parser functions
338 list a map (because we don't scan this map for every message), but
339 it helps to clean up the code
341 2002-07-12 Clinton Ebadi <clinton@unknownlamer.org>
343 * source/Parser.H: Removed userFunctionsStruct
345 * source/Interp.C (Startup): ScriptCommands::sendCTCP registered
346 as bot:send-CTCP for Scheme
348 * source/ScriptCommands.C (sendCTCP): Wrote sendCTCP
350 2002-07-11 Clinton Ebadi <clinton@unknownlamer.org>
352 * source/ServerQueue.C (sendUser): Changed . . in USER command to
353 0 * (which is the Right Way to because <mode> must be a number...)
355 * source/Parser.C (init): New method of Parse. This initalizes the
356 functions map. functions replaces the old functions array, and
357 should yield better performance (since the functions array had to
358 be scanned for every incoming message)
360 * source/Parser.H: New member, functions (private)
362 2002-07-10 Clinton Ebadi <clinton@unknownlamer.org>
364 * source/Interp.C (Startup): New symbols: bot:user-*
365 [none|user|trusted|friend|master] are defined in Scheme as the
366 different levels of the users.
367 (Startup): All bot-* variables are now bot:*
369 2002-07-09 Clinton Ebadi <clinton@unknownlamer.org>
371 * source/Bot.H: Made some variables private because they shouldn't
372 be changed at runtime
374 * source/Parser.C (parseCTCP): Reneabled DCC CHAT (I want to test
375 this out to see if it works and make it work)
377 * source/Bot.C (Bot::Bot): New var: logs_dir. Set to the log file
380 * scripts/bobot-utils.scm: Fixed a typo (I forgot the / after
381 scripts in the user scripts dir) that made bobot++ not able to
382 load scripts from the user scripts dir
384 2002-07-08 Clinton Ebadi <clinton@unknownlamer.org>
386 * source/BotInterp.C (RunHooks): Changed iterators to
387 reverse_iterators because the hooks list is sorted in ascending
388 order--higher priority and fallthrough hooks appear _after_ the
389 lower priority and non-fallthrough hooks.
391 * source/Main.C (print_long_help): Added function
392 (print_short_help): Renamed from printUsage
393 (namespace): Most stuff in here is now defined in an anonymouse
394 namespace so it doesn't have external linkage
395 (real_main): Uses getopt_long instead of getopt. Added several
396 command line arguments (bobotpp --help for a full list).
398 * scripts/bobot-utils.scm (bot-load): Function moved from
401 * source/Interp.C (Startup): Autoloads
402 PREFIX/bobotpp/scripts/bobot-utils.scm now
403 (Startup): New Scheme variable: bot-sys-scripts-dir (system
406 * source/bobot-scheme.scm.in: Removed
408 * source/Makefile.am: Removed bobot-scheme.scm compiliation
410 * configure.ac (PREFIX): configure.ac defined prefix now
412 * source/Main.C (real_main): Default configuration is now read
413 from /etc/bobotpp/default
414 * source/bobot-scheme.scm.in: Added file. This defines the
415 'bot-load' procedure which will load a file from
416 $HOME/.bobotpp/scripts/ or @datadir@/bobotpp/scripts/ if the
417 script doesn't exist in the user script dir.
419 2002-07-01 Clinton Ebadi <clinton@unknownlamer.org>
421 * bobot++.texinfo: Started docs (just a skeleton right now)
423 * source/ScriptCommands.C (AddHook): Now takes pri and fall opt
424 args to set a hooks priority and whether or not it will
425 fallthrough. These args are optional.
427 * source/Interp.C (Startup): addhook now takes 3 req and 2 opt args
429 * source/BotInterp.C (AddHook): Now uses priority and fallthrough
430 (RunHooks): exec fallthrough hooks first.
432 * source/BotInterp.H: Changed Hooks to have priority
433 Added fhooksMap to BotInterp (fallthrough)
435 * source/UserCommands.C (AddShit): Converted to use Commands
437 2002-06-21 Clinton Ebadi <clinton@unknownlamer.org>
439 * source/Commands.C (AddUser): Fixed a one-off (function call was
440 before a brace instead of after one) that caused a segfault when
441 the user mask was a wildcard
443 2002-06-20 Clinton Ebadi <clinton@unknownlamer.org>
445 * all files: Updated address of the FSF
447 * source/UserCommands.C (AddUser): Uses Commands now instead of
448 manipulating the bot directly
450 2002-06-18 Clinton Ebadi <clinton@unknownlamer.org>
452 * source/ScriptCommands.C (AddShit): Filled in function.
454 * source/Interp.C (Startup): Bind bot-adduser to
455 ScriptCommands::AddUser instead of Action
456 (Startup): Bind bot-addshit to ScriptCommands::AddShit
458 * source/ScriptCommands.C (AddUser): Filled in function
460 * source/ServerList.C (delServer): Changed (n - 1) to n...n-1
461 would have caused problems if you used more than one server
463 * source/Parser.H: Changed const char* to String in userFunctionStruct
465 * source/String.H: Added std::string compatibility members
467 * configure.ac: You can now disable Crypt and scripting
469 * source/*: Added #include "config.h" where needed
471 * configure.ac: Added AM_CONFIG_HEADER
473 * config.h.in: added file
475 * source/Queue.C: Didn't notice iostream.h here! Fixed
478 Copyright 2002,2003,2004 Clinton Ebadi
479 Copying and distribution of this file, with or without modification, are
480 permitted provided the copyright notice and this notice are preserved.