summaryrefslogtreecommitdiff
path: root/lib/rbot/message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/message.rb')
-rw-r--r--lib/rbot/message.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rbot/message.rb b/lib/rbot/message.rb
index 41658c6b..6331825d 100644
--- a/lib/rbot/message.rb
+++ b/lib/rbot/message.rb
@@ -164,6 +164,13 @@ module Irc
"#{@source.user}@#{@source.host}" rescue @source.to_s
end
+ # Access the botuser corresponding to the source, if any
+ #
+ def botuser
+ @bot.auth.autologin(@source) rescue @bot.auth.everyone
+ end
+
+
# Was the message from an identified user?
def identified?
return @identified