BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Module Requests => Topic started by: Oplink on February 02, 2005, 08:38:24 pm

Title: Auto invite when logon
Post by: Oplink on February 02, 2005, 08:38:24 pm
Would like a module that auto invite members when they log on.
Title: Re: Auto invite when logon
Post by: iriche on February 02, 2005, 09:21:29 pm
Quote from: "Oplink"
Would like a module that auto invite members when they log on.


Noobie I can write that to you :)
For you special! ;D
Title: Auto invite when logon
Post by: Oplink on February 02, 2005, 09:36:29 pm
get to work then :p
Title: Auto invite when logon
Post by: iriche on February 02, 2005, 09:37:34 pm
Quote from: "Oplink"
get to work then :p


FU im eating fried potato thingies! ;D
Title: Auto invite when logon
Post by: Oplink on February 02, 2005, 10:35:36 pm
Quote from: "iriche"
Quote from: "Oplink"
get to work then :p


FU im eating fried potato thingies! ;D


hehe :)
Title: Auto invite when logon
Post by: Blondengy on February 03, 2005, 01:15:03 pm
Thats an easy one.
This should work, just quickly whipped it together - no time to test it I'm afraid. :(
Just save it as AutoInv.php in your "modules" directory.

Code: [Select]
<?
  /*
   * AutoInv.php - Module to auto invite members.
   *
   * BeBot - An Anarchy Online Chat Automaton
   * Copyright (C) 2004-2005 Jonas Jax
   *
   * Developed by Blondengy (RK1)
   * Special thanks goes out to Khalem (RK1) for his support.
   */
   
  /*
    Add a "_" at the beginning of the file (_ClassName.php) if you do not want it to be loaded.
  */
 
  $AutoInv = new AutoInv($bot);

  $commands["buddy"][] = &$AutoInv;




  /*
    The Class itself...
  */
  class AutoInv
  {
    var $bot;
   
   

    /*
      Constructor:
        Hands over a referance to the "Bot" class.
    */
    function AutoInv (&$bot)
    {
      $this -> bot = &$bot;
    }



    /*
      This gets called if a buddy logs on/off
    */
    function buddy($name, $msg)
    {
      if ($this -> bot -> is_member($name) && ($msg == 1))
$this -> bot -> aoc -> privategroup_invite($name);
    }
  }
?>
Title: Auto invite when logon
Post by: iriche on February 03, 2005, 01:26:58 pm
Quote from: "Blondengy"
Thats an easy one.
This should work, just quickly whipped it together - no time to test it I'm afraid. :(
Just save it as AutoInv.php in your "modules" directory.

Code: [Select]
<?
  /*
   * AutoInv.php - Module to auto invite members.
   *
   * BeBot - An Anarchy Online Chat Automaton
   * Copyright (C) 2004-2005 Jonas Jax
   *
   * Developed by Blondengy (RK1)
   * Special thanks goes out to Khalem (RK1) for his support.
   */
   
  /*
    Add a "_" at the beginning of the file (_ClassName.php) if you do not want it to be loaded.
  */
 
  $AutoInv = new AutoInv($bot);

  $commands["buddy"][] = &$AutoInv;




  /*
    The Class itself...
  */
  class AutoInv
  {
    var $bot;
   
   

    /*
      Constructor:
        Hands over a referance to the "Bot" class.
    */
    function AutoInv (&$bot)
    {
      $this -> bot = &$bot;
    }



    /*
      This gets called if a buddy logs on/off
    */
    function buddy($name, $msg)
    {
      if ($this -> bot -> is_member($name) && ($msg == 1))
$this -> bot -> aoc -> privategroup_invite($name);
    }
  }
?>


Yeah, That will invite ALL memhers (it wilo not work so good in a guildbot) I was going to check if is_guest ($name) not sure if that command exists ;)
Title: Auto invite when logon
Post by: Oplink on February 03, 2005, 02:17:00 pm
works great... thanks :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal