[project @ 2005-01-06 18:19:16 by unknown_lamer]
[clinton/bobotpp.git] / ChangeLog
1 2005-01-06 Clinton Ebadi <clinton@unknownlamer.org>
2
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
6
7 2004-12-26 Clinton Ebadi <clinton@unknownlamer.org>
8
9 * source/BotConfig.C (read_config): Implemented properly
10 (get_option_values): Implemented properly
11 (set_config_file): Fixed
12
13 2004-07-10 Clinton Ebadi <clinton@unknownlamer.org>
14
15 * bobot++.texinfo (Built-In Commands): Added empty stubs to the
16 list of commands
17
18 2004-06-22 Clinton Ebadi <clinton@unknownlamer.org>
19
20 * source/BotConfig.C: New file (implementation of configuration database)
21
22 * source/BotConfig.H: New File (semi-generic configuration database)
23
24 2004-06-17 Clinton Ebadi <clinton@unknownlamer.org>
25
26 * bobot++.texinfo (Starting the Bot): New section
27
28 2004-06-14 Clinton Ebadi <clinton@unknownlamer.org>
29
30 * bobot++.texinfo (Protection): Added Section
31 (User Levels): Rewrote section to be useful
32 (bot.users): Added section
33
34 2004-06-12 Clinton Ebadi <clinton@unknownlamer.org>
35
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
38 the bot.
39
40 * README: Fixed a typo
41
42 * scripts/bobot-utils.scm (ctcp-quote): Implemented ctcp-quote
43 (bot:ctcp-quote): Renamed ctcp-quote to bot:ctcp-quite (whoops)
44
45 2004-05-28 Clinton Ebadi <clinton@unknownlamer.org>
46
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
50
51 2004-05-13 Clinton Ebadi <clinton@unknownlamer.org>
52
53 * source/Main.C (real_main): std::exit instead of exit
54
55 2004-05-12 Clinton Ebadi <clinton@unknownlamer.org>
56
57 * source/DCCConnection.C (DCCConnection): Intialized `nuh' in the
58 constructor with `n' This should fix the segfaulting.
59
60 2004-01-28 Clinton Ebadi <clinton@unknownlamer.org>
61
62 * ChangeLog: Updated copyright notice
63
64 2004-01-09 Clinton Ebadi <clinton@unknownlamer.org>
65
66 * source/Interp.C (interp_init_helper): Register
67 bot:change-command-level
68
69 * source/ScriptCommands.C (ChangeCommandLevel): Added
70 ChangeCommandLevel to change the level a user needs to be to run a
71 command
72
73 * source/ScriptCommands.H: Added ChangeCommandLevel
74
75 2003-10-12 Clinton Ebadi <clinton@unknownlamer.org>
76
77 * source/String.H: Changed #define STRING_H to BSTRING_H
78
79 2003-08-04 Clinton Ebadi <clinton@unknownlamer.org>
80
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
84 nickname changes)
85
86 * source/DCCConnection.H: Added `nuh' back and added an
87 accessor (get_nuh)
88 Added setter `set_autoRemove(bool)'
89
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)
95
96 * source/DCCChatConnection.H: Removed all friends
97
98 * source/DCCConnection.H: DCCConnection is now a pure virtual
99 class with the subclass DCCChatConnection
100
101 2003-07-29 Clinton Ebadi <clinton@unknownlamer.org>
102
103 * source/Socket.C (connect): log errors to the bot log instead of
104 printing to stderr
105
106 2003-07-23 Clinton Ebadi <clinton@unknownlamer.org>
107
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
112 any defined command.
113
114 2003-04-09 Clinton Ebadi <clinton@unknownlamer.org>
115
116 * source/Interp.C (interp_init_helper): Bind bot:setfloodrate to
117 ScriptCommands::SetFloodRate
118
119 * source/ScriptCommands.C (SetFloodRate): New Method: SetFloodRate
120
121 * source/Bot.C (init_user_functions): Make SETFLOODRATE available
122 to bot master
123
124 * source/Bot.H: Made MAX_MESSAGES writeable
125
126 * source/UserCommands.H: New method: SetFloodRate
127
128 * source/Commands.H: New method: SetFloodRate
129
130 2003-04-03 Clinton Ebadi <clinton@unknownlamer.org>
131
132 * configure.ac: Merged all AC_OUTPUTs at the end
133
134 2003-04-02 Clinton Ebadi <clinton@unknownlamer.org>
135
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.
139
140 2003-03-30 Clinton Ebadi <clinton@unknownlamer.org>
141
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
146
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
153
154 * source/Interp.H: Added private variable bot_module to Interp
155
156 2002-11-04 Clinton Ebadi <clinton@unknownlamer.org>
157
158 * scripts/bobot-utils.scm: Added bot: to regex functions (yes,
159 this breaks existing scripts, this is the unstable tree after all)
160
161 2002-11-03 Clinton Ebadi <clinton@unknownlamer.org>
162
163 * source/Mask.C (match): Made Mask::match case insensitive
164
165 2002-09-23 Clinton Ebadi <clinton@unknownlamer.org>
166
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
169 does!
170
171 2002-09-07 Clinton Ebadi <clinton@unknownlamer.org>
172
173 * configure.ac: Removed arguments to AM_INIT_AUTOMAKE and updated
174 everything to use aclocal/automake 1.6
175
176 2002-08-27 Clinton Ebadi <clinton@unknownlamer.org>
177
178 * source/DCCPerson.H (class DCCPerson): Added
179 UserCommands::DCCList as a friend (friends are better than the old
180 DCC() function at least).
181
182 * source/DCCManager.H (class DCCManager): Added
183 UserCommands::DCCList as a friend
184
185 * source/Interp.H (class Interp): Made function scm_apply_wrapper
186 a friend so it can lock Interp::mutex
187
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
191 CommonC++.
192
193 * source/DCCPerson.H: Removed DCC method and made Bot a friend
194 Made DCCManager a friend
195
196 * source/DCCManager.H (class DCCManager): Removed MAP() method
197 and made Bot a friend of DCCManager
198
199 2002-08-18 Clinton Ebadi <clinton@unknownlamer.org>
200
201 * source/Interp.C (Startup): Renamed bot:DCC-chat-send to
202 bot:dcc-chat-send.
203
204 * bobot++.texinfo (Hook Types): Fixed a typo (I wrote
205 user!nick@host instead of the correct nick!user@host).
206
207 * source/Interp.C (Startup): Register bot:DCC-chat-send
208
209 * source/ScriptCommands.C (sendDCCChatMessage): Added method again
210
211 2002-08-08 Clinton Ebadi <clinton@unknownlamer.org>
212
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*.
220
221 2002-08-07 Clinton Ebadi <clinton@unknownlamer.org>
222
223 * source/DCCPerson.H: Removed destructor (I = idiot)
224
225 * source/DCCConnection.H: DCCManager is now a friend of
226 DCCConnection (ugh, the bot has way too many friends).
227
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
231 destroyed.
232
233 * source/Bot.H: dccConnections is now a DCCManager
234
235 * source/DCCPerson.H: Added destructor
236 Added handleInput method
237
238 * source/DCCManager.C: New file
239 (addConnection): Wrote method, add a DCCConection to the manager
240
241 * source/DCCManager.H: New file
242
243 * source/Interp.C (Startup): Register bot:DCC-chat-send
244 (Startup): Removed sendDCCChatMessage stuff
245
246 * source/ScriptCommands.C (sendDCCChatMessage): New method:
247 sendDCCChatMessage (to, message) sends message to to.
248
249 * source/DCCConnection.C (connect): Run DCC_CHAT_BEGIN hook with
250 one arg: from (user!nick@host).
251
252 * source/DCCParser.C (parseLine): Runs DCC_CHAT_MESSAGE hook with
253 two args: from (user!nick@host) and line
254
255 2002-08-06 Clinton Ebadi <clinton@unknownlamer.org>
256
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.
260
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
263 chat message hooks
264
265 2002-08-05 Clinton Ebadi <clinton@unknownlamer.org>
266
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.
270
271 2002-08-04 Clinton Ebadi <clinton@unknownlamer.org>
272
273 * source/UserList.C (save): Increment iterator twice to get around
274 bug (see BUGS #2)
275
276 * source/ServerQueue.C: Now sends SEND_* hooks instead of
277 triggered general hooks.
278
279 * source/Interp.C (Startup): New scheme side defines: hooks/send/*
280 (* = the new SEND_ hooks, but lowercase).
281
282 * source/BotInterp.H: New hook types (SEND_..., ... = ACTION,
283 CTCP, PUBLIC, MESSAGE). These are triggered on send messages.
284
285 2002-08-01 Clinton Ebadi <clinton@unknownlamer.org>
286
287 * source/Bot.C (set_log_file): Oops! Fixed logging. Now the bot
288 logs again.
289
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
293
294 2002-07-31 Clinton Ebadi <clinton@unknownlamer.org>
295
296 * scripts/bobot-utils.scm (not-from-me): New syntax.
297
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).
301
302 * source/BotInterp.H: Added name field to Hook
303
304 2002-07-29 Clinton Ebadi <clinton@unknownlamer.org>
305
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).
309
310 2002-07-27 Clinton Ebadi <clinton@unknownlamer.org>
311
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).
315
316 2002-07-23 Clinton Ebadi <clinton@unknownlamer.org>
317
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.
323
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)
328
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).
332
333 2002-07-13 Clinton Ebadi <clinton@unknownlamer.org>
334
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
340
341 2002-07-12 Clinton Ebadi <clinton@unknownlamer.org>
342
343 * source/Parser.H: Removed userFunctionsStruct
344
345 * source/Interp.C (Startup): ScriptCommands::sendCTCP registered
346 as bot:send-CTCP for Scheme
347
348 * source/ScriptCommands.C (sendCTCP): Wrote sendCTCP
349
350 2002-07-11 Clinton Ebadi <clinton@unknownlamer.org>
351
352 * source/ServerQueue.C (sendUser): Changed . . in USER command to
353 0 * (which is the Right Way to because <mode> must be a number...)
354
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)
359
360 * source/Parser.H: New member, functions (private)
361
362 2002-07-10 Clinton Ebadi <clinton@unknownlamer.org>
363
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:*
368
369 2002-07-09 Clinton Ebadi <clinton@unknownlamer.org>
370
371 * source/Bot.H: Made some variables private because they shouldn't
372 be changed at runtime
373
374 * source/Parser.C (parseCTCP): Reneabled DCC CHAT (I want to test
375 this out to see if it works and make it work)
376
377 * source/Bot.C (Bot::Bot): New var: logs_dir. Set to the log file
378 dir.
379
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
383
384 2002-07-08 Clinton Ebadi <clinton@unknownlamer.org>
385
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.
390
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).
397
398 * scripts/bobot-utils.scm (bot-load): Function moved from
399 bobot-scheme.scm
400
401 * source/Interp.C (Startup): Autoloads
402 PREFIX/bobotpp/scripts/bobot-utils.scm now
403 (Startup): New Scheme variable: bot-sys-scripts-dir (system
404 scripts dir)
405
406 * source/bobot-scheme.scm.in: Removed
407
408 * source/Makefile.am: Removed bobot-scheme.scm compiliation
409
410 * configure.ac (PREFIX): configure.ac defined prefix now
411
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.
418
419 2002-07-01 Clinton Ebadi <clinton@unknownlamer.org>
420
421 * bobot++.texinfo: Started docs (just a skeleton right now)
422
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.
426
427 * source/Interp.C (Startup): addhook now takes 3 req and 2 opt args
428
429 * source/BotInterp.C (AddHook): Now uses priority and fallthrough
430 (RunHooks): exec fallthrough hooks first.
431
432 * source/BotInterp.H: Changed Hooks to have priority
433 Added fhooksMap to BotInterp (fallthrough)
434
435 * source/UserCommands.C (AddShit): Converted to use Commands
436
437 2002-06-21 Clinton Ebadi <clinton@unknownlamer.org>
438
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
442
443 2002-06-20 Clinton Ebadi <clinton@unknownlamer.org>
444
445 * all files: Updated address of the FSF
446
447 * source/UserCommands.C (AddUser): Uses Commands now instead of
448 manipulating the bot directly
449
450 2002-06-18 Clinton Ebadi <clinton@unknownlamer.org>
451
452 * source/ScriptCommands.C (AddShit): Filled in function.
453
454 * source/Interp.C (Startup): Bind bot-adduser to
455 ScriptCommands::AddUser instead of Action
456 (Startup): Bind bot-addshit to ScriptCommands::AddShit
457
458 * source/ScriptCommands.C (AddUser): Filled in function
459
460 * source/ServerList.C (delServer): Changed (n - 1) to n...n-1
461 would have caused problems if you used more than one server
462
463 * source/Parser.H: Changed const char* to String in userFunctionStruct
464
465 * source/String.H: Added std::string compatibility members
466
467 * configure.ac: You can now disable Crypt and scripting
468
469 * source/*: Added #include "config.h" where needed
470
471 * configure.ac: Added AM_CONFIG_HEADER
472
473 * config.h.in: added file
474
475 * source/Queue.C: Didn't notice iostream.h here! Fixed
476
477
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.