1.1.10 • Published 8 years ago
ircjs v1.1.10
Table of Contents
ircJS
Extends EventEmitter3
Extendable base class for ircJS classes
Parameters
hostnamestring Hostname to connect to (optional, default'irc.irc7.com')portnumber Server port to connect to (optional, default6667)useTLSboolean? Describes if SSL/TLS encryption should be used (optional, defaultfalse)
Meta
- author: Joshua Davison <joshua@davison.asia>
client
The client object object contains multiple properties about the connection
Alias: ircJS.c
Type: Object
Properties
awayboolean Returns the valuetrueorfalsedepending on whether you are marked as away or not.mestring Returns your current nickname.portnumber Returns the port specified in the constructor whether you are connected to the server or not.realNamestring Returns the connection's 'realname'. in the constructor whether you are connected or not.serverstring Returns the name of the server to which you are currently connected.serverTargetstring Returns the address specified in the constructor whether you are connected to the server or not.sslboolean Returnstrueif TLS/SSL was requesteduserNamestring Returns your current username
event
The events object contains multiple properties that are useful for dealing with the handling of events.
Alias: ircJS.e
Type: Object
Properties
addressstring Returns the address of the user associated with an event in the form user@host.channstring Returns the name of the channel for a specific event. For all non-channel events chan will be$null.eventstring Returns the name of the event that was triggered.fulladdressstring Returns the full address of the user triggering an event in the form nick!user@host.nickstring Returns the nickname of the user associated with an event.numericstring Returns the nickname of the user associated with an event.rawMsgstring Returns raw server line for server events.sitestring Returns the portion of $address after the @ for the user associated with an event in the form user@host.targetstring Returns the target of an event.
connect
Connect the ircJS to the host specified in construction
Parameters
callbackFunction? An optional callback for when the client has successfully connected.
Returns object Instance of ircJS
parsePrefix
Converts a string representation of an IRC server/user (prefix) into a javascript object.
Parameters
prefixstring
Returns IRCPrefix
send
Used to send an unterminated string to the IRC server.
Parameters
dataString? Data to be send to server (optional, default'')
Returns object Current instance of ircJS
IRCPrefix
An object containing information extracted from an IRC prefix
Type: Object
Parameters
targettext
Properties