"DTD/xhtml1-strict.dtd">
Class Irc::UserMessage
In: rbot/message.rb
Parent: BasicUserMessage
Class: JoinMessage Class: PartMessage Class: Plugins Class: KickMessage Class: IrcAuth Class: IRCChannel Class: IrcSocket Class: BotConfig Class: Keywords Class: BotRegistryAccessor Class: IrcClient Class: DBHash Class: Language Class: TopicMessage Class: QuitMessage Class: PrivMessage Class: UserMessage Class: NoticeMessage Class: IrcBot Class: BasicUserMessage Class: NickMessage Class: Plugin Class: BotRegistry Class: Keyword Class: DBTree Module: Irc

class for handling IRC user messages. Includes some utilities for handling the message, for example in plugins. The message member will have any bot addressing "^bot: " removed (address? will return true in this case)

Methods
action?    new    private?    public?    reply   
Attributes
:action  [R] 

for PRIVMSGs, true if the message was a CTCP ACTION (CTCP stuff will be stripped from the message)

:channel  [R] 

channel the message was in, nil for privately addressed messages

:params  [R] 

for plugin messages, the rest of the message, with the plugin name removed

:plugin  [R] 

for plugin messages, the name of the plugin invoked by the message

:replyto  [R] 

convenience member. Who to reply to (i.e. would be sourcenick for a privately addressed message, or target (the channel) for a publicly addressed message

Public Class methods
new(bot, source, target, message)

instantiate a new UserMessage

bot:associated bot class
source:hostmask of the message source
target:nick/channel message is destined for
message:message part
Public Instance methods
private?()

returns true for private messages, e.g. "/msg bot hello"

public?()

returns true if the message was in a channel

action?()
reply(string)

convenience method to reply to a message, useful in plugins. It's the same as doing: @bot.say 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.