From a3b26a1e24c8111d997397a42f59519773410cf6 Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Thu, 11 Aug 2005 08:26:01 +0000 Subject: [PATCH] fix broken autoop --- data/rbot/plugins/autoop.rb | 14 +++++++------- 1 file 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') -- 2.39.2