| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]
Protocols
Protocols.IRC
Protocols.IRC.Client

# Method Protocols.IRC.Client()->create()

Method create

  `void Protocols.IRC.Client(string server, void|mapping(string:mixed) options)`

Parameter `server`

  The IRC server to connect to.

Parameter `options`

  An optional mapping with additional IRC client options.

  `"port" : int` | Defaults to 6667.
  `"user" : string` | Defaults to `"unknown"` on systems without getpwuid and getuid and to `getpwuid(getuid())[0]` on systems with.
  `"nick" : string` | Defaults to `"Unknown"` on systems without getpwuid and getuid and to `String.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 and getuid and to `getpwuid(getuid())[4]` on systems with.
  `"host" : string` | Defaults to `"localhost"` on systems without uname and to `uname()->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.
  `"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)` |
  `"motd_notify" : function(string:void)` |
  `"error_nickinuse" : function(string:)` |
  `"generic_notify" : function(string:)` | The arguments are from, type, to, message and extra.
  `"quit_notify" : function(string:)` | The arguments are who and why.
  `"privmsg_notify" : function(Person:)` | The arguments are originator, message and to.
  `"notice_notify" : function(Person:)` | The arguments are originator, message and to.
  `"nick_notify" : function(Person:)` | The arguments are originator and to.