diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-03-10 12:11:17 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-03-10 12:11:17 +0000 |
commit | 787c3322e0c1acdccb457c47bea76f31c5747f52 (patch) | |
tree | 6dc7e8e1bb39907208c441994127e4d6e63da03c /rbot/message.rb | |
parent | bebe7f8392f3f1750bc196cb19bd4bfbda3310b6 (diff) |
fix http usage, other tweaks
Diffstat (limited to 'rbot/message.rb')
-rw-r--r-- | rbot/message.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rbot/message.rb b/rbot/message.rb index 8604e1a4..c217b1da 100644 --- a/rbot/message.rb +++ b/rbot/message.rb @@ -22,7 +22,10 @@ module Irc # contents of the message attr_accessor :message - + + # has the message been replied to/handled by a plugin? + attr_accessor :replied + # instantiate a new Message # bot:: associated bot class # source:: hostmask of the message source @@ -35,6 +38,7 @@ module Irc @address = false @target = target @message = BasicUserMessage.stripcolour message + @replied = false # split source into consituent parts if source =~ /^((\S+)!(\S+))$/ @@ -56,6 +60,11 @@ module Irc return @address end + # has this message been replied to by a plugin? + def replied? + return @replied + end + # strip mIRC colour escapes from a string def BasicUserMessage.stripcolour(string) return "" unless string @@ -163,6 +172,7 @@ module Irc # in a channel, it will reply in the channel. def reply(string) @bot.say @replyto, string + @replied = true end end |