diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-11 08:26:01 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-11 08:26:01 +0000 |
commit | a3b26a1e24c8111d997397a42f59519773410cf6 (patch) | |
tree | 2423d4f20dc2908ec1766ef4313f459aa4c631da /data/rbot/plugins | |
parent | 2aa92f557aa550406aefa4cac6468c387e894028 (diff) |
fix broken autoop
Diffstat (limited to 'data/rbot/plugins')
-rw-r--r-- | data/rbot/plugins/autoop.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/data/rbot/plugins/autoop.rb b/data/rbot/plugins/autoop.rb index fdbcf6e0..d4067a32 100644 --- a/data/rbot/plugins/autoop.rb +++ b/data/rbot/plugins/autoop.rb @@ -1,8 +1,8 @@ class AutoOP < Plugin @@handlers = { - "addop" => "handle_addop", - "rmop" => "handle_rmop", - "listop" => "handle_listop" + "add" => "handle_addop", + "rm" => "handle_rmop", + "list" => "handle_listop" } def help(plugin, topic="") @@ -28,16 +28,16 @@ class AutoOP < Plugin elsif (m.params =~ /^rm\s+(.+)$/) handle_rmop(m, $1) end + else + m.reply "private message only please!" end end def handle_addop(m, params) ma = /^(.+?)(\s+(.+))?$/.match(params) - channels = ma[2] ? ma[2] : @bot.config['JOIN_CHANNELS'] + channels = ma[2] ? ma[2] : @bot.config['irc.join_channels'] if(ma[1] && channels) - @registry[ma[1]] = channels.split(/,\s*/).collect { |x| - x.strip - } + @registry[ma[1]] = channels m.okay else m.reply @bot.lang.get('dunno') |