PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ircg_set_current> <ircg_pconnect
Last updated: Sun, 25 Nov 2007

view this page in

ircg_register_format_messages

(PHP 4 >= 4.0.5, PHP 5 <= 5.0.5)

ircg_register_format_messages — Register a format message set

Popis

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.

Parametre

name

messages

  • Plain channel message
  • Private message received
  • Private message sent
  • Some user leaves channel
  • Some user enters channel
  • Some user was kicked from the channel
  • Topic has been changed
  • Error
  • Fatal error
  • Join list end(?)
  • Self part(?)
  • Some user changes his nick
  • Some user quits his connection
  • Mass join begin
  • Mass join element
  • Mass join end
  • Whois user
  • Whois server
  • Whois idle
  • Whois channel
  • Whois end
  • Voice status change on user
  • Operator status change on user
  • Banlist
  • Banlist end
  • %f - from
  • %t - to
  • %c - channel
  • %r - plain message
  • %m - encoded message
  • %j - js encoded message
  • 1 - mod encode
  • 2 - nickname decode

Vrátené hodnoty

Vracia TRUE pri úspechu alebe FALSE pri chybe.



add a note add a note User Contributed Notes
ircg_register_format_messages
didou at keliglia dot com
24-Aug-2002 02:53
More about the 5 whois lines :

on ircg_whois($id_connexion,"dude") you'll get

First line : (user informations)
%f : dude
%t : dude's ident
%c : dude's remote address
%m : dude's name

Second line : (server informations)
%f : dude
%c : irc server adress
%r : homepage
%m : same as %r but with a <href> tag around

Third line : (inactivity)
%f : dude
%m : dude's idle in seconds

Fourth line : (where's dude at ?)
(one line per channel, nothing if dude set mode +i)
%f : dude
%c : the channel prefixed by '@' if dude is operator or 'v' if he's voiced

Fifth line : (end of the whois)
%f : dude

hope it will help !

Mehdi
sgriffith at ancients dot dhs dot org
05-Jun-2002 09:38
I am hoping to clarify a little bit about how this function works.

This function sets up the way that the IRC messages are formatted and delivered to the current connection.  Since this is a dynamic resource, you will likely need to either know or learn Jscript or something similar.

I am placing my format messages here so that you can see how to split it off and send the information to jscript functions for processing/updating.  I will leave it to you however to write the actual functions to handle the data..  I wouldnt want to spoil all the fun. :)  One last thing..  This is by NO MEANS the only way to use this library.  I am merely trying to help those that might be confused get a better understanding of the way the data is passed.

<?
//--- function begin ---
ircg_register_format_messages("MYIRC",
array(
"<script> reg_message('%c','%f','%r'); </script>\n",
"<script> receive_private_message('%f','%t','%j'); </script>\n",
"<script> send_private_message('%t','%f','%j'); </script>\n",
"<script> remove_chanuser('%1c','%f'); </script>\n",
"<script> single_userjoin('%c', '%f'); </script>\n",
"<script> kick_user('%1c','%1f','%1t','%j'); </script>\n",
"<script> change_topic('%f','%j'); </script>\n",
"<script> irc_error('%f','%t','%c','%m'); </script>\n",
"<script> fatal_error('%f','%t','%c','%m'); </script>\n",
"<script> end_joinlist('%f','%t','%c','%m'); </script>\n",
"<script> remove_channel(); </script>\n",
"<script> nick_change('%f','%t'); </script>\n",
"<script> user_quit_chat('%f','%c','%m'); </script>\n",
"<script> start_mass_join('%1c'); </script>\n",
"<script> massjoin_to_userlist('%c','%f'); </script>\n",
"<script> end_mass_join(); </script>\n",
"<script> whois_user('%f','%m'); </script>\n",
"<script> whois_serv('%f','%c','%m'); </script>\n",
"<script> whois_idle('%f','%m'); </script>\n",
"<script> whois_channel('%f','%c'); </script>\n",
"<script> whois_end('%f'); </script>\n",
"<script> voice_change('%f','%t','%c'); </script>\n",
"<script> op_change('%f','%t','%c'); </script>\n",
"<script> banlist_begin(); </script>\n",
"<script> banlist_end(); </script>\n",
));
//--- function end ---
?>

Good luck!

Scott

ircg_set_current> <ircg_pconnect
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites