Menu

More of a PHP question but...

Help
2003-11-01
2003-11-02
  • Nobody/Anonymous

    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();
        }

     
    • Mirco Bauer

      Mirco Bauer - 2003-11-02

      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...

       

Log in to post a comment.