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
-
Would like a module that auto invite members when they log on.
-
Would like a module that auto invite members when they log on.
Noobie I can write that to you :)
For you special! ;D
-
get to work then :p
-
get to work then :p
FU im eating fried potato thingies! ;D
-
get to work then :p
FU im eating fried potato thingies! ;D
hehe :)
-
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.
<?
/*
* 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);
}
}
?>
-
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.
<?
/*
* 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 ;)
-
works great... thanks :)