1 Sat Jul 30 01:19:32 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
3 * config module for configuring the running bot via IRC
4 * BotConfig.register method for various modules and any plugin to register
5 bot configuration which the new config module will expose for them.
6 * various other tweaks as I continue to refactor..
8 Fri Jul 29 13:07:56 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
10 * Moved some stuff out of util.rb into the plugins that actually need
11 them. Those methods didn't belong in util as they were plugin-specific.
12 * moved a few more plugins to use map() where appropriate
13 * made the url plugin only store unique urls
15 Thu Jul 28 23:45:26 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
17 * Reworked the Timer module. The Timer now has a smart thread manager to
18 start/stop the tick() thread. This means the timer isn't called every 0.1
19 seconds to see what needs doing, which is much more efficient
20 * reworked the ircsocket queue mechanism to use a Timer
21 * reworked the nickserv plugin to use maps
22 * made server.reconnect_wait configurable
23 * added Class tracing mechanism to bin/rbot, use --trace Classname for
26 Tue Jul 26 14:41:34 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
28 * Prevent multiple plugin registrations of the same name
29 * reworking the config system to use yaml for persistence
30 * reworking the config system key names
31 * on first startup, the bot will prompt for the essential startup config
32 * new config module for configuring the bot at runtime
33 * new config module includes new configurables, for example changing the
34 bot's language at runtime.
36 * New way of mapping plugins to strings, using maps. These may be
37 familiar to rails users. This is to reduce the amount of regexps plugins
38 currently need to do to parse arguments. The old method (privmsg) is still
39 supported, of course. Example plugin now:
45 def complexfoo(m, params)
46 m.reply "qux! (#{params[:bar]} #{params[:baz]})"
53 # this will match "rbot: foo somestring otherstring" and pass the
54 # parameters as a hash using the names in the map.
55 plugin.map 'foo :bar :baz', :action => 'complexfoo'
56 # this means :foo is an optional parameter
57 plugin.map 'foo :foo', :defaults => {:foo => 'bar'}
58 # you can also gobble up into an array
59 plugin.map 'foo *bar' # params[:bar] will be an array of string elements
60 # and you can validate, here the first param must be a number
61 plugin.map 'foo :bar', :requirements => {:foo => /^\d+$/}
64 Sat Jul 23 01:39:08 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
66 * Changed BotConfig to use yaml storage, method syntax instead of hash for
67 get/set, to allow more flexibility and encapsulation
68 * Added convenience method Message.okay (m.okay is the same as the
69 old-style @bot.okay m.replyto)
71 Wed Jul 20 23:30:01 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
73 * Move some core plugins to use the new httputil
74 * fix wserver's redirection handling for relative (i.e. broken) redirects
75 * fix tube plugin's html parsing
77 Wed Jul 20 01:18:06 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
79 * Add new httputil object to the bot object, to be used by plugins etc
80 that wish to make http requests. It sets up all the proxies etc for them
81 according to bot config.
83 Sat Jul 16 02:23:13 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
85 * Apply most of Rene's patch and fix various plugins.
86 * New plugin: autoop (auto ops via hostmask)
87 * New feature: karmastats
89 Wed Oct 13 16:16:31 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
91 * Fix bug with quotes plugin where it gets confused and sees both a quote
92 and a keyword, both plugins are triggered by, for example "addquote foo is
94 * fixed this by implementing the "has_responded" flag on a message. When a
95 plugin replied to a message (or it manually sets m.replied to true), the
96 keywords plugin will honour that flag and not examine the message for
97 keywords. This flag can also be checked by listen plugins that don't want to
98 interfere with other plugin commands.
100 Mon Oct 11 00:37:52 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
102 * Fixes to the NickServ plugin
104 Sat Oct 09 23:23:24 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
108 Fri Oct 08 00:40:07 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
110 * fixed insult plugin
111 * fixed excuse plugin
113 Thu Oct 07 23:28:05 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
115 * searching for urls in the url plugin
116 * roshambo (rock/paper/scissors) plugin from Hans Fugal <hans@fugal.net>
118 Sat Apr 17 20:56:50 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
120 * Oh, found new tv plugin in my inbox from ages ago, but it's still not
121 working so I guess it changed again since then
122 * New eightball plugin from Daniel Free
124 Sat Apr 17 20:44:43 BST 2004 Tom Gilbert <tom@linuxbrit.co.uk>
126 * Fixed the babelfish parser so translate works again.
128 * Note some plugins are broken (excuse,insult) because the server they use
129 went away. I don't know of a replacement right now.
130 * tv plugin seems broken, perhaps the html changed.
132 Thu Jan 15 21:37:38 GMT 2004 Tom Gilbert <tom@linuxbrit.co.uk>
137 * new plugin from Alan Third <alan@idiocy.org>, allows you to search and list
141 * various plugin updates
142 * fix (again) for C to F temp conversion in weather plugin
143 * channel topic patch from Peter Suschlik, gives plugin better access to topic
144 changes and related information
147 * changes to layout of slashdot plugin output
148 * freshmeat plugin, show latest updates or search
149 * fix to C to F temp conversion in weather plugin
150 * status command returns some bot status
152 * using BDB::Btree everywhere now, instead of BDB::Hash, because the Btree api
153 allows me to set my own key comparison function. This is needed to keep
154 supporting case insensitivity (vital for IRC), which was sadly broken in
155 0.9.5 :( All existing dbs will be upgraded automatically.
156 * roulette plugin - play russian roulette :) also keeps game stats.
157 * new config option, NO_KEYWORD_ADDRESS. If set to "true", the bot will always
158 respond to keywords it knows even when not addressed and the message doesn't
159 start with '. Message must end with "?" however.
160 * hopefully fixed welcome message parsing from certain server types
163 * plugin object registry
164 This provides persistant storage for plugins via a hash interface. The
165 default mode is an object store, so you can store ruby objects and reference
166 them with hash keys. This is because the default store/restore methods of
167 the plugins' RegistryAccessor are calls to Marshal.dump and Marshal.restore,
171 @registry[:blah] = blah
172 then, even after the bot is shut down and disconnected, on the next run you
173 can access the blah object as it was, with:
174 blah = @registry[:blah]
175 The registry can of course be used to store simple strings, fixnums, etc as
176 well, and should be useful to store or cache plugin data or dynamic plugin
179 If you don't need to store objects, and strictly want a persistant hash of
180 strings, you can override the store/restore methods to suit your needs, for
181 example (in your plugin):
192 Your plugins section of the registry is private, it has its own namespace
193 (derived from the plugin's class name, so change it and lose your data).
194 Calls to registry.each etc, will only iterate over your namespace.
196 The nickserv and karma plugins use the new registry and should serve as a
197 useful example. Basic usage of the registry is simple, just treat it as a
198 hash, with values that never die (unless you delete() them).
199 * Change to the nickserv plugin. The old method of putting the nickserv
200 password in rbot.conf was useless for multiple nicks or easy updates. The
201 plugin now uses the plugin registry to store passwords for any nicks it
202 owns. The plugin can be told to register the current nick (supply a password
203 or it'll generate one), identify for the current nick (if the password is
204 known), and can be told the passwords for other nicks. If NickServ asks the
205 bot to identify, it will automatically do so if it knows the appropriate
207 * karma plugin now uses the plugin registry, it should automatically import
208 your existing, stored karma data into the registry.
209 * The babelfish plugin now caches results in the bot registry to speed up
211 * New message types and plugin methods to grab them,
212 quit(QuitMessage): Called when a user (or the bot) quits IRC
213 nick(NickMessage): Called when a user (or the bot) changes Nick
214 topic(TopicMessage): Called when a user (or the bot) changes a channel topic
215 * A plugin's listen() method will now receive any kind of Message, e.g.
216 PrivMessage, NoticeMessage, NickMessage, JoinMessage, etc
218 seen: the usual "seen" stuff:
220 giblet was last seen xxx ago doing xxx
221 cal: calls the unix cal program to display a calendar
222 math: evaluates mathematical expressions:
224 rbot: math 4 to the power of 8
225 rbot: math ((232+432) - 4) / 2
226 (ported from infobot. Thanks to Kevin Lenzo, who wrote the
227 original infobot math module)
228 slashdot: displays latest headlines or searches for articles
229 url: stores urls mentioned in channels for regurgitation later
230 weather: grabs and parses METAR weather data, will remember the last weather
231 code you asked for so you don't have to :)
232 * New utility function, Util.http_get(url) for getting remote data via http,
233 just dumps response.body into a string and returns it, or nil if anything at
234 all goes wrong. Useful for simple plugins.
235 * random quit messages if none specified, messages set in language description
237 * keywords are now stored in bdb databases - your old keywords.rbot will be
238 imported. Static keywords (fact packs) are also stored in bdb databases, and
239 rbot will automatically convert any text .fact file dropped in the confdir's
240 keywords subdirectory, at startup, into a bdb file. If both a db and a text
241 file exist of the same name (except the extension), the text file will be
242 imported and merged into the database.
243 static keywords will be looked up in each factpack db in turn, in
244 alphabetical filename order - so you can prioritise using the filename if
246 * fixed a bug with autsplitting long sent lines, the last line was often being
250 * Massive cleanup of rfc2812.rb, contributed by Lars Christensen
251 <dsl8950@vip.cybercity.dk>, gets rid of a lot of regexps
252 * Fixed bug reading static keyword files - "foo <=is=> bar" may not have
253 worked for a couple of releases, only "foo<=is=>bar" was working - this was
254 not intended and should be fixed now
255 * Experimental send queue, to prevent the bot from flooding out, the delay
256 between sending messages to the server defaults to 2s, but is configurable
257 in conf.rbot, set SENDQ_DELAY (0 to disable queueing). You can also set/get
258 the value from the bot, "rbot: options get sendq_delay", and
259 "rbot: options set sendq_delay 1.5", if you have sufficient auth for "config"
260 This is a bursting sendq, most ircd's allow bursts of up to 5
261 lines, with non-burst limits of 512 bytes/2 seconds. To set the burst limit,
262 configure SENDQ_BURST in conf.rbot, or do the same kind of stuff with
263 "rbot: options set sendq_burst 2", etc.
264 The defaults are 2s/4 burst, which seem to work okay for me.
265 * support for multiple, customisable, addressing prefixes. Set ADDRESS_PREFIX
266 in conf.rbot to a space separate list of addressing prefixes, e.g
267 ADDRESS_PREFIX = | ! =>
268 Would mean that all of the following in channel messages would cause the bot
274 * bb plugin removed, bb is nearly over and it doesn't work 100% anyway
275 * Two plugins from brailsmt (from #ruby-lang on openprojects), a stats plugin
276 which monitors usage of 1-word sentences, and lart, which allows you to ask
277 rbot to lart people - with an optional reason - larts are user-definable and
278 can be added on the fly.
279 * made google.rb work for people with 1.6 ruby's net/http
284 * new plugin for handling nickserv-protected nicks, use NICKSERV_PASSWORD in
286 * fixes to a few other buglets
287 * new plugin to grab bigbrother headlines, still buggy and only useful for UK
288 folks who love bb :-)
289 * fixes to various plugins
290 * Patch from akira yamada <akira@ruby-lang.org>
291 DNS plugin: Use resolv-replace if found, do lookup in new thread
292 Fix bug joining channels with keys
296 * better "connect failure" error message
297 * better option parsing, and --debug option
298 * access to bot's online help via commandline, eg:
300 ./rbot.rb --help core
301 ./rbot.rb --help "core save"
302 * Fix broken help from last point release
303 * Plugin API modification and cleanup. You no longer need to set @listen to
304 true in order to get all NOTICE and PRIVMSGs, you just need to define the
305 method. The method is now called listen(), renamed from listener(). This
306 should be the last time the plugin api is changed incompatibly.
307 * New plugin method kick(). Use it to see kicks (duh :))
308 * New plugin methods join(), part(). Obvious uses.
309 * Example plugin autorejoin.rb, uses kick event to rejoin channel and insult
311 * fix bug in remind plugins "remind me no more" recognition.
315 * Fix welcome message recognition for certain IRCd's.
319 * Allow keyword definitions which end in '?', like this:
321 * rdoc documentation!
322 * fixed broken address regexp, "rbot: .foo" was being treated as an addressed
323 form of "foo" (lost the .)
324 * fix stupid bug in last release (looking for wrong default conf dir)
328 * Tarball layout change. modules all in rbot/ now, and the rbot/ default
329 configuration moved to rbotconf/. This lets the thing run from an unpacked
330 tarball while also being ready to run with the modules installed somewhere
332 * change hashbang to /usr/bin/env ruby, in order to use PATH looking for ruby,
334 * allow "botnick : foo" style addressing, and even "botnick... foo"
335 * slap plugin (contributed by oct)
336 * renamed bot.send to bot.sendmsg, I didn't really want to override send() ;D
340 * Made sane for packagers. Looks in the right places for plugins and language
341 files now, so extra effort shouldn't be needed there.
345 * Fixed "nick taken on join" bug
346 * Dice plugin patch from David Dorward
347 * fix searchquote regexp
348 * conf.rbot: PASSWORD -> SERVER_PASSWORD, to prevent confusion with PASSWD,
349 which is for master auth.
353 * Fixed addquote (was incrementing quote ID twice)
354 * now strips colour/bold escapes from incoming messages (rbot was ignoring
355 messages addressed using a bolded colon, for example).
357 * more language breadth
358 * Addressing works better now
359 * Can autojoin channels with keys, conf.rbot line is:
360 autojoin_channels #chan1, #chan2, #chan3 key, #chan4 key, #chan5