Description
resource
ircg_pconnect ( string username [, string server_ip [, int server_port [, string msg_format [, array ctcp_messages [, array user_settings]]]]])
ircg_pconnect() will try to establish a
connection to an IRC server and return a connection resource
handle for further use_
The only mandatory parameter is username,
this will set your initial nickname on the
server_ server_ip and
server_port are optional and default to
127_0_0_1 and 6667_
Nota:
For now parameter server_ip will not do
any hostname lookups and will only accept IP addresses in
numerical form_ DNS lookups are expensive and should be done in the
context of IRCG_
You can customize the output of IRC messages and events by
selecting a format message set previously created with
ircg_register_format_messages() by specifying
the set's name in msg_format_
If you want to handle CTCP messages such as ACTION (/me), you need to
define a mapping from CTCP type (e_g_ ACTION) to a custom format
string_ Do this by passing an associative array as
ctcp_messages_ The keys of the array
are the CTCP type and the respective value is the format message_
You can define "ident", "password", and "realname" tokens which
are sent to the IRC server by setting these in an associative
array_ Pass that array as user_settings_
See also: ircg_disconnect(),
ircg_is_conn_alive(),
ircg_register_format_messages()_