Menu

Check is bot is opped?

Help
2003-05-05
2003-05-06
  • Nobody/Anonymous

    Hello,

    I am having some difficulty figuring out how to know if the bot is opped in a certain channel.

    $irc->channel[$data->channel]->users[$irc->_nick]->op

    I used this variable with boolean true or false and right now it just says undefined index: botnick

    I would also suggest for the nex version some functions like isOp, isVoice and isBanned like isJoined. And extent these functions to be able to check other users.

    Matt

     
    • Nobody/Anonymous

      Hello,

      I figured out my problem I believe. I saw you used strtolower(); in SmartIRC.php to add users to the channels array.

      But I think the isOp, isVoiced, isBanned would be a good addition to the next version. I know I will code them myself most likly.

      Matt

       
      • Anonymous

        Anonymous - 2003-05-06

        You could also use somthing like $irc->mode($irc->nick); to get the modes st on the client.  I havent tried it yet. 
        Also example3 gets all the ops in the channel you could check each one to see if it has the same nick as the bot. 

         
    • Mirco Bauer

      Mirco Bauer - 2003-05-06

      in the current CVS version $irc->isOpped($channel, [$nick]) $irc->isVoiced($channel, [$nick]) and $irc->isBanned($channel, $hostmask) already exists, I suggest to download the current CVS version and try it ;)

       

Log in to post a comment.