From 5d5d9df1a4825fad5ef045cfc0b21b16e5e2bcc7 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Tue, 26 Jul 2005 21:50:00 +0000 Subject: * 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+$/} --- rbot/auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rbot/auth.rb') diff --git a/rbot/auth.rb b/rbot/auth.rb index 017745ab..7811d9e4 100644 --- a/rbot/auth.rb +++ b/rbot/auth.rb @@ -182,7 +182,7 @@ module Irc m.reply "user #$1 is gone" end when (/^auth\s+(\S+)/) - if($1 == @bot.config["PASSWD"]) + if($1 == @bot.config["auth.password"]) @bot.auth.useradd(Regexp.escape(m.source), 1000) m.reply "Identified, security level maxed out" else -- cgit v1.2.3