Documentation

SrsBot object

Methods

bot.connect(server, port [,timeout])
Connects to server on port
bot.disconnect([quitMessage])
Disconnects
bot.reconnect([maxAttempts, interval])
Reconnects and re-joins channels
bot.register(nickname, username, realname)
Registers with the server
bot.nick(nickname)
Changes your nickname
bot.join(channel)
Joins a channel
bot.part(channel)
Leaves a channel
bot.messages()
High-level method that returns a message object
bot.rawMessages()
Low-level method that waits until messages are recieved then returns a list of messages
bot.privmsg(recipient, message)
Sends a message to recipient (channel or nick)
bot.message(message)
Sends a low-level message to the server.
bot.printVerbose(message)
Prints a message to the terminal if bot.verbose is set to 1

Properties

bot.connected
1 if connected, 0 if disconnected
bot.channels
List of joined channels
bot.verbose
Set to 1 to see events and messages

message object

Properties

message.body
Body of a message
message.sender
Message sender's nick
message.senderHost
Message sender's hostmask
message.recipient
Where the message was directed
message.type
Message type as defined in chapter 3 of IRC RFC 2812
message.raw
Entire message
Valid XHTML 1.0 Strict
© 2006-2009 Serious, Inc. Entraprises 
All rights reserved