IRCG

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rincewind
Forum Commoner
Posts: 27
Joined: Thu Nov 21, 2002 11:15 am
Location: Norway

IRCG

Post by Rincewind »

Anyone in here have any experience with IRCG??
I've been surfing around but can't find any good documentation on it, so if anyone has any hints on where to find it??

Thanx

Rincewind_the_wizzard
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

what's wrong with http://www.php.net/manual/en/ref.ircg.php ?
Even the the ircg site links to it as php api manual :D
Rincewind
Forum Commoner
Posts: 27
Joined: Thu Nov 21, 2002 11:15 am
Location: Norway

Post by Rincewind »

Hmmm, nothing I guess...if you're a guru, like yourself :)
For me it has a disastrous lack of examples...I can read about each function, but I have no idea where to start or how to set up a page containing a chat-window......

Rincewind
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I have no running thttpd, otherwiseI would try it.
But if you take the examples of "darkelder at php dot net" at http://www.php.net/manual/en/ref.ircg.php and "sgriffith at ancients dot dhs dot org" at http://www.php.net/manual/en/function.i ... ssages.php you should have something to play with.
As far as I understood ircg will send messages after beeing installed whenever an event occurs on the irc-connection.
E.g. in the second example ircg is advised to send the message <script> receive_private_message('%f','%t','%j'); </script>\n whenever it retrieves a PRIVMSG. This is redirected to to client(-browser). If you've added something like

Code: Select all

<script type="text/javascript">
function receive_private_message(sFrom,sTo , sMessage)
&#123;
	document.write(sFrom + ' told '+t+ ': '+sMessage);
	return;
&#125;
</script>
in the <head></head>-section of the document, the function should be called whenever a PRIVMSG was entered.
Post Reply