Menu

Modes

Help
Anonymous
2003-06-01
2003-06-01
  • Anonymous

    Anonymous - 2003-06-01

    Is there a way to test what channel-modes a user has set on them? Like... I know halfop and admin (%/+h and !/+a) aren't global modes that are on all servers... but I want to be able to test for them, so I can update the who's in chat list to say who the halfops and admins are. And if you would, I read the documentation, but I didn't get how to check for ops and voices, either.

     
    • Mirco Bauer

      Mirco Bauer - 2003-06-01

      there is a Op and a Voice array in the channel object:
      $irc->channel['#chan']->ops;
      and
      $irc->channel['#chan']->voices;

      also in the CVS version of SmartIRC you can do:
      $irc->isOpped($chan, $user);
      $irc->isVoiced($chan, $user);
      $irc->isJoined($chan, $user);
      and
      $irc->isBanned($chan, $hostmask);

      kinda handy functions ;)

       
    • Wild Bill

      Wild Bill - 2003-06-01

      Here's a suggestion, how about an $irc->isMode($chan, $mode, $user) function? That could allow us to test for any mode, rather than just the standard Op, Voice, and Banned modes. So...

      $irc->isMode('#test', '+a', 'Nick');

      ... would return true if Nick is an admin in #test. :)

       

Log in to post a comment.