collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Auto Inviting (another look)  (Read 2135 times)

0 Members and 1 Guest are viewing this topic.

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Auto Inviting (another look)
« 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:
Code: [Select]

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)


220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Auto Inviting (another look)
« Reply #1 on: January 09, 2006, 07:48:40 am »
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:
Code: [Select]
    function buddy($name, $msg)
    {
     if($this -> auto == 1)
        {
        if ($msg == 1)
          {
  if ($this -> bot -> is_member($name) == 2)
   $this -> bot -> aoc -> privategroup_invite($name);
          }
        }
  }
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline Naturalistic

  • Contributor
  • *******
  • Posts: 221
  • Karma: +0/-0
Re: Auto Inviting (another look)
« Reply #2 on: January 09, 2006, 06:06:09 pm »
That works too :)
220/25 Eternalist Doctor
-----------------------------
Campalot Coding Co-ordinator and Super Admin
http://www.campalot.info/index.php

Offline Dabaron

  • BeBot Apprentice
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Auto Inviting (another look)
« Reply #3 on: August 20, 2006, 11:20:37 am »
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

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Auto Inviting (another look)
« Reply #4 on: August 20, 2006, 11:46:23 am »
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-

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 514
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal