BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: Naturalistic on January 09, 2006, 04:27:47 am
-
Not sure if this was thought up, but just seems to work for my bot, thought I'd post it here. :)
Inside AutoInv.php the last few lines:
function buddy($name, $msg)
{
$sql1 = "SELECT name FROM guests WHERE name = '$name'";
$result1 = $this -> bot -> db -> select($sql1);
if (($this -> auto == 1) && ($msg == 1) && (!empty($result1)))
$this -> bot -> aoc -> privategroup_invite($name);
}
This will (if you have guests) auto invite them when they login or when the bot crashes/restarts.
Note: I've only had this crash once, but never was able to figure why. If you get any problems, please let me know. Also: !autoinv on (must be turned on)
-
Ahh.. ic, you just skip the is_member() function altogether. Heh I went the other way with auto invites. I fixed is_member so something like this would work:
function buddy($name, $msg)
{
if($this -> auto == 1)
{
if ($msg == 1)
{
if ($this -> bot -> is_member($name) == 2)
$this -> bot -> aoc -> privategroup_invite($name);
}
}
}
-
That works too :)
-
Which module is adding guests to the sql? I ask because I don't have name and such in mine, the guest table only has an ID column with numbers I can't decipher for the data so I can't get it to just invite guests to the priv group on connect
-
Ok, the relay_guild updates are here:
http://bebot.link/index.php/topic,199.0.html
Also page 2 and 4 here:
(for autoinvite modules)
http://bebot.link/index.php/topic,288.15.html
I had to dump my guestlist and re-add it but it works like a charm now - previous autoinv invited members as well as guests when they logged on.
I would suggest you also use Xen's Rooster_Guild files (which is the second link) as I know he fixed a lot of things to stop guests being deleted etc.
Let me know if anything not clear.
Cheers,
-jj-