[project @ 2005-07-06 19:32:18 by unknown_lamer]
[clinton/bobotpp.git] / ChangeLog
1 2005-07-06 Clinton Ebadi <clinton@unknownlamer.org>
2
3 * bobot++.texinfo (Misc Scripting Stuff): Documented bot:who and
4 bot:whois
5
6 * source/Interp.C (interp_init_helper): Add bot:who and bot:whois
7 bindings to Scheme
8
9 * source/ScriptCommands.C (Who): Implemented Who method
10 Removed IQUEUE macro (no longer needed)
11 (Whois): Implemented Whois method
12
13 * source/ScriptCommands.H: Added Who and Whois methods
14
15 * source/Commands.C (Who): Implemented Who
16 (Whois): Implemented Whois
17
18 * source/Commands.H: Add Who and Whois tethods
19
20 * source/Interp.C: Updated copyright notice
21 (interp_init_helper): Remove send from CTCP/CTCPReply method names
22
23 * source/Interp.H: Updated copyright notice
24
25 * source/ScriptCommands.C (CTCP): Renamed from sendCTCP
26 (CTCPReply): Renamed from sendCTCPReply
27
28 2005-07-05 Clinton Ebadi <clinton@unknownlamer.org>
29
30 * bobot++.texinfo (Low Level Message Functions): Updated docs to
31 reflect new names for ctcp functions
32
33 * source/Interp.C (interp_init_helper): Register
34 ScriptCommands::Notice instead of sendNotice
35 (interp_init_helper): Renamed bot:send-ctcp to bot:ctcp
36 (interp_init_helper): Renamed bot:send-ctcp-reply to bot:ctcp-reply
37
38 * source/ScriptCommands.C (Notice): Renamed from sentNotice
39
40 * source/ScriptCommands.H: Renamed sendNotice to Notice
41
42 * bobot++.texinfo (Hook Types): Spelling fix
43
44 2005-07-04 Clinton Ebadi <clinton@unknownlamer.org>
45
46 * scripts/bobot-utils.scm (_deprecated-fun): Set
47 current-error-port to bot:logport while calling
48 issue-deprecation-warning
49
50 * bobot++.texinfo: Grammar fixes on the title page
51 (Configuration): Added more info on config files.
52 (bot.conf): Added xrefs for server syntax and channel syntax
53 (server syntax): Added more detail and moved a paragraph
54 (channel syntax): Added more details, revised the examples, and
55 moved some text around
56 (User Levels): Clarified
57 (Protection): Cleaned up
58 (Automatic Op): Improved substantially
59
60 * source/DCCManager.C (checkInput): Call hooks/dcc/chat-end if the
61 DCC CHAT has died
62
63 * scripts/bobot-utils.scm (bot:log): Updated to use bot:logport
64 instead of bot-logport
65
66 * source/Interp.C (interp_init_helper): Add hooks/dcc/chat-end
67 constant to Scheme
68
69 * bobot++.texinfo (DCC CHAT Hooks): Document hooks/dcc/chat-end
70
71 * source/BotInterp.H: Add DCC_CHAT_END to enum
72
73 * source/DCCManager.C (checkStale): Run hooks/dcc/chat-end when
74 deleting a stale connection.
75
76 2005-07-03 Clinton Ebadi <clinton@unknownlamer.org>
77
78 * bobot++.texinfo (Hook Types): Documented all hooks
79
80 * source/ServerQueue.C (sendPrivmsg): Changed SEND_MESSAGE hook to
81 match dest and pass dest to send hook
82
83 * bobot++.texinfo (Hook Types): Changed language of
84 hooks/dcc/chat-* hook documention
85 (Received Message Hooks): Added subsub section of Hook Types
86 (Sent Message Hooks): Added subsub section of Hook Types
87 (DCC CHAT Hooks): Added subsub section of Hook Types
88 (Miscellaneous Hooks): Added subsub section of Hook Types
89
90 * source/Parser.C (parseScriptFunction): Changed
91 lazy_apply_wrapper to Interp::LazyApplyWrapper
92 (parseScriptFunction): Changed empty_handler to Interp::EmptyHandler
93 (parsePart): Grammar fix in log (Leaved => Left)
94
95 * source/Interp.H (Interp): Added LazyHandler method
96
97 * source/BotInterp.C (RunHooks): changed lazy_apply_wrapper to
98 Interp::LazyApplyWrapper
99 (RunTimers): Changed empty_handler to Interp::EmptyHandler
100 (RunHooks): Changed empty_handler to Interp::EmptyHandler
101 (RunTimers): Changed lazy_apply_wrapper to Interp::LazyApplyWrapper
102
103 * source/Interp.C (LazyHandler): Renamed from lazy_handler
104 (ScmApplyWrapper): Renamed from scm_apply_wrapper
105 (EmptyHandler): Renamed from empty_handler
106
107 * source/Interp.H (Interp): Removed ErrorHandler method
108 (Interp): Added LazyApplyWrapper method
109 (Interp): Added EmptyHandler method
110 (Interp): Added ScmApplyWrapper method
111
112 * scripts/bobot-utils.scm: Added hooks/leave as an alias for hooks/part
113 Added begin-deprecated around deprecated definitions
114 (_deprecated-fun): Added macro to define an alias for a function
115 and issue a deprecation warning when used
116 Converted all bot- aliases to use _deprecated-fun
117
118 * source/Interp.C (interp_init_helper): Changed Hook::LEAVE to
119 Hook::PART
120 (interp_init_helper): Removed definition of hooks/leave
121
122 * bobot++.texinfo (Hook Types): Removed stub for hooks/leave, only
123 document hooks/part name (hooks/leave still exists, but will not
124 be documented as it is the same as hooks/part)
125
126 * source/Parser.C (parsePart): Use Hook::PART instead of Hook::LEAVE
127
128 * source/BotInterp.H: Removed Hook::LEAVE, added Hook::PART
129
130 * bobot++.texinfo (Scripting): Added note about most arguments
131 being strings
132
133 * source/Commands.C (NextServer): Call hooks/disconnect
134
135 * source/Bot.C (run): Pass extra argument to Hook::DISCONNECT
136
137 * bobot++.texinfo (Creating a Hook): Reformatted the bot:addhook
138 section to make it more readable
139 (Hook Types): Reformatted hooks/action
140 (Hook Types): Changed grammar of hooks/nickname (their => his)
141 (Hook Types): Documented hooks/signoff
142
143 2005-06-29 Clinton Ebadi <clinton@unknownlamer.org>
144
145 * bobot++.texinfo: Updated copyright years, changed "applies to
146 2.1.5" to 2.2
147
148 * source/Socket.C (readLine): return buf.substr (0, pos) instead
149 of using the String char * constructor (this should be faster,
150 especially for long strings since a simple copy is used instead of
151 going over each char until nul is encountered)
152
153 * configure.ac: Release 2.1.8
154 Change version to 2.1.9CVS
155
156 * source/Parser.C: Include Commands.H (fixes --disable-scripting build)
157
158 * source/Bot.C (Bot): Fix to make a --disable-scripting build work
159
160 * bobot++.texinfo (Configuration): Swapped order of config file
161 placement and config files
162 (User Levels): users not found in the user list *can* execute
163 commands as bot:user-none now.
164 (Low Level Message Functions): Changed a few @code{}s to @var{}s
165
166 2005-06-28 Clinton Ebadi <clinton@unknownlamer.org>
167
168 * bobot++.texinfo: @vskip Opt... => @vskip 0pt...
169
170 * source/Main.C (namespace): Added debug-scripts option
171
172 * source/Parser.C (parseCTCP): Hook::ACTION is now passed
173 from->getNick () instead of from->getAddress () (consistency fix)
174
175 * source/Main.C: Merged error handling patch from dsmith
176
177 * source/Parser.C: Merged error handling
178 patch from dsmith
179
180 * source/Interp.H: Merged error handling patch from dsmith
181
182 * source/Interp.C (lazy_handler): Merged error handling patch from
183 dsmith
184
185 * source/BotInterp.H: Merged error handling patch from dsmith
186
187 * source/BotInterp.C: Merged error handling patch from dsmith
188
189 * bobot++.texinfo (Low Level Message Functions): Documented
190 bot:send-ctcp-reply
191
192 * source/Parser.C (parseCTCP): Converted to use Commands::CTCPReply
193
194 * source/Interp.C (interp_init_helper): Bound bot:send-ctcp-reply
195 in scheme
196
197 * bobot++.texinfo (Low Level Message Functions):
198 s/bot:send-CTCP/bot:send-ctcp/
199
200 * source/Interp.C (interp_init_helper): Renamed bot:send-CTCP to
201 bot:send-ctcp
202
203 * source/ScriptCommands.H: Uncommented sendCTCPReply prototype
204
205 * source/ScriptCommands.C (sendCTCP): Convert to use Commands::CTCP
206 (sendCTCPReply): Added
207
208 * source/Parser.C (parseJoin): Convert to use Commands::CTCP
209
210 * source/Commands.C (CTCP): Implemented
211 (CTCPReply): Implemented
212 (Action): Convert to use Commands::CTCP
213
214 * source/Commands.H: Added CTCP (bot, target, command, message)
215 Added CTCPReply (bot, target, command, message)
216
217 2005-06-27 Clinton Ebadi <clinton@unknownlamer.org>
218
219 * examples/bot.conf (maxnicklength): Update example config
220
221 * source/Utils.C (valid_nickname_p): Use b->MAX_NICKLENGTH
222
223 * source/Bot.C (readConfig): Look for MAXNICKLENGTH parameter
224
225 * source/Bot.H: Added MAX_NICKLENGTH member
226
227 * source/Utils.H (valid_nickname_p): Now takes Bot* as first argument
228
229 * source/Commands.C (Msg): Send multiple PRIVMSGs when a message
230 is multiple lines
231
232 * source/UserCommands.C (SetVersion): Convert to use Commands::Notice
233
234 * source/Commands.C (Notice): Send multiple NOTICEs when a message
235 is multiple lines
236
237 2005-06-25 Clinton Ebadi <clinton@unknownlamer.org>
238
239 * source/Main.C (real_main): Enable Guile debugging mode when
240 --debug is used
241
242 * source/Interp.C (interp_post_startup_helper): Return
243 SCM_UNSPECIFIED instead of 0
244
245 2005-06-24 Clinton Ebadi <clinton@unknownlamer.org>
246
247 * All: Updated FSF street address
248
249 * source/Commands.C (Msg): Move body of Say to an if inside of this
250 (Say): Just call Msg
251
252 * source/ScriptCommands.C (sendNotice): Returns error code instead
253 of just #t or #f
254
255 * source/Commands.C (Say): Check to make sure target is a channel
256 (Msg): Extended to send messages to channels
257
258 2005-06-23 Clinton Ebadi <clinton@unknownlamer.org>
259
260 * scripts/bot.scm: Added file ((bobotpp bot) module for other
261 modules to gain access to bobot++ interface)
262
263 * source/Commands.C (Notice): Commented out check/abort if target
264 is a channel (there doesn't seem to be a reason for this to not work)
265
266 * source/Interp.C (interp_init_helper): Register bot:notice with scheme
267
268 * bobot++.texinfo (High Level Message Functions): Document bot:notice
269
270 * source/Message.H: Added operator== to Message (tests for error
271 code equality)
272
273 * source/Commands.C: Removed message type macros
274
275 * source/Message.H: Moved message type macros to Message.H
276
277 * source/ScriptCommands.C (sendNotice): Implemented sendNotice
278
279 * source/ScriptCommands.H: Uncomment sendNotice
280
281 * source/Bot.C (waitForInput): Use %02d when formatting
282 Hooks::TIMER argument instead of %2d, and switch to snprintf to
283 enforce max length
284
285 * bobot++.texinfo (Hooks): Clarified intro text about hooks (order
286 of processing).
287
288 * source/Bot.C (run): Added call to Hooks::DISCONNECT
289 (hooks/disconnect) when the bot is disconnected from the server
290
291 * bobot++.texinfo: Applied documentation patch from Dale P. Smith
292 (Hook Types): Added hooks/disconnect argument
293
294 2005-06-06 Clinton Ebadi <clinton@unknownlamer.org>
295
296 * bobot++.texinfo: Change @vskip 0 to @vskip 0pt to make this work
297 again (thanks dsmith)
298
299 2005-06-01 Clinton Ebadi <clinton@unknownlamer.org>
300
301 * source/Interp.C (interp_init_helper): Added
302 bot:protection/[none|ban|kick|deop] constants to Scheme
303 (interp_init_helper): Added bot:aop/[yes|no] constants
304
305 2005-05-31 Clinton Ebadi <clinton@unknownlamer.org>
306
307 * configure.ac: Release Bobot++ 2.1.7
308 Changed version to 2.18.CVS
309
310 * source/UserList.C (save): Remove workaround for BUG #2
311
312 * source/Parser.C (parse001): make realNick lowercase when doing
313 the comparison to bot->nickName to prevent pushing a second copy
314 of the bot onto the userlist (closes BUG #2)
315
316 * source/Bot.C (Bot): cleaned up constructor
317 (waitForInput): replaced gh_list with scm_list_n
318
319 * source/UserList.C: Cleaned up some formatting
320
321 * source/Main.C: Formatted code more cleanly
322 (real_main): changed a few Strings to std::strings
323
324 * source/String.C (operator): Made index signed again, it's not
325 worth fixing this warning
326
327 * source/Bot.C: Add casts to make this compile with unsigned int
328 as operator[] in String
329
330 * source/String.C (operator): Made index unsigned
331
332 * source/Utils.C: Made a few things unsigned to kill warnings
333
334 * source/Socket.C (readLine): Made pos unsigned
335
336 * source/Bot.C (Bot): Fixed initializer list order to kill warnings
337
338 * source/BotInterp.C (RunTimers): Removed unused variable (Timer *t)
339
340 * source/StringTokenizer.C (count_tokens): Changed return type to
341 unsigned int
342 (more_tokens_p): Made counter unsigned
343
344 * source/StringTokenizer.H (class StringTokenizer): Made pos
345 std::string::size_type instead of int
346
347 * source/Commands.C (TBan): Returns Ok is the ban is done instead
348 of falling off the end (oops)
349
350 * source/BotInterp.H: Add general catch case (false)
351
352 2005-03-11 Clinton Ebadi <clinton@unknownlamer.org>
353
354 * configure.ac: Release 2.1.6
355 Changed version to 2.1.7CVS
356
357 2005-02-28 Clinton Ebadi <clinton@unknownlamer.org>
358
359 * source/Parser.C (parseLine): use map<>::find and an iterator to
360 find the IRC command instead of map<>::operator[] to avoid a
361 potential segfault
362
363 * source/Bot.C (waitForInput): Removed commented out code
364
365 * source/Socket.C (readLine): return String (buf.c_str ()) instead
366 of String (buf) so that only the buffer up to the first null is returned
367 (readLine): Added a comment explaining the usage of buf
368 (readLine): Changed type of length (std::string::size_type instead
369 of std::size_t)
370
371 * source/String.C: Reimplemented String on top of std::string to
372 fix a few bugs and potential memory leaks
373 (toLower): use Utils::to_lower
374 (toUpper): Use Utils::to_upper
375 (trim): Use Utils::trim_str
376
377 * source/String.H: removed srep, replaced it with a std::string (my_string)
378
379 * source/Utils.C (to_upper): Applied patch from Jos Hulzink
380 <josh@stack.nl>
381 (trim_str): Appled patch from Jos Hulzink <josh@stack.nl> (fixes
382 counters and substr call)
383
384 * source/StringTokenizer.C (next_token): Applied patch from Jos
385 Hulzink <josh@stack.nl> (fixes substr call)
386 (rest): Applied patch from Jos Hulzink <josh@stack.nl> (fixes
387 substr call)
388
389 2005-02-27 Clinton Ebadi <clinton@unknownlamer.org>
390
391 * source/Bot.H (COPYRIGHT_STRING): Remove Michael Wilson because
392 he is a lazy bum and never submitted the String replacing patch
393
394 2005-01-23 Clinton Ebadi <clinton@unknownlamer.org>
395
396 * configure.ac: Remove CC++ test
397 Changed version to 2.1.6CVS (2.1.5 released)
398
399 * bobot++.texinfo: Updated copyright
400
401 2005-01-16 Clinton Ebadi <clinton@unknownlamer.org>
402
403 * TODO (General): Added TODO items
404 (2.2): Moved a few items here from 2.4
405
406 * README (NOTE): Mention boost requirement
407
408 2005-01-13 Clinton Ebadi <clinton@unknownlamer.org>
409
410 * ChangeLog Updated copryight
411
412 * source/User.H: Removed forward declaration of Utils
413
414 * source/Bot.H: Removed forward declaration of Utils
415
416 * source/ChannelList.H: Removed forward declaration of Utils
417
418 * source/UserListItem.H: Removed forward declaration of Utils
419
420 * source/Utils.H: Removed class Utils, replaced with a namspace
421 (it only contained static methods)
422
423 * source/Bot.H (COPYRIGHT_STRING): Added 2005 and Michael Wilson
424 (he is replacing String)
425
426 2005-01-12 Clinton Ebadi <clinton@unknownlamer.org>
427
428 * source/BotConfig.C (set_option_value): Put watcher calling
429 inside of if (cf_iter != end()) to fix a segfault (if the cf_iter
430 = end then there are no watchers since this is a new value and
431 references cf_iter->second segfaults)
432
433 * source/Utils.C (trim_str): Fixed bug (last non-space character
434 was being cut off)
435
436 * source/BotConfig.C (read_config): Made to use set_option_value
437 instead of manipulating options_db directly
438
439 * source/BotConfig.H (class BotConfig): Add set_option_value that
440 takes a t_value instead of t_value_list (most uss of
441 set_option_value will be to add a single value so this is very useful)
442
443 * source/BotConfig.C (set_option_value): Implemented
444
445 * source/UserList.C: Made to work with new Utils/StringTokenizer names
446
447 * source/UserCommands.C: Made to work with new
448 Utils/StringTokenizer names
449
450 * source/ShitList.C: Uses Utils.H now (Utils::trim_str & friends)
451
452 2005-01-11 Clinton Ebadi <clinton@unknownlamer.org>
453
454 * source/ShitList.C: Made to work with new StringTokenizer names
455
456 * source/ServerQueueItem.C: Made to work with new StringTokenizer names
457
458 * source/ServerQueue.C: Made to work with new Utils names
459
460 * source/ScriptCommands.C: Made work with new Utils names
461
462 * source/Person.C (getNick): Made work with new Utils names
463
464 * source/String.H: Added substr prototypes
465
466 * source/String.C (substr): Added substr as an alias of subString
467 (for compat with std::string before the transition)
468
469 * source/Parser.C: Made to work with new Utils/StringTokenizer names
470
471 * source/DCCParser.C: Made to work with new Utils names
472
473 * source/DCCChatConnection.C: Made to work new Utils names
474
475 * source/Commands.C: Made to work with new Utils names
476
477 * source/Channel.C: Made to work with new Utils names
478
479 * source/BotInterp.C: Made to work with new Utils
480
481 * source/Bot.C: Made to work with new Utils/StringTokenizer names
482
483 * source/String.C (operator=): Unremoved operator=(std::string)
484
485 * source/String.H: Unremoved operator=(std::string)
486
487 * source/BotConfig.C (read_config): Use Utils::trim_str
488
489 * source/String.C (trim): Fixed bug (p->s[i] == '\r', s/i/j/)
490
491 * source/Utils.C (trim_str): Implemented
492
493 * source/Utils.H: Added tim_str (replaces String::trim)
494
495 * source/BotConfig.C: Made everything work with new
496 StringTokenizer and Utils names
497
498 * source/Utils.H: Added to_lower
499 Added to_upper
500
501 * source/StringTokenizer.C (rest): uses std::isspace instead of
502 checking st[pos] against ' ' and '\t'
503
504 * source/StringTokenizer.H: Removed CamelCasing
505 Renamed hasMoreTokens to more_tokens_p
506
507 * source/StringTokenizer.C: Converted to use std::string
508
509 * source/StringTokenizer.H: Converted to use std::string
510
511 * source/String.C: Removed operator=(std::string)
512
513 * source/String.H: Removed operator=(std::string)
514
515 * source/Utils.C: Added copyright
516 Reformatted to match GNU coding standard more closely
517 Converted everything to use std::string
518 (get_nick): Renamed from getNick
519 (get_userhost): Renamed from getUserHost
520 (get_key): Renamed from getKey
521 (IP_p): Renamed from isIP
522 (make_wildcard): Renamed from makeWildcard
523 (channel_p): Renamed from isChannel
524 (wildcard_p): Renamed from isWildcard
525 (valid_channel_name_p): Renamed from isValidChannelName
526 (valid_nickname_p): Renamed from isValidNickName
527 (get_level): Renamed from getLevel
528 (str2time): Renamed from strToTime
529 (str2time): Fixed potential buffer overflow (num[512] => std::string)
530 (level2str): Renamed from levelToStr
531 (prot2str): Renamed from protToStr
532 (bool2str): Renamed from boolToStr
533 (long2str): Implemented
534 (scm2str): Renamed from scm2String
535 (str2scm): Renamed from string2SCM
536
537 * source/BotConfig.C: Reformatted to fit GNU coding style more closely
538
539 * source/Utils.H: Added long2str (long int -> std::string)
540
541 * source/String.H: Added 2003 copyright (the year I last modified
542 it in)
543
544 * source/String.C: Added 2002 copyright (the year I last modified
545 it in)
546
547 * source/Utils.H: Updated Copyright
548 s/String/std::string/g
549 Removed camel casing and is* = *_p
550 xToY = x2y
551
552 * source/BotConfig.C: Updated Copyright
553
554 * source/BotConfig.H: Updated copyright
555
556 2005-01-08 Clinton Ebadi <clinton@unknownlamer.org>
557
558 * source/BotConfig.C (set_option_value): Take care of the case
559 where key is not already in the db
560 (add_watcher): Implemented
561 (read_config): Removed ',' token parsing (not needed)
562
563 * configure.ac: Add AC_LANG([C++]) so we can check for C++ libs
564 AC_CHECK_LIB ccgnu2 (CommonC++2)
565
566 * README: Updated README (reformatted, adding info, etc.)
567
568 2005-01-07 Clinton Ebadi <clinton@unknownlamer.org>
569
570 * source/BotConfig.C (set_option_value): call watcher list
571 (run_fun_): Added to support watcher list calling
572
573 2005-01-06 Clinton Ebadi <clinton@unknownlamer.org>
574
575 * source/BotConfig.C (set_option_value): Fuck you STL
576 (push_back_): Reimplemented so that it doesn't need std::bind1st
577 because the STL is being stupid
578
579 2004-12-26 Clinton Ebadi <clinton@unknownlamer.org>
580
581 * source/BotConfig.C (read_config): Implemented properly
582 (get_option_values): Implemented properly
583 (set_config_file): Fixed
584
585 2004-07-10 Clinton Ebadi <clinton@unknownlamer.org>
586
587 * bobot++.texinfo (Built-In Commands): Added empty stubs to the
588 list of commands
589
590 2004-06-22 Clinton Ebadi <clinton@unknownlamer.org>
591
592 * source/BotConfig.C: New file (implementation of configuration database)
593
594 * source/BotConfig.H: New File (semi-generic configuration database)
595
596 2004-06-17 Clinton Ebadi <clinton@unknownlamer.org>
597
598 * bobot++.texinfo (Starting the Bot): New section
599
600 2004-06-14 Clinton Ebadi <clinton@unknownlamer.org>
601
602 * bobot++.texinfo (Protection): Added Section
603 (User Levels): Rewrote section to be useful
604 (bot.users): Added section
605
606 2004-06-12 Clinton Ebadi <clinton@unknownlamer.org>
607
608 * source/DCCChatConnection.C (connect): Checks to make sure the
609 person initiating a DCC CHAT with the bot is at least a FRIEND of
610 the bot.
611
612 * README: Fixed a typo
613
614 * scripts/bobot-utils.scm (ctcp-quote): Implemented ctcp-quote
615 (bot:ctcp-quote): Renamed ctcp-quote to bot:ctcp-quite (whoops)
616
617 2004-05-28 Clinton Ebadi <clinton@unknownlamer.org>
618
619 * bobot++.texinfo (bot.conf): Finished section
620 (server syntax): New section, documents the bot.conf SERVER syntax
621 (channel syntax): New section, documentes the bot.conf CHANNEL syntax
622
623 2004-05-13 Clinton Ebadi <clinton@unknownlamer.org>
624
625 * source/Main.C (real_main): std::exit instead of exit
626
627 2004-05-12 Clinton Ebadi <clinton@unknownlamer.org>
628
629 * source/DCCConnection.C (DCCConnection): Intialized `nuh' in the
630 constructor with `n' This should fix the segfaulting.
631
632 2004-01-28 Clinton Ebadi <clinton@unknownlamer.org>
633
634 * ChangeLog: Updated copyright notice
635
636 2004-01-09 Clinton Ebadi <clinton@unknownlamer.org>
637
638 * source/Interp.C (interp_init_helper): Register
639 bot:change-command-level
640
641 * source/ScriptCommands.C (ChangeCommandLevel): Added
642 ChangeCommandLevel to change the level a user needs to be to run a
643 command
644
645 * source/ScriptCommands.H: Added ChangeCommandLevel
646
647 2003-10-12 Clinton Ebadi <clinton@unknownlamer.org>
648
649 * source/String.H: Changed #define STRING_H to BSTRING_H
650
651 2003-08-04 Clinton Ebadi <clinton@unknownlamer.org>
652
653 * scripts/bobot-utils.scm (bot:sent-to-me?): New procedure, used
654 to see if a message was sent to the bot (this is better than
655 bot:match-to-me because the hook isn't invalidated when the bot's
656 nickname changes)
657
658 * source/DCCConnection.H: Added `nuh' back and added an
659 accessor (get_nuh)
660 Added setter `set_autoRemove(bool)'
661
662 * source/DCCConnection.H: Removed all friends
663 Added accessors (get_bot, get_lastSpoken, get_autoRemove; get_bot
664 reveals the pointer to the bot [PRIVATE POINTER] which probably
665 isn't so nice, but there isn't much to be done about it with the
666 current design of the bot)
667
668 * source/DCCChatConnection.H: Removed all friends
669
670 * source/DCCConnection.H: DCCConnection is now a pure virtual
671 class with the subclass DCCChatConnection
672
673 2003-07-29 Clinton Ebadi <clinton@unknownlamer.org>
674
675 * source/Socket.C (connect): log errors to the bot log instead of
676 printing to stderr
677
678 2003-07-23 Clinton Ebadi <clinton@unknownlamer.org>
679
680 * source/Parser.C (parseMessage): use the find method of std::map
681 to find the command to call instead of [] and then extract the
682 pointer to the userFunction from that if it exists. This appears
683 to fix the crash when one uses an undefined command followed by
684 any defined command.
685
686 2003-04-09 Clinton Ebadi <clinton@unknownlamer.org>
687
688 * source/Interp.C (interp_init_helper): Bind bot:setfloodrate to
689 ScriptCommands::SetFloodRate
690
691 * source/ScriptCommands.C (SetFloodRate): New Method: SetFloodRate
692
693 * source/Bot.C (init_user_functions): Make SETFLOODRATE available
694 to bot master
695
696 * source/Bot.H: Made MAX_MESSAGES writeable
697
698 * source/UserCommands.H: New method: SetFloodRate
699
700 * source/Commands.H: New method: SetFloodRate
701
702 2003-04-03 Clinton Ebadi <clinton@unknownlamer.org>
703
704 * configure.ac: Merged all AC_OUTPUTs at the end
705
706 2003-04-02 Clinton Ebadi <clinton@unknownlamer.org>
707
708 * scripts/bobot-utils.scm: Make exported symbols from
709 the-bot-module available in the guile-user module so that scripts
710 loaded with Interp::Load function.
711
712 2003-03-30 Clinton Ebadi <clinton@unknownlamer.org>
713
714 * scripts/bobot-utils.scm (bot:load-module): Loads a file from the
715 %bot:loadpath into its own module and returns that (unnamed) module
716 (bot:use-module): Calls bot:load-module and then adds the newly
717 loaded module to the (current-module)'s use-list
718
719 * source/Interp.C (interp_init_helper): New procedure to initialize
720 the-bot-module (this is the old Interp::Startup verbatim)
721 (interp_post_startup_helper): New procedure to export
722 the-bot-module from bot_module
723 (Startup): Now calls interp_init_helper and
724 interp_post_startup_helper to initalize the bot module system
725
726 * source/Interp.H: Added private variable bot_module to Interp
727
728 2002-11-04 Clinton Ebadi <clinton@unknownlamer.org>
729
730 * scripts/bobot-utils.scm: Added bot: to regex functions (yes,
731 this breaks existing scripts, this is the unstable tree after all)
732
733 2002-11-03 Clinton Ebadi <clinton@unknownlamer.org>
734
735 * source/Mask.C (match): Made Mask::match case insensitive
736
737 2002-09-23 Clinton Ebadi <clinton@unknownlamer.org>
738
739 * source/Interp.C (scm_apply_wrapper): turned off locking of
740 Interp::mutex to see if this makes the bot work again...and it
741 does!
742
743 2002-09-07 Clinton Ebadi <clinton@unknownlamer.org>
744
745 * configure.ac: Removed arguments to AM_INIT_AUTOMAKE and updated
746 everything to use aclocal/automake 1.6
747
748 2002-08-27 Clinton Ebadi <clinton@unknownlamer.org>
749
750 * source/DCCPerson.H (class DCCPerson): Added
751 UserCommands::DCCList as a friend (friends are better than the old
752 DCC() function at least).
753
754 * source/DCCManager.H (class DCCManager): Added
755 UserCommands::DCCList as a friend
756
757 * source/Interp.H (class Interp): Made function scm_apply_wrapper
758 a friend so it can lock Interp::mutex
759
760 * source/Interp.C (scm_apply_wrapper): Lock Interp::mutex if
761 MULTITHREAD is defined (it is always defined when scripting is
762 enabled) so that Sockets can be made multithreaded using
763 CommonC++.
764
765 * source/DCCPerson.H: Removed DCC method and made Bot a friend
766 Made DCCManager a friend
767
768 * source/DCCManager.H (class DCCManager): Removed MAP() method
769 and made Bot a friend of DCCManager
770
771 2002-08-18 Clinton Ebadi <clinton@unknownlamer.org>
772
773 * source/Interp.C (Startup): Renamed bot:DCC-chat-send to
774 bot:dcc-chat-send.
775
776 * bobot++.texinfo (Hook Types): Fixed a typo (I wrote
777 user!nick@host instead of the correct nick!user@host).
778
779 * source/Interp.C (Startup): Register bot:DCC-chat-send
780
781 * source/ScriptCommands.C (sendDCCChatMessage): Added method again
782
783 2002-08-08 Clinton Ebadi <clinton@unknownlamer.org>
784
785 * source/String.C (String): The std::string copy constructor now
786 extracts the c_str of the std::string and then takes the strlen of
787 that before copying it. This fixes a bug with DCC where if you did
788 e.g. "!help" the bot would reply with "No TOPIC PRIVMSG FOUND" or
789 something like that, depending on what the last message was
790 because Socket will insert a \0 into its semi-static buffer, so
791 the len of the String will not equal the strlen of its char*.
792
793 2002-08-07 Clinton Ebadi <clinton@unknownlamer.org>
794
795 * source/DCCPerson.H: Removed destructor (I = idiot)
796
797 * source/DCCConnection.H: DCCManager is now a friend of
798 DCCConnection (ugh, the bot has way too many friends).
799
800 * source/DCCPerson.H: Added DCC member that returns a const
801 DCCConnection* (the dcc connection). This isn't saved anywhere
802 because when a DCCPerson is destroyed, its connection is also
803 destroyed.
804
805 * source/Bot.H: dccConnections is now a DCCManager
806
807 * source/DCCPerson.H: Added destructor
808 Added handleInput method
809
810 * source/DCCManager.C: New file
811 (addConnection): Wrote method, add a DCCConection to the manager
812
813 * source/DCCManager.H: New file
814
815 * source/Interp.C (Startup): Register bot:DCC-chat-send
816 (Startup): Removed sendDCCChatMessage stuff
817
818 * source/ScriptCommands.C (sendDCCChatMessage): New method:
819 sendDCCChatMessage (to, message) sends message to to.
820
821 * source/DCCConnection.C (connect): Run DCC_CHAT_BEGIN hook with
822 one arg: from (user!nick@host).
823
824 * source/DCCParser.C (parseLine): Runs DCC_CHAT_MESSAGE hook with
825 two args: from (user!nick@host) and line
826
827 2002-08-06 Clinton Ebadi <clinton@unknownlamer.org>
828
829 * source/Interp.C (Startup): Two new Scheme values:
830 hooks/dcc/chat-begin and hooks/dcc/chat-message for the
831 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE hooks.
832
833 * source/BotInterp.H: Added two new enum values to Hook:
834 DCC_CHAT_BEGIN and DCC_CHAT_MESSAGE for the DCC chat start and DCC
835 chat message hooks
836
837 2002-08-05 Clinton Ebadi <clinton@unknownlamer.org>
838
839 * source/Parser.C (parseCTCP): Removed call to htonl and fixed
840 DCC! Ack, sockets take their arguments in network byte order so
841 there is no need to convert to host...now DCC _sort of_ works.
842
843 2002-08-04 Clinton Ebadi <clinton@unknownlamer.org>
844
845 * source/UserList.C (save): Increment iterator twice to get around
846 bug (see BUGS #2)
847
848 * source/ServerQueue.C: Now sends SEND_* hooks instead of
849 triggered general hooks.
850
851 * source/Interp.C (Startup): New scheme side defines: hooks/send/*
852 (* = the new SEND_ hooks, but lowercase).
853
854 * source/BotInterp.H: New hook types (SEND_..., ... = ACTION,
855 CTCP, PUBLIC, MESSAGE). These are triggered on send messages.
856
857 2002-08-01 Clinton Ebadi <clinton@unknownlamer.org>
858
859 * source/Bot.C (set_log_file): Oops! Fixed logging. Now the bot
860 logs again.
861
862 * source/Socket.C (readLine): Now uses a static std::string that
863 starts out with 512 chars. This will never need to be resized for
864 usualy IRC messages, but might be for DCC messages
865
866 2002-07-31 Clinton Ebadi <clinton@unknownlamer.org>
867
868 * scripts/bobot-utils.scm (not-from-me): New syntax.
869
870 * source/ScriptCommands.C (AddHook): Now takes another optional
871 arg--name that will name the hook (see the hooks section in the
872 manual for what this does).
873
874 * source/BotInterp.H: Added name field to Hook
875
876 2002-07-29 Clinton Ebadi <clinton@unknownlamer.org>
877
878 * source/ServerQueue.C (sendPrivmsg): Now calls hooks on own
879 PRIVMSGes because the IRC server doesn't echo them back to the
880 bot. This could be useful for something (e.g. log script).
881
882 2002-07-27 Clinton Ebadi <clinton@unknownlamer.org>
883
884 * source/Interp.C (Shutdown): Runs bot:exit-hook hooks
885 (Startup): New var for Scheme: bot:exit-hook. Calls the thunks
886 associated with the hook when Interp::Shutdown is called (bot exit).
887
888 2002-07-23 Clinton Ebadi <clinton@unknownlamer.org>
889
890 * source/BotInterp.H (Hook<): Changed behavior of Hook's <. If a
891 hook is greater than or less than the other hook, only the
892 priority is considered. However, if both hooks have the same
893 priority, then the fallthru-ness is considered, with fallthru
894 hooks being greater than non-fallthru hooks.
895
896 * source/BotInterp.C (hptr_lt): Added this static function to be
897 used to sort the hooks list (now hooks should be sorted using
898 Hook's operator < instead of using pointer comparision, meaning
899 the new hook system will work correctly)
900
901 * scripts/bobot-utils.scm: Make bot:log use for-each instead of
902 map because we don't need the result of the displays (this would
903 just be a list of #<undefined> values and is a waste of memory).
904
905 2002-07-13 Clinton Ebadi <clinton@unknownlamer.org>
906
907 * source/Bot.C (Bot): userFunctions is now a map for efficiency
908 (worst case search is now NlogN instead of N). This improvement is
909 not as drastic as the one gained by making the Parser functions
910 list a map (because we don't scan this map for every message), but
911 it helps to clean up the code
912
913 2002-07-12 Clinton Ebadi <clinton@unknownlamer.org>
914
915 * source/Parser.H: Removed userFunctionsStruct
916
917 * source/Interp.C (Startup): ScriptCommands::sendCTCP registered
918 as bot:send-CTCP for Scheme
919
920 * source/ScriptCommands.C (sendCTCP): Wrote sendCTCP
921
922 2002-07-11 Clinton Ebadi <clinton@unknownlamer.org>
923
924 * source/ServerQueue.C (sendUser): Changed . . in USER command to
925 0 * (which is the Right Way to because <mode> must be a number...)
926
927 * source/Parser.C (init): New method of Parse. This initalizes the
928 functions map. functions replaces the old functions array, and
929 should yield better performance (since the functions array had to
930 be scanned for every incoming message)
931
932 * source/Parser.H: New member, functions (private)
933
934 2002-07-10 Clinton Ebadi <clinton@unknownlamer.org>
935
936 * source/Interp.C (Startup): New symbols: bot:user-*
937 [none|user|trusted|friend|master] are defined in Scheme as the
938 different levels of the users.
939 (Startup): All bot-* variables are now bot:*
940
941 2002-07-09 Clinton Ebadi <clinton@unknownlamer.org>
942
943 * source/Bot.H: Made some variables private because they shouldn't
944 be changed at runtime
945
946 * source/Parser.C (parseCTCP): Reneabled DCC CHAT (I want to test
947 this out to see if it works and make it work)
948
949 * source/Bot.C (Bot::Bot): New var: logs_dir. Set to the log file
950 dir.
951
952 * scripts/bobot-utils.scm: Fixed a typo (I forgot the / after
953 scripts in the user scripts dir) that made bobot++ not able to
954 load scripts from the user scripts dir
955
956 2002-07-08 Clinton Ebadi <clinton@unknownlamer.org>
957
958 * source/BotInterp.C (RunHooks): Changed iterators to
959 reverse_iterators because the hooks list is sorted in ascending
960 order--higher priority and fallthrough hooks appear _after_ the
961 lower priority and non-fallthrough hooks.
962
963 * source/Main.C (print_long_help): Added function
964 (print_short_help): Renamed from printUsage
965 (namespace): Most stuff in here is now defined in an anonymouse
966 namespace so it doesn't have external linkage
967 (real_main): Uses getopt_long instead of getopt. Added several
968 command line arguments (bobotpp --help for a full list).
969
970 * scripts/bobot-utils.scm (bot-load): Function moved from
971 bobot-scheme.scm
972
973 * source/Interp.C (Startup): Autoloads
974 PREFIX/bobotpp/scripts/bobot-utils.scm now
975 (Startup): New Scheme variable: bot-sys-scripts-dir (system
976 scripts dir)
977
978 * source/bobot-scheme.scm.in: Removed
979
980 * source/Makefile.am: Removed bobot-scheme.scm compiliation
981
982 * configure.ac (PREFIX): configure.ac defined prefix now
983
984 * source/Main.C (real_main): Default configuration is now read
985 from /etc/bobotpp/default
986 * source/bobot-scheme.scm.in: Added file. This defines the
987 'bot-load' procedure which will load a file from
988 $HOME/.bobotpp/scripts/ or @datadir@/bobotpp/scripts/ if the
989 script doesn't exist in the user script dir.
990
991 2002-07-01 Clinton Ebadi <clinton@unknownlamer.org>
992
993 * bobot++.texinfo: Started docs (just a skeleton right now)
994
995 * source/ScriptCommands.C (AddHook): Now takes pri and fall opt
996 args to set a hooks priority and whether or not it will
997 fallthrough. These args are optional.
998
999 * source/Interp.C (Startup): addhook now takes 3 req and 2 opt args
1000
1001 * source/BotInterp.C (AddHook): Now uses priority and fallthrough
1002 (RunHooks): exec fallthrough hooks first.
1003
1004 * source/BotInterp.H: Changed Hooks to have priority
1005 Added fhooksMap to BotInterp (fallthrough)
1006
1007 * source/UserCommands.C (AddShit): Converted to use Commands
1008
1009 2002-06-21 Clinton Ebadi <clinton@unknownlamer.org>
1010
1011 * source/Commands.C (AddUser): Fixed a one-off (function call was
1012 before a brace instead of after one) that caused a segfault when
1013 the user mask was a wildcard
1014
1015 2002-06-20 Clinton Ebadi <clinton@unknownlamer.org>
1016
1017 * all files: Updated address of the FSF
1018
1019 * source/UserCommands.C (AddUser): Uses Commands now instead of
1020 manipulating the bot directly
1021
1022 2002-06-18 Clinton Ebadi <clinton@unknownlamer.org>
1023
1024 * source/ScriptCommands.C (AddShit): Filled in function.
1025
1026 * source/Interp.C (Startup): Bind bot-adduser to
1027 ScriptCommands::AddUser instead of Action
1028 (Startup): Bind bot-addshit to ScriptCommands::AddShit
1029
1030 * source/ScriptCommands.C (AddUser): Filled in function
1031
1032 * source/ServerList.C (delServer): Changed (n - 1) to n...n-1
1033 would have caused problems if you used more than one server
1034
1035 * source/Parser.H: Changed const char* to String in userFunctionStruct
1036
1037 * source/String.H: Added std::string compatibility members
1038
1039 * configure.ac: You can now disable Crypt and scripting
1040
1041 * source/*: Added #include "config.h" where needed
1042
1043 * configure.ac: Added AM_CONFIG_HEADER
1044
1045 * config.h.in: added file
1046
1047 * source/Queue.C: Didn't notice iostream.h here! Fixed
1048
1049
1050 Copyright 2002,2003,2004,2005 Clinton Ebadi
1051 Copying and distribution of this file, with or without modification, are
1052 permitted provided the copyright notice and this notice are preserved.