same as you did in bot_die(), with global $var;
it creates an reference from the global namespace into the function, so this works for reading an variable _and_ for writing...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how do i get $ownerip out of support_check and info bot_die???
function support_check(&$irc, &$data)
{
if ($data->rawmessageex[1] == 311)
{
$ownerip = $data->rawmessageex[5];
}
}
function bot_die(&$irc, &$data)
{
global $owner, $ownerip;
echo("Owner: $owner<br>Ownerip: $ownerip<br>");
$irc->disconnect();
}
same as you did in bot_die(), with global $var;
it creates an reference from the global namespace into the function, so this works for reading an variable _and_ for writing...