Method Protocols.IRC.Client()->create()
- Method create
Protocols.IRC.Client Protocols.IRC.Client(
string
|object
server
,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"
:int
Defaults to 6667.
"user"
:string
Defaults to
"unknown"
on systems without getpwuid andgetuid
and togetpwuid(getuid())[0]
on systems with."nick"
:string
Defaults to
"Unknown"
on systems without getpwuid andgetuid
and toString.capitalize(getpwuid(getuid())[0])
on systems with."pass"
:string
Server password, if any. Public servers seldom require this.
"realname"
:string
Defaults to
"Mr. Anonymous"
on systems without getpwuid andgetuid
and togetpwuid(getuid())[4]
on systems with."host"
:string
Defaults to
"localhost"
on systems withoutuname
and touname()->nodename
on systems with."ping_interval"
:int
Defaults to 120.
"ping_timeout"
:int
Defaults 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"
:program
An 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.