Fix RSS plugin problems caused by watches created before the new Irc framework
[rbot] / ChangeLog
1 2006-08-07  Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
2
3         * Add kick method to kernel: plugins can now use
4                 @bot.kick channel, user, reason
5         to kick a user from a channel
6         * RSS plugin: fix rewatch_rss method
7         * RSS plugin: the different ways to represent channels before and
8         after the New IRC Framework was causing strange problems such as
9         watched feed not being listed as such, undeletable watches, double
10         watches etc. Fix this by checking both for the Channel objects and
11         their to_s form when checking for watches or deleting them.
12
13 2006-08-06  Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
14
15         * Updating the ChangeLog again: describe the new stuff in trunk which
16         will be made available in the next release. Use Gnu style for new
17         changelog entries (yyyy-mm-dd name <email address>\n<tab> ...):
18         there's a macro for this since at least Vim 6.x and higher, called by
19         <Leader>o (default leader: slash (\))
20         * New IRC Framework: Server, Channels, User, Netmasks etc are all
21         proper Ruby objects. The better organization will allow multi-server
22         connections to be implemented more easily
23         * Modularize core: split the internal functionality from what can be
24         implemented as botmodules (which work just the same as plugins). Move
25         Configuration, Basics and Auth out of the 'kernel' into core
26         botmodules.
27         * New Auth Framework: BotUsers are now Ruby objects with attached
28         PermissionSets which define what the BotUser can do, by channel if
29         necessary. The new framework allows very fine-grained control while
30         still being very easy to manage for elementary usage. BotUser data can
31         be exported and imported, but no backwards compatibility has been
32         implemented yet. Most plugins still have to be updated to the new
33         command-path-based mechanism.
34
35 Sun Aug 06 17:33:55 BST 2006  Tom Gilbert <tom@linuxbrit.co.uk>
36
37   * 0.9.10 released
38         * Changes: Lots of new and updated plugins, including one to poll RSS feeds.
39         A first step towards a better auth system (total revamp due in 0.9.11).
40         Improvements to network and server code which should provide greater
41         stability. A new message queueing mechanism with bitrate throttling. A new
42         logging framework for debugging and tracing the activities of the bot. A
43         new split-db registry system for better performance and transactional
44         usage of bdb for resilience. More integration with Nickserv where
45         available including optional automatic ghost-killing.
46
47 Wed Sep 07 20:16:46 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
48
49   * Fixed quit, broke it last commit
50         * Fixed trap() for win32
51
52 Sun Aug 21 13:29:55 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
53
54   * fix for bug in quakenet plugin (trac #14)
55         * multiple fixes for unescaped bot nick in regexp's (trac #13)
56
57 Fri Aug 12 20:51:38 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
58
59   * fix up autoop plugin a bit
60
61 Thu Aug 11 00:13:11 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
62
63   * Added two plugins from Robin Kearney <robin@riviera.org.uk>
64         * Threat (US threat level :P)
65         * bash (bash.org quotes)
66
67 Thu Aug 11 00:04:31 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
68
69   * Patches from "Alexey I. Froloff" <raorn@altlinux.ru>
70         * Do not use "/home/#{Etc.getlogin}/" for default home directory, use
71         "#{Etc.getpwnam(Etc.getlogin).dir}/" instead.
72         * Do not try to load same plugin from different locations.  Added ability
73         to disable system-wide plugins - create PLUGIN.rb.disabled in user's
74         plugins directory.
75         * For example, to disable freshmeat plugin installed in /usr/share/rbot/plugins/freshmeat.rb one can create empty file ~/.rbot/plugins/freshmeat.rb.disabled
76
77 Mon Aug 08 23:08:01 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
78
79   * new markov plugin for random inane chat
80
81 Sun Aug 07 18:20:24 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
82
83   * stop insult plugin being used to insult the bot
84
85 Sun Aug 07 17:53:06 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
86
87   * workaround for people without YAML::load_file
88         * quit message for restart
89
90 Sun Aug 07 15:11:07 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
91
92   * fix address_prefix, broken in 0.9.9, reported by ruskie.
93
94 Sat Aug 06 00:54:34 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
95
96   * Released 0.9.9
97
98 Fri Aug 05 23:55:20 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
99
100   * few more tweaks preparing to release 0.9.9
101
102 Thu Aug 04 23:03:30 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
103
104   * Improved ircd recognition of rfc2812.rb
105         * de-string'd, de-cap'd rfc2812.rb, looks less shouty now
106         * moved the Q auth stuff (for quakenet) into a new qauth plugin (untested!)
107         * finish fixing the httputil
108
109 Thu Aug 04 00:11:52 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
110
111   * Tweaked the debug() stuff a bit. Need to do this more cleanly really
112         * Added a fair bit of documentation for some of the new features
113
114 Wed Aug 03 15:25:07 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
115
116   * Added french language file (TODO most of the plugins just talk english)
117         * The way the Enum configs were set up, it wasn't possible to add language
118         files to rbot at runtime (the directory was only scanned at startup). Now
119         you can set a values Proc, which is called to return a list of allowed
120         values whenever it's queried.
121         * Added Config module for determining where we were installed.
122         Unfortunately rubygems is a total whore in this regard, and I hope the
123         current hackery I have to do to support it becomes redundant in the
124         future.
125
126 Wed Aug 03 00:31:41 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
127
128   * Added Rakefile, tweaked gemspec
129
130 Tue Aug 02 16:27:36 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
131
132   * Fixed the new http.proxy* settings, they work!
133         * Fixed a bug with auth-checking for the config module
134         * misc tweaks
135
136 Sun Jul 31 02:20:08 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
137
138   * Updated docgen to generate rdoc again with the new repo structure
139         * added new restart command to the core bot, quits irc and reexecs the
140         bot, to pick up new code/libraries etc.
141
142 Sat Jul 30 22:33:36 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
143
144   * Config items are now objects, various types are available.
145         * The config wizard will now use registered config items if :wizard is set
146     to true for those items. It will ask questions in the order they were
147                 registered.
148         * The config module now works for doing runtime configuration.
149         * misc refactoring
150
151 Sat Jul 30 01:19:32 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
152
153   * config module for configuring the running bot via IRC
154         * BotConfig.register method for various modules and any plugin to register
155         bot configuration which the new config module will expose for them.
156         * various other tweaks as I continue to refactor..
157
158 Fri Jul 29 13:07:56 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
159
160   * Moved some stuff out of util.rb into the plugins that actually need
161         them. Those methods didn't belong in util as they were plugin-specific.
162         * moved a few more plugins to use map() where appropriate
163         * made the url plugin only store unique urls
164
165 Thu Jul 28 23:45:26 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
166
167   * Reworked the Timer module. The Timer now has a smart thread manager to
168         start/stop the tick() thread. This means the timer isn't called every 0.1
169         seconds to see what needs doing, which is much more efficient
170   * reworked the ircsocket queue mechanism to use a Timer
171         * reworked the nickserv plugin to use maps
172         * made server.reconnect_wait configurable
173         * added Class tracing mechanism to bin/rbot, use --trace Classname for
174         debugging
175
176 Tue Jul 26 14:41:34 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
177
178   * Prevent multiple plugin registrations of the same name
179         * reworking the config system to use yaml for persistence
180         * reworking the config system key names
181         * on first startup, the bot will prompt for the essential startup config
182         * new config module for configuring the bot at runtime
183         * new config module includes new configurables, for example changing the
184         bot's language at runtime.
185         * various other fixes
186         * New way of mapping plugins to strings, using maps. These may be
187         familiar to rails users. This is to reduce the amount of regexps plugins
188         currently need to do to parse arguments. The old method (privmsg) is still
189         supported, of course. Example plugin now:
190           def MyPlugin < Plugin
191                   def foo(m, params)
192                           m.reply "bar"
193                         end
194
195                         def complexfoo(m, params)
196                           m.reply "qux! (#{params[:bar]} #{params[:baz]})"
197                         end
198                 end
199                 plugin = MyPlugin.new
200                 # simple map
201                 plugin.map 'foo'
202
203     # this will match "rbot: foo somestring otherstring" and pass the
204                 # parameters as a hash using the names in the map.
205                 plugin.map 'foo :bar :baz', :action => 'complexfoo'
206                 # this means :foo is an optional parameter
207                 plugin.map 'foo :foo', :defaults => {:foo => 'bar'}
208     # you can also gobble up into an array
209                 plugin.map 'foo *bar' # params[:bar] will be an array of string elements
210     # and you can validate, here the first param must be a number
211                 plugin.map 'foo :bar', :requirements => {:foo => /^\d+$/}
212
213
214 Sat Jul 23 01:39:08 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
215
216   * Changed BotConfig to use yaml storage, method syntax instead of hash for
217         get/set, to allow more flexibility and encapsulation
218         * Added convenience method Message.okay (m.okay is the same as the
219         old-style @bot.okay m.replyto)
220
221 Wed Jul 20 23:30:01 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
222
223   * Move some core plugins to use the new httputil
224         * fix wserver's redirection handling for relative (i.e. broken) redirects
225         * fix tube plugin's html parsing
226
227 Wed Jul 20 01:18:06 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
228
229         * Add new httputil object to the bot object, to be used by plugins etc
230         that wish to make http requests. It sets up all the proxies etc for them
231         according to bot config.
232
233 Sat Jul 16 02:23:13 BST 2005  Tom Gilbert <tom@linuxbrit.co.uk>
234
235   * Apply most of Rene's patch and fix various plugins.
236         * New plugin: autoop (auto ops via hostmask)
237         * New feature: karmastats
238
239 Wed Oct 13 16:16:31 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
240
241   * Fix bug with quotes plugin where it gets confused and sees both a quote
242   and a keyword, both plugins are triggered by, for example "addquote foo is
243   bar"
244   * fixed this by implementing the "has_responded" flag on a message. When a
245   plugin replied to a message (or it manually sets m.replied to true), the
246   keywords plugin will honour that flag and not examine the message for
247   keywords. This flag can also be checked by listen plugins that don't want to
248   interfere with other plugin commands.
249
250 Mon Oct 11 00:37:52 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
251
252   * Fixes to the NickServ plugin
253
254 Sat Oct 09 23:23:24 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
255
256   * Keyword searching
257
258 Fri Oct 08 00:40:07 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
259
260   * fixed insult plugin
261   * fixed excuse plugin
262
263 Thu Oct 07 23:28:05 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
264
265   * searching for urls in the url plugin
266   * roshambo (rock/paper/scissors) plugin from Hans Fugal <hans@fugal.net>
267
268 Sat Apr 17 20:56:50 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
269
270   * Oh, found new tv plugin in my inbox from ages ago, but it's still not
271   working so I guess it changed again since then
272   * New eightball plugin from Daniel Free
273
274 Sat Apr 17 20:44:43 BST 2004  Tom Gilbert <tom@linuxbrit.co.uk>
275
276   * Fixed the babelfish parser so translate works again.
277   * Misc other fixes
278   * Note some plugins are broken (excuse,insult) because the server they use
279     went away. I don't know of a replacement right now.
280   * tv plugin seems broken, perhaps the html changed.
281
282 Thu Jan 15 21:37:38 GMT 2004  Tom Gilbert <tom@linuxbrit.co.uk>
283
284   * Fixes for ruby 1.8
285
286 0.9.8
287 * new plugin from Alan Third <alan@idiocy.org>, allows you to search and list
288   UK TV programmes.
289
290 0.9.7
291 * various plugin updates
292 * fix (again) for C to F temp conversion in weather plugin
293 * channel topic patch from Peter Suschlik, gives plugin better access to topic
294   changes and related information
295
296 0.9.6
297 * changes to layout of slashdot plugin output
298 * freshmeat plugin, show latest updates or search
299 * fix to C to F temp conversion in weather plugin
300 * status command returns some bot status
301 * fortune plugin
302 * using BDB::Btree everywhere now, instead of BDB::Hash, because the Btree api
303   allows me to set my own key comparison function. This is needed to keep
304   supporting case insensitivity (vital for IRC), which was sadly broken in
305   0.9.5 :( All existing dbs will be upgraded automatically.
306 * roulette plugin - play russian roulette :) also keeps game stats.
307 * new config option, NO_KEYWORD_ADDRESS. If set to "true", the bot will always
308   respond to keywords it knows even when not addressed and the message doesn't
309   start with '. Message must end with "?" however.
310 * hopefully fixed welcome message parsing from certain server types
311
312 0.9.5
313 * plugin object registry
314   This provides persistant storage for plugins via a hash interface. The
315   default mode is an object store, so you can store ruby objects and reference
316   them with hash keys. This is because the default store/restore methods of
317   the plugins' RegistryAccessor are calls to Marshal.dump and Marshal.restore,
318   for example:
319     blah = Hash.new
320     blah[:foo] = "fum"
321     @registry[:blah] = blah
322   then, even after the bot is shut down and disconnected, on the next run you
323   can access the blah object as it was, with:
324     blah = @registry[:blah]
325   The registry can of course be used to store simple strings, fixnums, etc as
326   well, and should be useful to store or cache plugin data or dynamic plugin
327   configuration. 
328
329   If you don't need to store objects, and strictly want a persistant hash of
330   strings, you can override the store/restore methods to suit your needs, for
331   example (in your plugin):
332     def initialize
333       class << @registry
334         def store(val)
335           val
336         end
337         def restore(val)
338           val
339         end
340       end
341     end
342   Your plugins section of the registry is private, it has its own namespace
343   (derived from the plugin's class name, so change it and lose your data).
344   Calls to registry.each etc, will only iterate over your namespace.
345
346   The nickserv and karma plugins use the new registry and should serve as a
347   useful example. Basic usage of the registry is simple, just treat it as a
348   hash, with values that never die (unless you delete() them).
349 * Change to the nickserv plugin. The old method of putting the nickserv
350   password in rbot.conf was useless for multiple nicks or easy updates. The
351   plugin now uses the plugin registry to store passwords for any nicks it
352   owns. The plugin can be told to register the current nick (supply a password
353   or it'll generate one), identify for the current nick (if the password is
354   known), and can be told the passwords for other nicks. If NickServ asks the
355   bot to identify, it will automatically do so if it knows the appropriate
356   password.
357 * karma plugin now uses the plugin registry, it should automatically import
358   your existing, stored karma data into the registry.
359 * The babelfish plugin now caches results in the bot registry to speed up
360   common lookups.
361 * New message types and plugin methods to grab them,
362   quit(QuitMessage):   Called when a user (or the bot) quits IRC
363   nick(NickMessage):   Called when a user (or the bot) changes Nick
364   topic(TopicMessage): Called when a user (or the bot) changes a channel topic
365 * A plugin's listen() method will now receive any kind of Message, e.g.
366   PrivMessage, NoticeMessage, NickMessage, JoinMessage, etc
367 * New plugins:
368   seen: the usual "seen" stuff: 
369         rbot: seen giblet?
370         giblet was last seen xxx ago doing xxx
371   cal:  calls the unix cal program to display a calendar
372   math: evaluates mathematical expressions:
373         rbot: math 2+2
374         rbot: math 4 to the power of 8
375         rbot: math ((232+432) - 4) / 2
376         (ported from infobot. Thanks to Kevin Lenzo, who wrote the
377         original infobot math module)
378   slashdot: displays latest headlines or searches for articles
379   url:  stores urls mentioned in channels for regurgitation later
380   weather: grabs and parses METAR weather data, will remember the last weather
381            code you asked for so you don't have to :)
382 * New utility function, Util.http_get(url) for getting remote data via http,
383   just dumps response.body into a string and returns it, or nil if anything at
384   all goes wrong. Useful for simple plugins.
385 * random quit messages if none specified, messages set in language description
386   file
387 * keywords are now stored in bdb databases - your old keywords.rbot will be
388   imported. Static keywords (fact packs) are also stored in bdb databases, and
389   rbot will automatically convert any text .fact file dropped in the confdir's
390   keywords subdirectory, at startup, into a bdb file. If both a db and a text
391   file exist of the same name (except the extension), the text file will be
392   imported and merged into the database.
393   static keywords will be looked up in each factpack db in turn, in
394   alphabetical filename order - so you can prioritise using the filename if
395   you wish.
396 * fixed a bug with autsplitting long sent lines, the last line was often being
397   split unnecessarily.
398
399 0.9.4
400 * Massive cleanup of rfc2812.rb, contributed by Lars Christensen
401   <dsl8950@vip.cybercity.dk>, gets rid of a lot of regexps
402 * Fixed bug reading static keyword files - "foo <=is=> bar" may not have
403   worked for a couple of releases, only "foo<=is=>bar" was working - this was
404   not intended and should be fixed now
405 * Experimental send queue, to prevent the bot from flooding out, the delay
406   between sending messages to the server defaults to 2s, but is configurable
407   in conf.rbot, set SENDQ_DELAY (0 to disable queueing). You can also set/get
408   the value from the bot, "rbot: options get sendq_delay", and 
409   "rbot: options set sendq_delay 1.5", if you have sufficient auth for "config"
410   This is a bursting sendq, most ircd's allow bursts of up to 5
411   lines, with non-burst limits of 512 bytes/2 seconds. To set the burst limit,
412   configure SENDQ_BURST in conf.rbot, or do the same kind of stuff with
413   "rbot: options set sendq_burst 2", etc.
414   The defaults are 2s/4 burst, which seem to work okay for me.
415 * support for multiple, customisable, addressing prefixes. Set ADDRESS_PREFIX
416   in conf.rbot to a space separate list of addressing prefixes, e.g
417   ADDRESS_PREFIX = | ! =>
418   Would mean that all of the following in channel messages would cause the bot
419   to respond:
420               rbot: version
421               |version
422               !version
423               =>version
424 * bb plugin removed, bb is nearly over and it doesn't work 100% anyway
425 * Two plugins from brailsmt (from #ruby-lang on openprojects), a stats plugin
426   which monitors usage of 1-word sentences, and lart, which allows you to ask
427   rbot to lart people - with an optional reason - larts are user-definable and
428   can be added on the fly.
429 * made google.rb work for people with 1.6 ruby's net/http
430
431 0.9.3
432
433 * fix quit messages
434 * new plugin for handling nickserv-protected nicks, use NICKSERV_PASSWORD in
435   the config file.
436 * fixes to a few other buglets
437 * new plugin to grab bigbrother headlines, still buggy and only useful for UK
438   folks who love bb :-)
439 * fixes to various plugins
440 * Patch from akira yamada <akira@ruby-lang.org>
441   DNS plugin: Use resolv-replace if found, do lookup in new thread
442   Fix bug joining channels with keys
443
444 0.9.2
445
446 * better "connect failure" error message
447 * better option parsing, and --debug option
448 * access to bot's online help via commandline, eg:
449   ./rbot.rb --help
450   ./rbot.rb --help core
451   ./rbot.rb --help "core save"
452 * Fix broken help from last point release
453 * Plugin API modification and cleanup. You no longer need to set @listen to
454   true in order to get all NOTICE and PRIVMSGs, you just need to define the
455   method. The method is now called listen(), renamed from listener(). This
456   should be the last time the plugin api is changed incompatibly.
457 * New plugin method kick(). Use it to see kicks (duh :))
458 * New plugin methods join(), part(). Obvious uses.
459 * Example plugin autorejoin.rb, uses kick event to rejoin channel and insult
460   kicker
461 * fix bug in remind plugins "remind me no more" recognition.
462
463 0.9.1
464
465 * Fix welcome message recognition for certain IRCd's.
466
467 0.9
468
469 * Allow keyword definitions which end in '?', like this:
470   bot: foo is bar\?
471 * rdoc documentation!
472 * fixed broken address regexp, "rbot: .foo" was being treated as an addressed
473   form of "foo" (lost the .)
474 * fix stupid bug in last release (looking for wrong default conf dir)
475
476 0.8
477
478 * Tarball layout change. modules all in rbot/ now, and the rbot/ default
479   configuration moved to rbotconf/. This lets the thing run from an unpacked
480   tarball while also being ready to run with the modules installed somewhere
481   else.
482 * change hashbang to /usr/bin/env ruby, in order to use PATH looking for ruby,
483   it's BSD friendly!
484 * allow "botnick : foo" style addressing, and even "botnick... foo"
485 * slap plugin (contributed by oct)
486 * renamed bot.send to bot.sendmsg, I didn't really want to override send() ;D
487   (thanks Kero)
488
489 0.7.1
490 * Made sane for packagers. Looks in the right places for plugins and language
491   files now, so extra effort shouldn't be needed there.
492
493 0.7
494
495 * Fixed "nick taken on join" bug
496 * Dice plugin patch from David Dorward
497 * fix searchquote regexp
498 * conf.rbot: PASSWORD -> SERVER_PASSWORD, to prevent confusion with PASSWD,
499   which is for master auth.
500
501 0.6
502
503 * Fixed addquote (was incrementing quote ID twice)
504 * now strips colour/bold escapes from incoming messages (rbot was ignoring
505   messages addressed using a bolded colon, for example).
506 * minor bugfixes
507 * more language breadth
508 * Addressing works better now
509 * Can autojoin channels with keys, conf.rbot line is:
510   autojoin_channels #chan1, #chan2, #chan3 key, #chan4 key, #chan5
511 * dice plugin fixes
512
513 0.5
514
515 * Initial release