SetNickname($Nickname); /* Update Connection status. */ $ConnectionStatus = 2; } /* Return the raw connection data, so the user can add their own matches. */ return $Message; } /* * JoinChannel( Channel to join ). * Joins the specified IRC channel. Simple, eh ? */ function JoinChannel($Channel) { global $Connection, $ConnectionStatus; /* Send a join packet to join a channel. - OPTIONALLY part of the connect process. */ fputs($Connection, "JOIN ".$Channel."\n\r"); /* Update connection status. */ $ConnectionStatus = 4; } /* * SetNickname( New Nickname ). * Set the nickname for the client, can be called after connection to set nickname! */ function SetNickname($Nickname) { global $Connection, $ConnectionStatus; /* Send nickname packet. */ fputs($Connection, "NICK " . $Nickname ."\n\r"); } /* * SendPrivMessage( Recipient , Message ). * Send the desired message to the specified recipent. */ function SendPrivMessage($To, $Message) { global $Connection, $ConnectionStatus; fputs($Connection, "PRIVMSG " . $To . " :" . $Message ."\n\r"); } /* * SendChannelMessage( Recipient , Message ). * Send the desired message to the specified recipent. */ function SendChannelMessage($Channel, $Massage) { global $Connection, $ConnectionStatus; fputs($Connection, "PRIVMSG " . $Channel . " " . $Massage . "\n\r"); } } ?>