PHP IRC Gateway Functions

EditRocket provides the following information on IRC Gateway functions in the PHP source code builder.

bool ircg_channel_mode ( resource $connection , string $channel , string $mode_spec , string $nick ) - Set channel mode flags for channel on server connected to by connection. Mode flags are passed in mode_spec and are applied to the user specified by nick.

bool ircg_disconnect ( resource $connection , string $reason ) -

array ircg_eval_ecmascript_params ( string $params ) -

array ircg_fetch_error_msg ( resource $connection ) - ircg_fetch_error_msg() returns the error from a failed connection.

string ircg_get_username ( resource $connection ) - ircg_get_username() returns the username for the specified connection connection.

string ircg_html_encode ( string $html_string [, bool $auto_links [, bool $conv_br ]] ) - Encodes a HTML string html_string for output. This exposes the interface which the IRCG extension uses internally to reformat data coming from an IRC link. The function causes IRC color/font codes to be encoded in HTML and escapes certain entities.

void ircg_ignore_add ( resource $connection , string $nick ) - This function adds user nick to the ignore list of the connection. Afterwards, IRCG will suppress all messages from this user through the associated connection.

bool ircg_ignore_del ( resource $connection , string $nick ) - This function removes user nick from the IRCG ignore list associated with connection.

bool ircg_invite ( resource $connection , string $channel , string $nickname ) - ircg_invite() will send an invitation to the user nickname, prompting him to join the given channel.

bool ircg_is_conn_alive ( resource $connection ) - ircg_is_conn_alive() checks the connection status.

bool ircg_join ( resource $connection , string $channel [, string $key ] ) - Join the channel channel on the server connected to by connection.

bool ircg_kick ( resource $connection , string $channel , string $nick , string $reason ) - Kick user nick from channel on server connected to by connection.

bool ircg_list ( resource $connection , string $channel ) -

bool ircg_lookup_format_messages ( string $name ) - Check for the existence of the format message set name.

bool ircg_lusers ( resource $connection ) - ircg_lusers() will request a statistical breakdown of users on the network connected to on connection.

bool ircg_msg ( resource $connection , string $recipient , string $message [, bool $suppress ] ) - ircg_msg() will send the message to a channel or user on the server.

bool ircg_names ( int $connection , string $channel [, string $target ] ) -

bool ircg_nick ( resource $connection , string $nick ) - Change your nickname on the given connection to the specified one, if possible.

string ircg_nickname_escape ( string $nick ) - Function ircg_nickname_escape() returns an encoded nickname specified by nick which is IRC-compliant.

string ircg_nickname_unescape ( string $nick ) - Function ircg_nickname_unescape() returns a decoded nickname, which is specified in nick.

bool ircg_notice ( resource $connection , string $nick , string $message ) - This function will send the message text to the user nick on the server connected to by connection. IRC servers and other software will not automatically generate replies to NOTICEs in contrast to other message types.

bool ircg_oper ( resource $connection , string $name , string $password ) - ircg_oper() will authenticate the logged in user on connection as an IRC operator.

bool ircg_part ( resource $connection , string $channel ) - Leave the channel channel on the server connected to by connection.

resource ircg_pconnect ( string $username [, string $server_ip [, int $server_port [, string $msg_format [, array $ctcp_messages [, array $user_settings [, bool $bailout_on_trivial ]]]]]] ) - ircg_pconnect() will try to establish a connection to an IRC server.

bool ircg_register_format_messages ( string $name , array $messages ) - With ircg_register_format_messages() you can customize the way your IRC output looks like or which script functions are invoked on the client side.

bool ircg_set_current ( resource $connection ) - Select the current HTTP connection for output in this execution context.

bool ircg_set_file ( resource $connection , string $path ) - ircg_set_file() specifies a logfile in which all output from the current connection will be logged.

bool ircg_set_on_die ( resource $connection , string $host , int $port , string $data ) - In case of the termination of the connection, IRCG will connect to the specified host, send data to the new host connection and will wait until the remote part closes connection. This can be used to trigger a PHP script for example.

bool ircg_topic ( resource $connection , string $channel , string $new_topic ) - Change the topic for the channel.

bool ircg_who ( resource $connection , string $mask [, bool $ops_only ] ) - ircg_who() will request a list of users whose nickname is matching the given mask.

bool ircg_whois ( resource $connection , string $nick ) - Sends a query to ask for information about the specified user.