Class Protocols.IRC.Client
- Method
create
Protocols.IRC.Client Protocols.IRC.Client(string|objectserver,void|mapping(string:mixed)options)- Parameter
server The IRC server to connect to. If server is an object, it is assumed to be a newly established connection to the IRC server to be used. Pass SSL.File connections here to connect to SSL secured IRC networks.
- Parameter
options An optional mapping with additional IRC client options.
"port":intDefaults to 6667.
"user":stringDefaults to
"unknown"on systems without getpwuid andgetuidand togetpwuid(getuid())[0]on systems with."nick":stringDefaults to
"Unknown"on systems without getpwuid andgetuidand toString.capitalize(getpwuid(getuid())[0])on systems with."pass":stringServer password, if any. Public servers seldom require this.
"realname":stringDefaults to
"Mr. Anonymous"on systems without getpwuid andgetuidand togetpwuid(getuid())[4]on systems with."host":stringDefaults to
"localhost"on systems withoutunameand touname()->nodenameon systems with."ping_interval":intDefaults to 120.
"ping_timeout":intDefaults to 120.
"connection_lost":function(void:void)This function is called when the connection to the IRC server is lost or when a ping isn't answered with a pong within the time set by the ping_timeout option. The default behaviour is to complain on stderr and self destruct.
"channel_program":programAn instance of this is created for each channel connected to via join_channel() - should be a subclass of Protocols.IRC.Channel.
"error_notify":function(mixed... :void)This function is called when a KILL or ERROR command is recieved from the IRC server.
"system_notify":function(string,void|string:void)"motd_notify":function(string,void|string:void)"error_nickinuse":function(string:void)"generic_notify":function(string,string,string,string,string:void)The arguments are from, type, to, message and extra.
"quit_notify":function(string,string:void)The arguments are who and why.
"privmsg_notify":function(Person,string,string:void)The arguments are originator, message and to.
"notice_notify":function(Person,string,string:void)The arguments are originator, message and to.
"nick_notify":function(Person,string:void)The arguments are originator and to.