summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 23:04:15 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-07-23 23:04:15 +0000
commit8a2388934915a94a63c314791222d8df30516d6b (patch)
tree7e0cc91782774ab3e6243861ce9ca3a36d3fc336
parentc1895f58ebb1607bf1bfc5477112a59b47252b98 (diff)
Add act method to messages; behaves like reply, but does a CTCP action
-rw-r--r--lib/rbot/message.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb
index 385f6c4c..eda7ef72 100644
--- a/lib/rbot/message.rb
+++ b/lib/rbot/message.rb
@@ -198,6 +198,16 @@ module Irc
@replied = true
end
+ # convenience method to reply to a message with an action. It's the
+ # same as doing:
+ # <tt>@bot.action m.replyto, string</tt>
+ # So if the message is private, it will reply to the user. If it was
+ # in a channel, it will reply in the channel.
+ def act(string)
+ @bot.action @replyto, string
+ @replied = true
+ end
+
# convenience method to reply "okay" in the current language to the
# message
def okay