summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-07-26 21:50:00 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-07-26 21:50:00 +0000
commit5d5d9df1a4825fad5ef045cfc0b21b16e5e2bcc7 (patch)
treef3814abafc8f1d6c589a29f4ddc89f55e510d493 /ChangeLog
parent3ba6917c904f5e664ae78b146f4e394ad805eb96 (diff)
* Prevent multiple plugin registrations of the same name
* reworking the config system to use yaml for persistence * reworking the config system key names * on first startup, the bot will prompt for the essential startup config * new config module for configuring the bot at runtime * new config module includes new configurables, for example changing the bot's language at runtime. * various other fixes * New way of mapping plugins to strings, using maps. These may be familiar to rails users. This is to reduce the amount of regexps plugins currently need to do to parse arguments. The old method (privmsg) is still supported, of course. Example plugin now: def MyPlugin < Plugin def foo(m, params) m.reply "bar" end def complexfoo(m, params) m.reply "qux! (#{params[:bar]} #{params[:baz]})" end end plugin = MyPlugin.new # simple map plugin.map 'foo' # this will match "rbot: foo somestring otherstring" and pass the # parameters as a hash using the names in the map. plugin.map 'foo :bar :baz', :action => 'complexfoo' # this means :foo is an optional parameter plugin.map 'foo :foo', :defaults => {:foo => 'bar'} # you can also gobble up into an array plugin.map 'foo *bar' # params[:bar] will be an array of string elements # and you can validate, here the first param must be a number plugin.map 'foo :bar', :requirements => {:foo => /^\d+$/}
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog45
1 files changed, 45 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c4dcd58..30d2390c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+Tue Jul 26 14:41:34 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
+
+ * Prevent multiple plugin registrations of the same name
+ * reworking the config system to use yaml for persistence
+ * reworking the config system key names
+ * on first startup, the bot will prompt for the essential startup config
+ * new config module for configuring the bot at runtime
+ * new config module includes new configurables, for example changing the
+ bot's language at runtime.
+ * various other fixes
+ * New way of mapping plugins to strings, using maps. These may be
+ familiar to rails users. This is to reduce the amount of regexps plugins
+ currently need to do to parse arguments. The old method (privmsg) is still
+ supported, of course. Example plugin now:
+ def MyPlugin < Plugin
+ def foo(m, params)
+ m.reply "bar"
+ end
+
+ def complexfoo(m, params)
+ m.reply "qux! (#{params[:bar]} #{params[:baz]})"
+ end
+ end
+ plugin = MyPlugin.new
+ # simple map
+ plugin.map 'foo'
+
+ # this will match "rbot: foo somestring otherstring" and pass the
+ # parameters as a hash using the names in the map.
+ plugin.map 'foo :bar :baz', :action => 'complexfoo'
+ # this means :foo is an optional parameter
+ plugin.map 'foo :foo', :defaults => {:foo => 'bar'}
+ # you can also gobble up into an array
+ plugin.map 'foo *bar' # params[:bar] will be an array of string elements
+ # and you can validate, here the first param must be a number
+ plugin.map 'foo :bar', :requirements => {:foo => /^\d+$/}
+
+
+Sat Jul 23 01:39:08 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
+
+ * Changed BotConfig to use yaml storage, method syntax instead of hash for
+ get/set, to allow more flexibility and encapsulation
+ * Added convenience method Message.okay (m.okay is the same as the
+ old-style @bot.okay m.replyto)
+
Wed Jul 20 23:30:01 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>
* Move some core plugins to use the new httputil