BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => 0.2.x Custom/Unofficial Modules => Topic started by: jjones666 on October 27, 2006, 11:34:52 pm

Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on October 27, 2006, 11:34:52 pm
http://www.jjones.co.uk/files/autoinv.php
http://www.jjones.co.uk/files/relay_guild.php
http://www.jjones.co.uk/files/alert.php

Just some little cosmetic things I did for our org bot:

- !guestlist is expanded slightly to turn the autoinvite on and off and alert status on and off (see screenshot).
- !alert (works same as autoinv, just notifies on and offline status to GC instead of inviting).
- autoinvite notifies to GC when someone is autoinvited and shows their main toon if available.
- all settings handled via Glarawyn's module (!settings).
- private group -> guild chat relay is now switchable to turn on automatically at bot start.

Requires:

Plugin Name: Persistant Whois cache
Plugin Name: Module settings
Plugin Name: Roster_Guild (modified)
Download information here (http://bebot.link/index.php/topic,627.0.html)

Information if autoinvite isn't working:
Here (http://bebot.link/index.php/topic,134.msg4616/topicseen.html#new)
Title: Autoinvite and alert plugin discussion.
Post by: buff on November 08, 2006, 09:14:36 am
Fatal error: Cannot use string offset as an array in D:\Viraid\BeBot_v0.2.5\modules\autoinv.php on line 53

Got this error msg when I turn autoinv.php one :X (using jj's autoinv.php file)
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on November 08, 2006, 02:14:22 pm
Hmm, I thought I fixed that already.  I'll need to check copy on the server at home after work.  Did it work before and suddenly not or?

Try replacing whole Autoinv function with code as below, slightly more longwinded but it should achieve same thing...

Code: [Select]
function AutoInv (&$bot)
{
$this -> bot = &$bot;

$result = $this -> bot -> db -> select("SELECT * FROM settings WHERE setting = 'auto_invite'");

if (empty($result))
$this -> bot -> db -> query("INSERT IGNORE INTO settings (setting, value) VALUES ('auto_invite', '0')");

$result = $this -> bot -> db -> select("SELECT * FROM settings WHERE setting = 'auto_invite'");
$this -> auto = $result[0][1];
}
Title: Autoinvite and alert plugin discussion.
Post by: buff on November 15, 2006, 01:50:30 am
works now, thnx jj ;)
Title: Autoinvite and alert plugin discussion.
Post by: Llesa on November 26, 2006, 04:12:42 pm
Hi :)

I've been trying to download this module but the link seems to be broken. Is there any other place I can try?
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on November 26, 2006, 06:15:32 pm
Should work now I hope.

-jj-
Title: Autoinvite and alert plugin discussion.
Post by: pusikas on December 21, 2006, 04:46:27 pm
Is that the updated version talked about in >this< (http://bebot.link/index.php/topic,204.msg3369.html#msg3369) thread? Because to me it seems to be just a copy from the 0.2.10 bot, without the last_seen column. Or maybe I am just doing something wrong here, would not surprise me. :)
Title: Autoinvite and alert plugin discussion.
Post by: Malosar on December 21, 2006, 04:57:15 pm
http://bebot.link/index.php/topic,135.msg4117.html#msg4117

Is this what you want?
Title: Autoinvite and alert plugin discussion.
Post by: pusikas on December 21, 2006, 05:03:23 pm
Yes! I think so, alt least. Was trying to get JJ's modified !alts and !whois to work. Well, it does work right now, but spams about not finding the lastseen column. Will try this out.
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 14, 2007, 01:07:54 am
http://www.jjones.co.uk/files/autoinv.php
http://www.jjones.co.uk/files/relay_guild.php
http://www.jjones.co.uk/files/alert.php

Just some little cosmetic things I did for our org bot:

- !guestlist is expanded slightly to turn the autoinvite on and off and alert status on and off (see screenshot).
- !alert (works same as autoinv, just notifies on and offline status to GC instead of inviting).
- autoinvite notifies to GC when someone is autoinvited and shows their main toon if available.

obviously requires all of Xen's fixes above - I had to also delete and re-add guests for it to work correctly (hence option in !guestlist to do that) :-)

prolly crap, it's useful to me tho :-)

I updated these again, with a few sanity checks, obviously you shouldn't be able to add someone to notify/alert list without them being on the guestlist first :-)

http://www.jjones.co.uk/files/autoinv.php
http://www.jjones.co.uk/files/alert.php

-jj-
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 17, 2007, 01:46:55 am
Converted alert.php and autoinv.php to use Glara's new module settings plugin (http://bebot.link/index.php/topic,607.0.html) for all settings.

Above links apply.

-jj-
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 17, 2007, 08:33:44 am
Autoinv.php was updated - same link applies.

-jj-
Title: Autoinvite and alert plugin discussion.
Post by: ghostimage on January 17, 2007, 12:59:38 pm
Fatal error: Call to a member function create() on a non-object in C:\Temp\BeBot
-php_v5.1.5\BeBot-php_v5.1.4\modules\Alert.php on line 52

Same error on both Alert.php and AutoInv.php - I guess I'm missing some small tweak in bot.php somewhere?

*edit* Here's the line in question:

   $this -> bot -> set -> create ($module, "status", FALSE, $longdesc, "On;Off", FALSE, $disporder=1);
Title: Autoinvite and alert plugin discussion.
Post by: pusikas on January 17, 2007, 01:01:49 pm
No, you are probably missing the new settings module. Scroll 3 posts up.  ;)
Title: Autoinvite and alert plugin discussion.
Post by: ghostimage on January 17, 2007, 01:02:46 pm
No, you are probably missing the new settings module.

Nope, got that up and running. No problems with it that I've seen so far (checked the db and it's got the settings table etc).
Title: Autoinvite and alert plugin discussion.
Post by: ghostimage on January 17, 2007, 03:09:02 pm
Figured it out. I hadn't used the earlier versions of Module_Settings, so I wasn't aware that it was supposed to be in \core not \modules. Some other plugins using this module had worked OK because they came after "M" and so were loaded after module_settings anyway. These two didn't work because they tried load in before it :D
Title: Autoinvite and alert plugin discussion.
Post by: bmoscato on January 22, 2007, 08:54:26 pm
Is there a way to have a guests text display in org chat?  Currently when a guest joins they end up in a private chat group but not org chat.
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 22, 2007, 09:14:00 pm
use !relay and it will link guest chat with org chat.

-jj-
Title: Autoinvite and alert plugin discussion.
Post by: bmoscato on January 22, 2007, 09:27:23 pm
Hey JJ

I have the updated Roster_Guild.php and Relay_Guild.php running on my bot.  When I try to talk in the guest channel I receive:

Error: Chat group Exobot2 is currently not available.
Then on the server side I get the error message that MSVCR71.dll is missing.

Bryan
Title: Autoinvite and alert plugin discussion.
Post by: bmoscato on January 22, 2007, 09:55:16 pm
OK, I got rid of the .dll error but now I have:

Fatal error: Call to a member function lookup() on a non-object in C:\BeBot\modules\Relay_GUILD.php on line 281

---

Line 281:    $who = $this -> bot -> whois -> lookup($name);
Title: Autoinvite and alert plugin discussion.
Post by: Alreadythere on January 22, 2007, 09:59:18 pm
You need my whois cache (http://bebot.link/index.php/topic,223.0.html).
Title: Autoinvite and alert plugin discussion.
Post by: bmoscato on January 22, 2007, 10:31:57 pm
I'm know I sound like a noob, but why do I need WhoisCache?  I have no idea what I'm suppsed to do to get WhoisCache running on my server.

Do I need:

WhoisCache.php
Whois-Update.php
WhoisCache.conf

What directories do they go in if they don't go in Core or Module?

---

Also, after downloading the three modules that are a couple of posts up from:

http://www.jjones.co.uk/files/autoinv.php
http://www.jjones.co.uk/files/relay_guild.php
http://www.jjones.co.uk/files/alert.php

I get the same error that ghostimage did:

Connected to MySQL
[2007-01-22 21:36:17]   [CORE]  [LOAD]  Admin.php

Fatal error: Call to a member function create() on a non-object in C:\BeBot\core
\Alert.php on line 52

C:\BeBot>pause
Press any key to continue . . .

---

Line 52: $this -> bot -> set -> create ($module, "status", FALSE, $longdesc, "On;Off", FALSE, $disporder=1);

---

I tried to move Alert.php and autoinv.php to the core directory, but I get the same error.

Bryan
Title: Autoinvite and alert plugin discussion.
Post by: Malosar on January 22, 2007, 10:53:00 pm
The function lookup() is in the WhoisCache module is why you need it. The instructions in AlreadyThere's post explain what files go where and how to configure it.
Title: Autoinvite and alert plugin discussion.
Post by: Alreadythere on January 23, 2007, 08:40:03 am
I'm know I sound like a noob, but why do I need WhoisCache?  I have no idea what I'm suppsed to do to get WhoisCache running on my server.

Do I need:

WhoisCache.php
Whois-Update.php
WhoisCache.conf

What directories do they go in if they don't go in Core or Module?
I've put WhoisCache.php into my Core directory. Too many other modules need it in my bot.

Whois-Update.php and .conf are in my scripts directory, which is independant of any bot. As long as you make sure both are in the same directory and don't put them into the Core or Modules directory you won't run into problems.

Also, after downloading the three modules that are a couple of posts up from:

http://www.jjones.co.uk/files/autoinv.php
http://www.jjones.co.uk/files/relay_guild.php
http://www.jjones.co.uk/files/alert.php

I get the same error that ghostimage did:

Connected to MySQL
[2007-01-22 21:36:17]   [CORE]  [LOAD]  Admin.php

Fatal error: Call to a member function create() on a non-object in C:\BeBot\core
\Alert.php on line 52

C:\BeBot>pause
Press any key to continue . . .

---

Line 52: $this -> bot -> set -> create ($module, "status", FALSE, $longdesc, "On;Off", FALSE, $disporder=1);

---

I tried to move Alert.php and autoinv.php to the core directory, but I get the same error.
And another module needed, this time Glarawyn's Module Settings (http://bebot.link/index.php/topic,607.0.html).
Title: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 23, 2007, 08:58:31 am
Topic split from Xenixa's experimental rooster_guild topic, continue discussion here.

-jj-
Title: Re: Autoinvite and alert plugin discussion.
Post by: jjones666 on January 28, 2007, 03:03:01 am
Update to relay_guild.php:

- Added a switchable option to automatically turn on the relay when bot starts up.

Above link applies.

-jj-
Title: Re: Autoinvite and alert plugin discussion.
Post by: Dabaron on February 13, 2007, 07:10:56 am
Ok, for the "relay auto turning on" part I assume that is part of the Relay.php file.  Specifically the
Code: [Select]
if (!isset($this -> bot -> settings['Relay']['status'])but it isn't actually creating the relay status in my settings table.  Is there something I need to do to have it make it or does it need to be done manually?  If needs to be manually created is it a 1 or 0 type thing or what?
Title: Re: Autoinvite and alert plugin discussion.
Post by: jjones666 on February 13, 2007, 08:46:47 am
Check the "module_settings" entry in DB.  Hopefully, we'll have no need for the "settings" one soon :-)

!settings in GC should display and allow you the change all of the modules options.  Just a tip, I only have APF settings in the "old style" settings module left so you can fairly well completely delete that module.

-jj-
Title: Re: Autoinvite and alert plugin discussion.
Post by: Dabaron on February 18, 2007, 01:04:48 am
Heh, forgot about that command vs using the settings table.  Thanks JJ
SimplePortal 2.3.7 © 2008-2024, SimplePortal