From 8a2388934915a94a63c314791222d8df30516d6b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 23 Jul 2006 23:04:15 +0000 Subject: Add act method to messages; behaves like reply, but does a CTCP action --- lib/rbot/message.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib') 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: + # @bot.action m.replyto, string + # 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 -- cgit v1.2.3