BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Gwitz on March 21, 2006, 09:18:03 am

Title: Help with prgoup !online
Post by: Gwitz on March 21, 2006, 09:18:03 am
Im currently using my bot for org and raid stuff, and iv been trying to get the !online command in privgroup to only show people in the pgroup and not people in the org. So far not much success, still newbie at php. Im using alreadytheres fancy online module. And i have another module thats only got pgroup functions. So if anyone has any idea :D

The other module is also very handy for raids because it has all the proffesion commands like !enf !doc ect. I was trying to combine the two, but i coulnt get that to work either.

posted the pgroup only module i have.

*edit attached it twice, oops ><
Title: Re: Help with prgoup !online
Post by: Alreadythere on March 21, 2006, 09:34:26 am
It's Akarah's Online module (credit where credit is due!).

If you want to use both classes, you have to make sure that they got different object names, and the line $var = new OnlineXY($bot) has to have different variable names.
And you need to comment out the pgroup command define in the org bot online module.

For information about profs in the pgroup, you can use my count module (http://bebot.link/index.php/topic,323.0.html) too.
Just be warned:
Quote
Needs my color module, and uses my whois cache. And is using get_tablename too.
Title: Re: Help with prgoup !online
Post by: Gwitz on March 21, 2006, 11:27:11 am
Well, ill give that a try, oh and anyone got a !tell module i can ninja ^^? Where it spams the message a few times
Title: Re: Help with prgoup !online
Post by: Naturalistic on March 21, 2006, 04:09:02 pm
You can also just remove/comment out the entire "show org online people" from online.php.

Title: Re: Help with prgoup !online
Post by: Alreadythere on March 21, 2006, 05:50:55 pm
Well, ill give that a try, oh and anyone got a !tell module i can ninja ^^? Where it spams the message a few times
Here (http://bebot.link/index.php/topic,106.0.html) is a tell module
Title: Re: Help with prgoup !online
Post by: Gwitz on March 22, 2006, 01:10:14 am
It worked, wewt. I have both modules working together perfectly. I commented everything out in the core online to do with pgroup and changed the variables in the other one to chatlist. Thanks already for the tips. Now im wondering if i can have the core online still display people in the pgroup to the online message thats called in guildchat.
Title: Re: Help with prgoup !online
Post by: jokerjr on May 05, 2006, 02:46:22 am
This is what I did to get an online for just people in the private group I just modified the Online.php file.

From this
Code: [Select]
/*
      This gets called on a msg in the privgroup with the command
    */
    function pgmsg($name, $msg)
    {
      if ($this -> bot -> is_member($name))
      {
        $disponline = (($this -> bot -> guildbot) ? "both": "pgroup");
        $this -> bot -> send_pgroup($this -> online_msg($msg, $disponline));
      }
    }

To this
Code: [Select]
  /*
      This gets called on a msg in the privgroup with the command
    */
    function pgmsg($name, $msg)
    {
         $disponline = "pgroup";
         $this -> bot -> send_pgroup($this -> online_msg($msg, $disponline));
    }
SimplePortal 2.3.7 © 2008-2024, SimplePortal