summaryrefslogtreecommitdiff
path: root/lib/rbot/core
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-07 10:35:28 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-02-07 10:35:28 +0000
commit2590963515e99f6735981fd5fc0fc9ef042b22b2 (patch)
treef24a74770d9866758f8c20d6addc83312b0da528 /lib/rbot/core
parentbf8325c9a59667474940566065590b8da3dec85d (diff)
Fix rbot quieting
Diffstat (limited to 'lib/rbot/core')
-rw-r--r--lib/rbot/core/basics.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/rbot/core/basics.rb b/lib/rbot/core/basics.rb
index 4c18037e..38c96b23 100644
--- a/lib/rbot/core/basics.rb
+++ b/lib/rbot/core/basics.rb
@@ -59,18 +59,24 @@ class BasicsModule < CoreBotModule
def bot_quiet(m, param)
if param.has_key?(:where)
- @bot.set_quiet param[:where].sub(/^here$/, m.target)
+ @bot.set_quiet param[:where].sub(/^here$/, m.target.downcase)
else
@bot.set_quiet
end
+ # Make sense when the commmand is given in private or in a non-quieted
+ # channel
+ m.okay
end
def bot_talk(m, param)
if param.has_key?(:where)
- @bot.reset_quiet param[:where].sub(/^here$/, m.target)
+ @bot.reset_quiet param[:where].sub(/^here$/, m.target.downcase)
else
@bot.reset_quiet
end
+ # Make sense when the commmand is given in private or in a non-quieted
+ # channel
+ m.okay
end
def bot_help(m, param)
@@ -141,18 +147,12 @@ basics.map "restart *msg",
:defaults => { :msg => nil },
:auth_path => 'quit'
-basics.map "quiet",
+basics.map "quiet [in] [:where]",
:action => 'bot_quiet',
:auth_path => 'talk::set'
-basics.map "quiet in :chan",
- :action => 'bot_quiet',
- :auth_path => 'talk::set'
-basics.map "talk",
+basics.map "talk [in] [:where]",
:action => 'bot_talk',
:auth_path => 'talk::set'
-basics.map "quiet in :chan",
- :action => 'bot_quiet',
- :auth_path => 'talk::set'
basics.map "say :where *what",
:action => 'bot_say',