1 2005-07-03 Clinton Ebadi <clinton@unknownlamer.org>
3 * bobot++.texinfo (Hook Types): Documented all hooks
5 * source/ServerQueue.C (sendPrivmsg): Changed SEND_MESSAGE hook to
6 match dest and pass dest to send hook
8 * bobot++.texinfo (Hook Types): Changed language of
9 hooks/dcc/chat-* hook documention
10 (Received Message Hooks): Added subsub section of Hook Types
11 (Sent Message Hooks): Added subsub section of Hook Types
12 (DCC CHAT Hooks): Added subsub section of Hook Types
13 (Miscellaneous Hooks): Added subsub section of Hook Types
15 * source/Parser.C (parseScriptFunction): Changed
16 lazy_apply_wrapper to Interp::LazyApplyWrapper
17 (parseScriptFunction): Changed empty_handler to Interp::EmptyHandler
18 (parsePart): Grammar fix in log (Leaved => Left)
20 * source/Interp.H (Interp): Added LazyHandler method
22 * source/BotInterp.C (RunHooks): changed lazy_apply_wrapper to
23 Interp::LazyApplyWrapper
24 (RunTimers): Changed empty_handler to Interp::EmptyHandler
25 (RunHooks): Changed empty_handler to Interp::EmptyHandler
26 (RunTimers): Changed lazy_apply_wrapper to Interp::LazyApplyWrapper
28 * source/Interp.C (LazyHandler): Renamed from lazy_handler
29 (ScmApplyWrapper): Renamed from scm_apply_wrapper
30 (EmptyHandler): Renamed from empty_handler
32 * source/Interp.H (Interp): Removed ErrorHandler method
33 (Interp): Added LazyApplyWrapper method
34 (Interp): Added EmptyHandler method
35 (Interp): Added ScmApplyWrapper method
37 * scripts/bobot-utils.scm: Added hooks/leave as an alias for hooks/part
38 Added begin-deprecated around deprecated definitions
39 (_deprecated-fun): Added macro to define an alias for a function
40 and issue a deprecation warning when used
41 Converted all bot- aliases to use _deprecated-fun
43 * source/Interp.C (interp_init_helper): Changed Hook::LEAVE to
45 (interp_init_helper): Removed definition of hooks/leave
47 * bobot++.texinfo (Hook Types): Removed stub for hooks/leave, only
48 document hooks/part name (hooks/leave still exists, but will not
49 be documented as it is the same as hooks/part)
51 * source/Parser.C (parsePart): Use Hook::PART instead of Hook::LEAVE
53 * source/BotInterp.H: Removed Hook::LEAVE, added Hook::PART
55 * bobot++.texinfo (Scripting): Added note about most arguments
58 * source/Commands.C (NextServer): Call hooks/disconnect
60 * source/Bot.C (run): Pass extra argument to Hook::DISCONNECT
62 * bobot++.texinfo (Creating a Hook): Reformatted the bot:addhook
63 section to make it more readable
64 (Hook Types): Reformatted hooks/action
65 (Hook Types): Changed grammar of hooks/nickname (their => his)
66 (Hook Types): Documented hooks/signoff
68 2005-06-29 Clinton Ebadi <clinton@unknownlamer.org>
70 * bobot++.texinfo: Updated copyright years, changed "applies to
73 * source/Socket.C (readLine): return buf.substr (0, pos) instead
74 of using the String char * constructor (this should be faster,
75 especially for long strings since a simple copy is used instead of
76 going over each char until nul is encountered)
78 * configure.ac: Release 2.1.8
79 Change version to 2.1.9CVS
81 * source/Parser.C: Include Commands.H (fixes --disable-scripting build)
83 * source/Bot.C (Bot): Fix to make a --disable-scripting build work
85 * bobot++.texinfo (Configuration): Swapped order of config file
86 placement and config files
87 (User Levels): users not found in the user list *can* execute
88 commands as bot:user-none now.
89 (Low Level Message Functions): Changed a few @code{}s to @var{}s
91 2005-06-28 Clinton Ebadi <clinton@unknownlamer.org>
93 * bobot++.texinfo: @vskip Opt... => @vskip 0pt...
95 * source/Main.C (namespace): Added debug-scripts option
97 * source/Parser.C (parseCTCP): Hook::ACTION is now passed
98 from->getNick () instead of from->getAddress () (consistency fix)
100 * source/Main.C: Merged error handling patch from dsmith
102 * source/Parser.C: Merged error handling
105 * source/Interp.H: Merged error handling patch from dsmith
107 * source/Interp.C (lazy_handler): Merged error handling patch from
110 * source/BotInterp.H: Merged error handling patch from dsmith
112 * source/BotInterp.C: Merged error handling patch from dsmith
114 * bobot++.texinfo (Low Level Message Functions): Documented
117 * source/Parser.C (parseCTCP): Converted to use Commands::CTCPReply
119 * source/Interp.C (interp_init_helper): Bound bot:send-ctcp-reply
122 * bobot++.texinfo (Low Level Message Functions):
123 s/bot:send-CTCP/bot:send-ctcp/
125 * source/Interp.C (interp_init_helper): Renamed bot:send-CTCP to
128 * source/ScriptCommands.H: Uncommented sendCTCPReply prototype
130 * source/ScriptCommands.C (sendCTCP): Convert to use Commands::CTCP
131 (sendCTCPReply): Added
133 * source/Parser.C (parseJoin): Convert to use Commands::CTCP
135 * source/Commands.C (CTCP): Implemented
136 (CTCPReply): Implemented
137 (Action): Convert to use Commands::CTCP
139 * source/Commands.H: Added CTCP (bot, target, command, message)
140 Added CTCPReply (bot, target, command, message)
142 2005-06-27 Clinton Ebadi <clinton@unknownlamer.org>
144 * examples/bot.conf (maxnicklength): Update example config
146 * source/Utils.C (valid_nickname_p): Use b->MAX_NICKLENGTH
148 * source/Bot.C (readConfig): Look for MAXNICKLENGTH parameter
150 * source/Bot.H: Added MAX_NICKLENGTH member
152 * source/Utils.H (valid_nickname_p): Now takes Bot* as first argument
154 * source/Commands.C (Msg): Send multiple PRIVMSGs when a message
157 * source/UserCommands.C (SetVersion): Convert to use Commands::Notice
159 * source/Commands.C (Notice): Send multiple NOTICEs when a message
162 2005-06-25 Clinton Ebadi <clinton@unknownlamer.org>
164 * source/Main.C (real_main): Enable Guile debugging mode when
167 * source/Interp.C (interp_post_startup_helper): Return
168 SCM_UNSPECIFIED instead of 0
170 2005-06-24 Clinton Ebadi <clinton@unknownlamer.org>
172 * All: Updated FSF street address
174 * source/Commands.C (Msg): Move body of Say to an if inside of this
177 * source/ScriptCommands.C (sendNotice): Returns error code instead
180 * source/Commands.C (Say): Check to make sure target is a channel
181 (Msg): Extended to send messages to channels
183 2005-06-23 Clinton Ebadi <clinton@unknownlamer.org>
185 * scripts/bot.scm: Added file ((bobotpp bot) module for other
186 modules to gain access to bobot++ interface)
188 * source/Commands.C (Notice): Commented out check/abort if target
189 is a channel (there doesn't seem to be a reason for this to not work)
191 * source/Interp.C (interp_init_helper): Register bot:notice with scheme
193 * bobot++.texinfo (High Level Message Functions): Document bot:notice
195 * source/Message.H: Added operator== to Message (tests for error
198 * source/Commands.C: Removed message type macros
200 * source/Message.H: Moved message type macros to Message.H
202 * source/ScriptCommands.C (sendNotice): Implemented sendNotice
204 * source/ScriptCommands.H: Uncomment sendNotice
206 * source/Bot.C (waitForInput): Use %02d when formatting
207 Hooks::TIMER argument instead of %2d, and switch to snprintf to
210 * bobot++.texinfo (Hooks): Clarified intro text about hooks (order
213 * source/Bot.C (run): Added call to Hooks::DISCONNECT
214 (hooks/disconnect) when the bot is disconnected from the server
216 * bobot++.texinfo: Applied documentation patch from Dale P. Smith
217 (Hook Types): Added hooks/disconnect argument
219 2005-06-06 Clinton Ebadi <clinton@unknownlamer.org>
221 * bobot++.texinfo: Change @vskip 0 to @vskip 0pt to make this work
222 again (thanks dsmith)
224 2005-06-01 Clinton Ebadi <clinton@unknownlamer.org>
226 * source/Interp.C (interp_init_helper): Added
227 bot:protection/[none|ban|kick|deop] constants to Scheme
228 (interp_init_helper): Added bot:aop/[yes|no] constants
230 2005-05-31 Clinton Ebadi <clinton@unknownlamer.org>
232 * configure.ac: Release Bobot++ 2.1.7
233 Changed version to 2.18.CVS
235 * source/UserList.C (save): Remove workaround for BUG #2
237 * source/Parser.C (parse001): make realNick lowercase when doing
238 the comparison to bot->nickName to prevent pushing a second copy
239 of the bot onto the userlist (closes BUG #2)
241 * source/Bot.C (Bot): cleaned up constructor
242 (waitForInput): replaced gh_list with scm_list_n
244 * source/UserList.C: Cleaned up some formatting
246 * source/Main.C: Formatted code more cleanly
247 (real_main): changed a few Strings to std::strings
249 * source/String.C (operator): Made index signed again, it's not
250 worth fixing this warning
252 * source/Bot.C: Add casts to make this compile with unsigned int
253 as operator[] in String
255 * source/String.C (operator): Made index unsigned
257 * source/Utils.C: Made a few things unsigned to kill warnings
259 * source/Socket.C (readLine): Made pos unsigned
261 * source/Bot.C (Bot): Fixed initializer list order to kill warnings
263 * source/BotInterp.C (RunTimers): Removed unused variable (Timer *t)
265 * source/StringTokenizer.C (count_tokens): Changed return type to
267 (more_tokens_p): Made counter unsigned
269 * source/StringTokenizer.H (class StringTokenizer): Made pos
270 std::string::size_type instead of int
272 * source/Commands.C (TBan): Returns Ok is the ban is done instead
273 of falling off the end (oops)
275 * source/BotInterp.H: Add general catch case (false)
277 2005-03-11 Clinton Ebadi <clinton@unknownlamer.org>
279 * configure.ac: Release 2.1.6
280 Changed version to 2.1.7CVS
282 2005-02-28 Clinton Ebadi <clinton@unknownlamer.org>
284 * source/Parser.C (parseLine): use map<>::find and an iterator to
285 find the IRC command instead of map<>::operator[] to avoid a
288 * source/Bot.C (waitForInput): Removed commented out code
290 * source/Socket.C (readLine): return String (buf.c_str ()) instead
291 of String (buf) so that only the buffer up to the first null is returned
292 (readLine): Added a comment explaining the usage of buf
293 (readLine): Changed type of length (std::string::size_type instead
296 * source/String.C: Reimplemented String on top of std::string to
297 fix a few bugs and potential memory leaks
298 (toLower): use Utils::to_lower
299 (toUpper): Use Utils::to_upper
300 (trim): Use Utils::trim_str
302 * source/String.H: removed srep, replaced it with a std::string (my_string)
304 * source/Utils.C (to_upper): Applied patch from Jos Hulzink
306 (trim_str): Appled patch from Jos Hulzink <josh@stack.nl> (fixes
307 counters and substr call)
309 * source/StringTokenizer.C (next_token): Applied patch from Jos
310 Hulzink <josh@stack.nl> (fixes substr call)
311 (rest): Applied patch from Jos Hulzink <josh@stack.nl> (fixes
314 2005-02-27 Clinton Ebadi <clinton@unknownlamer.org>
316 * source/Bot.H (COPYRIGHT_STRING): Remove Michael Wilson because
317 he is a lazy bum and never submitted the String replacing patch
319 2005-01-23 Clinton Ebadi <clinton@unknownlamer.org>
321 * configure.ac: Remove CC++ test
322 Changed version to 2.1.6CVS (2.1.5 released)
324 * bobot++.texinfo: Updated copyright
326 2005-01-16 Clinton Ebadi <clinton@unknownlamer.org>
328 * TODO (General): Added TODO items
329 (2.2): Moved a few items here from 2.4
331 * README (NOTE): Mention boost requirement
333 2005-01-13 Clinton Ebadi <clinton@unknownlamer.org>
335 * ChangeLog Updated copryight
337 * source/User.H: Removed forward declaration of Utils
339 * source/Bot.H: Removed forward declaration of Utils
341 * source/ChannelList.H: Removed forward declaration of Utils
343 * source/UserListItem.H: Removed forward declaration of Utils
345 * source/Utils.H: Removed class Utils, replaced with a namspace
346 (it only contained static methods)
348 * source/Bot.H (COPYRIGHT_STRING): Added 2005 and Michael Wilson
349 (he is replacing String)
351 2005-01-12 Clinton Ebadi <clinton@unknownlamer.org>
353 * source/BotConfig.C (set_option_value): Put watcher calling
354 inside of if (cf_iter != end()) to fix a segfault (if the cf_iter
355 = end then there are no watchers since this is a new value and
356 references cf_iter->second segfaults)
358 * source/Utils.C (trim_str): Fixed bug (last non-space character
361 * source/BotConfig.C (read_config): Made to use set_option_value
362 instead of manipulating options_db directly
364 * source/BotConfig.H (class BotConfig): Add set_option_value that
365 takes a t_value instead of t_value_list (most uss of
366 set_option_value will be to add a single value so this is very useful)
368 * source/BotConfig.C (set_option_value): Implemented
370 * source/UserList.C: Made to work with new Utils/StringTokenizer names
372 * source/UserCommands.C: Made to work with new
373 Utils/StringTokenizer names
375 * source/ShitList.C: Uses Utils.H now (Utils::trim_str & friends)
377 2005-01-11 Clinton Ebadi <clinton@unknownlamer.org>
379 * source/ShitList.C: Made to work with new StringTokenizer names
381 * source/ServerQueueItem.C: Made to work with new StringTokenizer names
383 * source/ServerQueue.C: Made to work with new Utils names
385 * source/ScriptCommands.C: Made work with new Utils names
387 * source/Person.C (getNick): Made work with new Utils names
389 * source/String.H: Added substr prototypes
391 * source/String.C (substr): Added substr as an alias of subString
392 (for compat with std::string before the transition)
394 * source/Parser.C: Made to work with new Utils/StringTokenizer names
396 * source/DCCParser.C: Made to work with new Utils names
398 * source/DCCChatConnection.C: Made to work new Utils names
400 * source/Commands.C: Made to work with new Utils names
402 * source/Channel.C: Made to work with new Utils names
404 * source/BotInterp.C: Made to work with new Utils
406 * source/Bot.C: Made to work with new Utils/StringTokenizer names
408 * source/String.C (operator=): Unremoved operator=(std::string)
410 * source/String.H: Unremoved operator=(std::string)
412 * source/BotConfig.C (read_config): Use Utils::trim_str
414 * source/String.C (trim): Fixed bug (p->s[i] == '\r', s/i/j/)
416 * source/Utils.C (trim_str): Implemented
418 * source/Utils.H: Added tim_str (replaces String::trim)
420 * source/BotConfig.C: Made everything work with new
421 StringTokenizer and Utils names
423 * source/Utils.H: Added to_lower
426 * source/StringTokenizer.C (rest): uses std::isspace instead of
427 checking st[pos] against ' ' and '\t'
429 * source/StringTokenizer.H: Removed CamelCasing
430 Renamed hasMoreTokens to more_tokens_p
432 * source/StringTokenizer.C: Converted to use std::string
434 * source/StringTokenizer.H: Converted to use std::string
436 * source/String.C: Removed operator=(std::string)
438 * source/String.H: Removed operator=(std::string)
440 * source/Utils.C: Added copyright
441 Reformatted to match GNU coding standard more closely
442 Converted everything to use std::string
443 (get_nick): Renamed from getNick
444 (get_userhost): Renamed from getUserHost
445 (get_key): Renamed from getKey
446 (IP_p): Renamed from isIP
447 (make_wildcard): Renamed from makeWildcard
448 (channel_p): Renamed from isChannel
449 (wildcard_p): Renamed from isWildcard
450 (valid_channel_name_p): Renamed from isValidChannelName
451 (valid_nickname_p): Renamed from isValidNickName
452 (get_level): Renamed from getLevel
453 (str2time): Renamed from strToTime
454 (str2time): Fixed potential buffer overflow (num[512] => std::string)
455 (level2str): Renamed from levelToStr
456 (prot2str): Renamed from protToStr
457 (bool2str): Renamed from boolToStr
458 (long2str): Implemented
459 (scm2str): Renamed from scm2String
460 (str2scm): Renamed from string2SCM
462 * source/BotConfig.C: Reformatted to fit GNU coding style more closely
464 * source/Utils.H: Added long2str (long int -> std::string)
466 * source/String.H: Added 2003 copyright (the year I last modified
469 * source/String.C: Added 2002 copyright (the year I last modified
472 * source/Utils.H: Updated Copyright
473 s/String/std::string/g
474 Removed camel casing and is* = *_p
477 * source/BotConfig.C: Updated Copyright
479 * source/BotConfig.H: Updated copyright
481 2005-01-08 Clinton Ebadi <clinton@unknownlamer.org>
483 * source/BotConfig.C (set_option_value): Take care of the case
484 where key is not already in the db
485 (add_watcher): Implemented
486 (read_config): Removed ',' token parsing (not needed)
488 * configure.ac: Add AC_LANG([C++]) so we can check for C++ libs
489 AC_CHECK_LIB ccgnu2 (CommonC++2)
491 * README: Updated README (reformatted, adding info, etc.)
493 2005-01-07 Clinton Ebadi <clinton@unknownlamer.org>
495 * source/BotConfig.C (set_option_value): call watcher list
496 (run_fun_): Added to support watcher list calling
498 2005-01-06 Clinton Ebadi <clinton@unknownlamer.org>
500 * source/BotConfig.C (set_option_value): Fuck you STL
501 (push_back_): Reimplemented so that it doesn't need std::bind1st
502 because the STL is being stupid
504 2004-12-26 Clinton Ebadi <clinton@unknownlamer.org>
506 * source/BotConfig.C (read_config): Implemented properly
507 (get_option_values): Implemented properly
508 (set_config_file): Fixed
510 2004-07-10 Clinton Ebadi <clinton@unknownlamer.org>
512 * bobot++.texinfo (Built-In Commands): Added empty stubs to the
515 2004-06-22 Clinton Ebadi <clinton@unknownlamer.org>
517 * source/BotConfig.C: New file (implementation of configuration database)
519 * source/BotConfig.H: New File (semi-generic configuration database)
521 2004-06-17 Clinton Ebadi <clinton@unknownlamer.org>
523 * bobot++.texinfo (Starting the Bot): New section
525 2004-06-14 Clinton Ebadi <clinton@unknownlamer.org>
527 * bobot++.texinfo (Protection): Added Section
528 (User Levels): Rewrote section to be useful
529 (bot.users): Added section
531 2004-06-12 Clinton Ebadi <clinton@unknownlamer.org>
533 * source/DCCChatConnection.C (connect): Checks to make sure the
534 person initiating a DCC CHAT with the bot is at least a FRIEND of
537 * README: Fixed a typo
539 * scripts/bobot-utils.scm (ctcp-quote): Implemented ctcp-quote
540 (bot:ctcp-quote): Renamed ctcp-quote to bot:ctcp-quite (whoops)
542 2004-05-28 Clinton Ebadi <clinton@unknownlamer.org>
544 * bobot++.texinfo (bot.conf): Finished section
545 (server syntax): New section, documents the bot.conf SERVER syntax
546 (channel syntax): New section, documentes the bot.conf CHANNEL syntax
548 2004-05-13 Clinton Ebadi <clinton@unknownlamer.org>
550 * source/Main.C (real_main): std::exit instead of exit
552 2004-05-12 Clinton Ebadi <clinton@unknownlamer.org>
554 * source/DCCConnection.C (DCCConnection): Intialized `nuh' in the
555 constructor with `n' This should fix the segfaulting.
557 2004-01-28 Clinton Ebadi <clinton@unknownlamer.org>
559 * ChangeLog: Updated copyright notice
561 2004-01-09 Clinton Ebadi <clinton@unknownlamer.org>
563 * source/Interp.C (interp_init_helper): Register
564 bot:change-command-level
566 * source/ScriptCommands.C (ChangeCommandLevel): Added
567 ChangeCommandLevel to change the level a user needs to be to run a
570 * source/ScriptCommands.H: Added ChangeCommandLevel
572 2003-10-12 Clinton Ebadi <clinton@unknownlamer.org>
574 * source/String.H: Changed #define STRING_H to BSTRING_H
576 2003-08-04 Clinton Ebadi <clinton@unknownlamer.org>
578 * scripts/bobot-utils.scm (bot:sent-to-me?): New procedure, used
579 to see if a message was sent to the bot (this is better than
580 bot:match-to-me because the hook isn't invalidated when the bot's
583 * source/DCCConnection.H: Added `nuh' back and added an
585 Added setter `set_autoRemove(bool)'
587 * source/DCCConnection.H: Removed all friends
588 Added accessors (get_bot, get_lastSpoken, get_autoRemove; get_bot
589 reveals the pointer to the bot [PRIVATE POINTER] which probably
590 isn't so nice, but there isn't much to be done about it with the
591 current design of the bot)
593 * source/DCCChatConnection.H: Removed all friends
595 * source/DCCConnection.H: DCCConnection is now a pure virtual
596 class with the subclass DCCChatConnection
598 2003-07-29 Clinton Ebadi <clinton@unknownlamer.org>
600 * source/Socket.C (connect): log errors to the bot log instead of
603 2003-07-23 Clinton Ebadi <clinton@unknownlamer.org>
605 * source/Parser.C (parseMessage): use the find method of std::map
606 to find the command to call instead of [] and then extract the
607 pointer to the userFunction from that if it exists. This appears
608 to fix the crash when one uses an undefined command followed by
611 2003-04-09 Clinton Ebadi <clinton@unknownlamer.org>
613 * source/Interp.C (interp_init_helper): Bind bot:setfloodrate to
614 ScriptCommands::SetFloodRate
616 * source/ScriptCommands.C (SetFloodRate): New Method: SetFloodRate
618 * source/Bot.C (init_user_functions): Make SETFLOODRATE available
621 * source/Bot.H: Made MAX_MESSAGES writeable
623 * source/UserCommands.H: New method: SetFloodRate
625 * source/Commands.H: New method: SetFloodRate
627 2003-04-03 Clinton Ebadi <clinton@unknownlamer.org>
629 * configure.ac: Merged all AC_OUTPUTs at the end
631 2003-04-02 Clinton Ebadi <clinton@unknownlamer.org>
633 * scripts/bobot-utils.scm: Make exported symbols from
634 the-bot-module available in the guile-user module so that scripts
635 loaded with Interp::Load function.
637 2003-03-30 Clinton Ebadi <clinton@unknownlamer.org>
639 * scripts/bobot-utils.scm (bot:load-module): Loads a file from the
640 %bot:loadpath into its own module and returns that (unnamed) module
641 (bot:use-module): Calls bot:load-module and then adds the newly
642 loaded module to the (current-module)'s use-list
644 * source/Interp.C (interp_init_helper): New procedure to initialize
645 the-bot-module (this is the old Interp::Startup verbatim)
646 (interp_post_startup_helper): New procedure to export
647 the-bot-module from bot_module
648 (Startup): Now calls interp_init_helper and
649 interp_post_startup_helper to initalize the bot module system
651 * source/Interp.H: Added private variable bot_module to Interp
653 2002-11-04 Clinton Ebadi <clinton@unknownlamer.org>
655 * scripts/bobot-utils.scm: Added bot: to regex functions (yes,
656 this breaks existing scripts, this is the unstable tree after all)
658 2002-11-03 Clinton Ebadi <clinton@unknownlamer.org>
660 * source/Mask.C (match): Made Mask::match case insensitive
662 2002-09-23 Clinton Ebadi <clinton@unknownlamer.org>
664 * source/Interp.C (scm_apply_wrapper): turned off locking of
665 Interp::mutex to see if this makes the bot work again...and it
668 2002-09-07 Clinton Ebadi <clinton@unknownlamer.org>
670 * configure.ac: Removed arguments to AM_INIT_AUTOMAKE and updated
671 everything to use aclocal/automake 1.6
673 2002-08-27 Clinton Ebadi <clinton@unknownlamer.org>
675 * source/DCCPerson.H (class DCCPerson): Added
676 UserCommands::DCCList as a friend (friends are better than the old
677 DCC() function at least).
679 * source/DCCManager.H (class DCCManager): Added
680 UserCommands::DCCList as a friend
682 * source/Interp.H (class Interp): Made function scm_apply_wrapper
683 a friend so it can lock Interp::mutex
685 * source/Interp.C (scm_apply_wrapper): Lock Interp::mutex if
686 MULTITHREAD is defined (it is always defined when scripting is
687 enabled) so that Sockets can be made multithreaded using
690 * source/DCCPerson.H: Removed DCC method and made Bot a friend
691 Made DCCManager a friend
693 * source/DCCManager.H (class DCCManager): Removed MAP() method
694 and made Bot a friend of DCCManager
696 2002-08-18 Clinton Ebadi <clinton@unknownlamer.org>
698 * source/Interp.C (Startup): Renamed bot:DCC-chat-send to
701 * bobot++.texinfo (Hook Types): Fixed a typo (I wrote
702 user!nick@host instead of the correct nick!user@host).
704 * source/Interp.C (Startup): Register bot:DCC-chat-send
706 * source/ScriptCommands.C (sendDCCChatMessage): Added method again
708 2002-08-08 Clinton Ebadi <clinton@unknownlamer.org>
710 * source/String.C (String): The std::string copy constructor now
711 extracts the c_str of the std::string and then takes the strlen of
712 that before copying it. This fixes a bug with DCC where if you did
713 e.g. "!help" the bot would reply with "No TOPIC PRIVMSG FOUND" or
714 something like that, depending on what the last message was
715 because Socket will insert a \0 into its semi-static buffer, so
716 the len of the String will not equal the strlen of its char*.
718 2002-08-07 Clinton Ebadi <clinton@unknownlamer.org>
720 * source/DCCPerson.H: Removed destructor (I = idiot)
722 * source/DCCConnection.H: DCCManager is now a friend of
723 DCCConnection (ugh, the bot has way too many friends).
725 * source/DCCPerson.H: Added DCC member that returns a const
726 DCCConnection* (the dcc connection). This isn't saved anywhere
727 because when a DCCPerson is destroyed, its connection is also
730 * source/Bot.H: dccConnections is now a DCCManager
732 * source/DCCPerson.H: Added destructor
733 Added handleInput method
735 * source/DCCManager.C: New file
736 (addConnection): Wrote method, add a DCCConection to the manager
738 * source/DCCManager.H: New file
740 * source/Interp.C (Startup): Register bot:DCC-chat-send
741 (Startup): Removed sendDCCChatMessage stuff
743 * source/ScriptCommands.C (sendDCCChatMessage): New method:
744 sendDCCChatMessage (to, message) sends message to to.
746 * source/DCCConnection.C (connect): Run DCC_CHAT_BEGIN hook with
747 one arg: from (user!nick@host).
749 * source/DCCParser.C (parseLine): Runs DCC_CHAT_MESSAGE hook with
750 two args: from (user!nick@host) and line
752 2002-08-06 Clinton Ebadi <clinton@unknownlamer.org>
754 * source/Interp.C (Startup): Two new Scheme values:
755 hooks/dcc/chat-begin and hooks/dcc/chat-message for the
756 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE hooks.
758 * source/BotInterp.H: Added two new enum values to Hook:
759 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE for the DCC chat start and DCC
762 2002-08-05 Clinton Ebadi <clinton@unknownlamer.org>
764 * source/Parser.C (parseCTCP): Removed call to htonl and fixed
765 DCC! Ack, sockets take their arguments in network byte order so
766 there is no need to convert to host...now DCC _sort of_ works.
768 2002-08-04 Clinton Ebadi <clinton@unknownlamer.org>
770 * source/UserList.C (save): Increment iterator twice to get around
773 * source/ServerQueue.C: Now sends SEND_* hooks instead of
774 triggered general hooks.
776 * source/Interp.C (Startup): New scheme side defines: hooks/send/*
777 (* = the new SEND_ hooks, but lowercase).
779 * source/BotInterp.H: New hook types (SEND_..., ... = ACTION,
780 CTCP, PUBLIC, MESSAGE). These are triggered on send messages.
782 2002-08-01 Clinton Ebadi <clinton@unknownlamer.org>
784 * source/Bot.C (set_log_file): Oops! Fixed logging. Now the bot
787 * source/Socket.C (readLine): Now uses a static std::string that
788 starts out with 512 chars. This will never need to be resized for
789 usualy IRC messages, but might be for DCC messages
791 2002-07-31 Clinton Ebadi <clinton@unknownlamer.org>
793 * scripts/bobot-utils.scm (not-from-me): New syntax.
795 * source/ScriptCommands.C (AddHook): Now takes another optional
796 arg--name that will name the hook (see the hooks section in the
797 manual for what this does).
799 * source/BotInterp.H: Added name field to Hook
801 2002-07-29 Clinton Ebadi <clinton@unknownlamer.org>
803 * source/ServerQueue.C (sendPrivmsg): Now calls hooks on own
804 PRIVMSGes because the IRC server doesn't echo them back to the
805 bot. This could be useful for something (e.g. log script).
807 2002-07-27 Clinton Ebadi <clinton@unknownlamer.org>
809 * source/Interp.C (Shutdown): Runs bot:exit-hook hooks
810 (Startup): New var for Scheme: bot:exit-hook. Calls the thunks
811 associated with the hook when Interp::Shutdown is called (bot exit).
813 2002-07-23 Clinton Ebadi <clinton@unknownlamer.org>
815 * source/BotInterp.H (Hook<): Changed behavior of Hook's <. If a
816 hook is greater than or less than the other hook, only the
817 priority is considered. However, if both hooks have the same
818 priority, then the fallthru-ness is considered, with fallthru
819 hooks being greater than non-fallthru hooks.
821 * source/BotInterp.C (hptr_lt): Added this static function to be
822 used to sort the hooks list (now hooks should be sorted using
823 Hook's operator < instead of using pointer comparision, meaning
824 the new hook system will work correctly)
826 * scripts/bobot-utils.scm: Make bot:log use for-each instead of
827 map because we don't need the result of the displays (this would
828 just be a list of #<undefined> values and is a waste of memory).
830 2002-07-13 Clinton Ebadi <clinton@unknownlamer.org>
832 * source/Bot.C (Bot): userFunctions is now a map for efficiency
833 (worst case search is now NlogN instead of N). This improvement is
834 not as drastic as the one gained by making the Parser functions
835 list a map (because we don't scan this map for every message), but
836 it helps to clean up the code
838 2002-07-12 Clinton Ebadi <clinton@unknownlamer.org>
840 * source/Parser.H: Removed userFunctionsStruct
842 * source/Interp.C (Startup): ScriptCommands::sendCTCP registered
843 as bot:send-CTCP for Scheme
845 * source/ScriptCommands.C (sendCTCP): Wrote sendCTCP
847 2002-07-11 Clinton Ebadi <clinton@unknownlamer.org>
849 * source/ServerQueue.C (sendUser): Changed . . in USER command to
850 0 * (which is the Right Way to because <mode> must be a number...)
852 * source/Parser.C (init): New method of Parse. This initalizes the
853 functions map. functions replaces the old functions array, and
854 should yield better performance (since the functions array had to
855 be scanned for every incoming message)
857 * source/Parser.H: New member, functions (private)
859 2002-07-10 Clinton Ebadi <clinton@unknownlamer.org>
861 * source/Interp.C (Startup): New symbols: bot:user-*
862 [none|user|trusted|friend|master] are defined in Scheme as the
863 different levels of the users.
864 (Startup): All bot-* variables are now bot:*
866 2002-07-09 Clinton Ebadi <clinton@unknownlamer.org>
868 * source/Bot.H: Made some variables private because they shouldn't
869 be changed at runtime
871 * source/Parser.C (parseCTCP): Reneabled DCC CHAT (I want to test
872 this out to see if it works and make it work)
874 * source/Bot.C (Bot::Bot): New var: logs_dir. Set to the log file
877 * scripts/bobot-utils.scm: Fixed a typo (I forgot the / after
878 scripts in the user scripts dir) that made bobot++ not able to
879 load scripts from the user scripts dir
881 2002-07-08 Clinton Ebadi <clinton@unknownlamer.org>
883 * source/BotInterp.C (RunHooks): Changed iterators to
884 reverse_iterators because the hooks list is sorted in ascending
885 order--higher priority and fallthrough hooks appear _after_ the
886 lower priority and non-fallthrough hooks.
888 * source/Main.C (print_long_help): Added function
889 (print_short_help): Renamed from printUsage
890 (namespace): Most stuff in here is now defined in an anonymouse
891 namespace so it doesn't have external linkage
892 (real_main): Uses getopt_long instead of getopt. Added several
893 command line arguments (bobotpp --help for a full list).
895 * scripts/bobot-utils.scm (bot-load): Function moved from
898 * source/Interp.C (Startup): Autoloads
899 PREFIX/bobotpp/scripts/bobot-utils.scm now
900 (Startup): New Scheme variable: bot-sys-scripts-dir (system
903 * source/bobot-scheme.scm.in: Removed
905 * source/Makefile.am: Removed bobot-scheme.scm compiliation
907 * configure.ac (PREFIX): configure.ac defined prefix now
909 * source/Main.C (real_main): Default configuration is now read
910 from /etc/bobotpp/default
911 * source/bobot-scheme.scm.in: Added file. This defines the
912 'bot-load' procedure which will load a file from
913 $HOME/.bobotpp/scripts/ or @datadir@/bobotpp/scripts/ if the
914 script doesn't exist in the user script dir.
916 2002-07-01 Clinton Ebadi <clinton@unknownlamer.org>
918 * bobot++.texinfo: Started docs (just a skeleton right now)
920 * source/ScriptCommands.C (AddHook): Now takes pri and fall opt
921 args to set a hooks priority and whether or not it will
922 fallthrough. These args are optional.
924 * source/Interp.C (Startup): addhook now takes 3 req and 2 opt args
926 * source/BotInterp.C (AddHook): Now uses priority and fallthrough
927 (RunHooks): exec fallthrough hooks first.
929 * source/BotInterp.H: Changed Hooks to have priority
930 Added fhooksMap to BotInterp (fallthrough)
932 * source/UserCommands.C (AddShit): Converted to use Commands
934 2002-06-21 Clinton Ebadi <clinton@unknownlamer.org>
936 * source/Commands.C (AddUser): Fixed a one-off (function call was
937 before a brace instead of after one) that caused a segfault when
938 the user mask was a wildcard
940 2002-06-20 Clinton Ebadi <clinton@unknownlamer.org>
942 * all files: Updated address of the FSF
944 * source/UserCommands.C (AddUser): Uses Commands now instead of
945 manipulating the bot directly
947 2002-06-18 Clinton Ebadi <clinton@unknownlamer.org>
949 * source/ScriptCommands.C (AddShit): Filled in function.
951 * source/Interp.C (Startup): Bind bot-adduser to
952 ScriptCommands::AddUser instead of Action
953 (Startup): Bind bot-addshit to ScriptCommands::AddShit
955 * source/ScriptCommands.C (AddUser): Filled in function
957 * source/ServerList.C (delServer): Changed (n - 1) to n...n-1
958 would have caused problems if you used more than one server
960 * source/Parser.H: Changed const char* to String in userFunctionStruct
962 * source/String.H: Added std::string compatibility members
964 * configure.ac: You can now disable Crypt and scripting
966 * source/*: Added #include "config.h" where needed
968 * configure.ac: Added AM_CONFIG_HEADER
970 * config.h.in: added file
972 * source/Queue.C: Didn't notice iostream.h here! Fixed
975 Copyright 2002,2003,2004,2005 Clinton Ebadi
976 Copying and distribution of this file, with or without modification, are
977 permitted provided the copyright notice and this notice are preserved.