diff options
Diffstat (limited to 'rbot/message.rb')
-rw-r--r-- | rbot/message.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rbot/message.rb b/rbot/message.rb index c217b1da..d7f614ab 100644 --- a/rbot/message.rb +++ b/rbot/message.rb @@ -5,6 +5,9 @@ module Irc # nick/channel and a message part) class BasicUserMessage + # associated bot + attr_reader :bot + # when the message was received attr_reader :time @@ -175,6 +178,12 @@ module Irc @replied = true end + # convenience method to reply "okay" in the current language to the + # message + def okay + @bot.say @replyto, @bot.lang.get("okay") + end + end # class to manage IRC PRIVMSGs |