Having played with this beast I get more impressed as I get my head around it.
May I suggest a few things that would might help those approaching the beast for the first time ?
1) For development/testing purposes setting the timeout value to a fairly high value.
Eg. $params['timeout'] = 1000 * 60 * 60; gives a decent stay around time.
It can be a little disconcerting when testing across a couple of machines to see nicks dropping off for no apparent reason depending upon the
$params["shownotice"] = 3; // 0 = nothing, 1 = just nickname changes, 2 = connect/quit, 3 = nick + connect/quit
setting.
2) Equally setting the refresh delay to a low level when testing might hammer the server but it gets things responding quickly between machines.
$params["refresh_delay"] = 2000; // chat refresh speed in milli seconds
Finally, a question.
I'm trying to get the object to use a particular nick when the chat object is launched with
<?php $chat->printChat(); ?>
the nick is set with the following code fragment.
if ( isset($_GET['nick']) )
{
$params["nick"] = $_GET['nick']; // setup the intitial nickname
}
else
{
$params["nick"] = "guest"; // setup the intitial nickname
}
By the way isset($_GET['nick'] ) should in this scenario never return false
I'm guessing that a /rehash is required, however is it possible to force the object to perform a /rehash when it is instantiated via something in the $param array ? so that object instantiation forces a /rehash prior to calling:-
<?php $chat->printChat(); ?>
I suspect I'm missing something stupid here
I don't want to hack around inside the object and kludge something as it will break my code whenever a new release becomes available.
Any help gratefully received.