Class: Irc::BasicUserMessage

Class | Irc::BasicUserMessage
In: | lib/rbot/message.rb
Parent: | Object

base user message class, all user messages derive from this (a user message is defined as having a source hostmask, a target nick/channel and a message part)

### Methods

address? botuser identified? inspect new sourceaddress sourcenick strip_formatting strip_initial_formatting stripcolour

### External Aliases

replied | -> | replied?
ignored | -> | ignored?
in_thread | -> | in_thread?

### Attributes

bot | [R] | associated bot
ignored | [RW] | should the message be ignored?
in_thread | [RW] | set this to true if the method that delegates the message is run in a thread
logmessage | [RW] | contents of the message (for logging purposes)
message | [RW] | contents of the message (stripped of initial/final format codes)
plainmessage | [RW] | contents of the message (stripped of all formatting)
replied | [RW] | has the message been replied to/handled by a plugin?
server | [R] | associated server
source | [R] | User that originated the message
target | [R] | User/Channel message was sent to
time | [R] | when the message was received

### Public Class methods

new(bot, server, source, target, message)

instantiate a new Message

bot: | associated bot class
server: | Server where the message took place
source: | User that sent the message
target: | User/Channel is destined for
message: | actual message

strip_formatting(string)
strip_initial_formatting(string)
stripcolour(string)

strip mIRC colour escapes from a string

### Public Instance methods

address?()

returns true if the message was addressed to the bot. This includes any private message to the bot, or any public message which looks like it‘s addressed to the bot, e.g. "bot: foo", "bot, foo", a kick message when bot was kicked etc.

botuser()

Access the botuser corresponding to the source, if any

identified?()

Was the message from an identified user?

inspect(fields=nil)
sourceaddress()

Access the user@host of the source

sourcenick()

Access the nick of the source

[Validate]