Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
AIM Controller (AIM Bot For Vb) Details »»
AIM Controller (AIM Bot For Vb)
Version: 1.0.3, by Jafo232 Jafo232 is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.6.3 Rating:
Released: 11-08-2006 Last Update: 11-14-2006 Installs: 18
DB Changes Uses Plugins
Additional Files Is in Beta Stage  
No support by the author.

This Add-on Is Beta

The AIM Controller is an AIM Bot that connects to Vbulletin and can perform endless functions via Instant Messaging.

The Controller utilizes "action scripts" which are nothing more than Perl (CGI) scripts. You can write your own to perform almost any action.

I have only included a few proof of concept action scripts. They do the following:
  • Return latest threads (5).
  • Shut down or Re-open forum.
  • Notify users of replies to subscribed threads.
  • Who's online.

I do plan on adding more, but before I get too far into this, I would like some of you out there to try what is already available. I am mostly concerned with the controller. I have tested it extensively and have found it works great.

Requirements:

You must be able to execute Perl scripts on the command line via a shell like Telnet or SSH. Or you COULD run this from your desktop providing you have Perl installed on your PC, and you can connect to your MySQL database from your PC. Many servers only allow connections from localhost.

The ability to install Perl modules.

Perl (CGI).

You should be able to install Perl modules on your server, as the following are required:

Code:
  • DBI (with DBD::MySQl drivers)
  • constant (core module, should already be installed)
  • Net::OSCAR
  • Digest::MD5
  • IO::Poll
  • PHP::Serialization (for install/uninstall action scripts)
  • XML::RSS::Parser (for action scripts)
  • LWP 5.64 or higher
This IS NOT A CGI script and CANNOT be called in the browser. I will not answer any questions that pertain to "server 500 error in my browser" or browser timeouts. You should not be accessing this with your browser in any way.

Make sure you read the readme BEFORE you attempt to install.


UPDATES:

11/15/2006:

Updated aimnot.pl and functions.pl. Added flood protection and admin help for available commands. Just upload new admin.pl and functions.pl file and restart bot from scratch (no rehash). Make sure you redefine the vars or just copy them from the old file.

11/14/2006:

1. Created a new file called use_once.pl. This is where ALL use statements for action scripts must go. This stops memory hammering on action script calls. Edited aimnot.pl to require this file.

2. All Vbulletin settings (setting table) are loaded on init/rehash and populated in the %vbulletin hash.

3. Removed all "use" statements from action scripts. This caused the script to bloat wildly if an action script was executed frequently, such as polling scripts. All modules being used in action scripts MUST be used in this file only!

4. Fixed a minor bug in the message action script. If the VB version was up to date, a finish command was called on a query that actually never happened, throwing a warning.

5. Added global.cgi which is loaded at runtime. Here is where user defined variables can be placed and loaded on init/rehash.

6. Edited who.cgi action script so it reflects the vbulletin cookietimeout setting instead of my arbitrary 1000 seconds.

11/10/2006 11am EST: Updated installer and uninstaller to add/remove table aimmessages. This creates a message queue for user messages.

11/10/2006 added two action scripts. One (messages) checks the VB version on init and notifies admins if version out of date. Added REQUIRED action script that will send messages in queue.

Both of the above updates requires your execute: aimnot.pl uninstall and then aimnot.pl install with the latest version.

I will be adding action scripts from time to time without changing the version number of the add-on. You will only need to upload the new action scripts to their respective folders to implement them (rehash or restart the bot). I will be listing them here along with their dates.

Latest Action Scripts:

load.cgi & load_alarm.cgi 11/15/2006 - The admin command #load will display the load average on Unix/Linux/*nix servers. A new polling script will check the load every few seconds and send you an alarm if the load is over 10 (configurable). The warnings will persist every 30 seconds until the load is reduced.

stats.cgi 11/14/2006 - Will show user/post/thread stats. I put it in the custom_user folder, but if you only want this for admins, then place it in the custom_admin folder.

cron.cgi 11/10/2006 - Will execute cron.php as a polling event (every X seconds) instead of users activating it via the browser. Upload to polling_events folder.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 11-16-2006, 08:18 PM
Farjad Farjad is offline
 
Join Date: Jan 2006
Location: US
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am trying to install XML::RSS::Parser, via WHM, it stops automatically at:
Quote:
CPAN: LWP::UserAgent loaded ok

Fetching with LWP:

http://cpan.erlbaum.net/authors/id/S...ath-1.4.tar.gz

Out of memory!
Any help ?
Reply With Quote
  #23  
Old 11-17-2006, 12:30 AM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems your server is running out of memory I guess? I have never seen that error when I use the CPAN module.

Perhaps if you use a different cpan mirror when downloading?
Reply With Quote
  #24  
Old 11-17-2006, 12:54 AM
Farjad Farjad is offline
 
Join Date: Jan 2006
Location: US
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jafo232 View Post
Seems your server is running out of memory I guess? I have never seen that error when I use the CPAN module.

Perhaps if you use a different cpan mirror when downloading?
How do I do that .. sorry i am totally new in linux.. so I use it directly from WHM.. and I do have 4GB Ram on this server.. I am confused.
Reply With Quote
  #25  
Old 11-17-2006, 02:52 AM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Farjad View Post
How do I do that .. sorry i am totally new in linux.. so I use it directly from WHM.. and I do have 4GB Ram on this server.. I am confused.
Hmm, depends on your server. However, with 4gb of ram, you should not run out of memory.. Perhaps you should speak to your server admin?

Also, you may want to contact the authors of the module, and maybe the CPAN module too..

The only reason why you need this module is to run the latest.cgi action script. You can comment out the use statement in the use_once.pl file and just delete the latest.cgi script from the custom_user directory until you get the module installed.
Reply With Quote
  #26  
Old 11-17-2006, 06:40 PM
Farjad Farjad is offline
 
Join Date: Jan 2006
Location: US
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jafo232 View Post
Hmm, depends on your server. However, with 4gb of ram, you should not run out of memory.. Perhaps you should speak to your server admin?

Also, you may want to contact the authors of the module, and maybe the CPAN module too..

The only reason why you need this module is to run the latest.cgi action script. You can comment out the use statement in the use_once.pl file and just delete the latest.cgi script from the custom_user directory until you get the module installed.
Actually, I own this server.. I got this cause my site is growing big.. currently with 100k members.. BTW.. Ill ask my datacenter

EDIT:

Now I don't think I need XML::RSS:Parser.. I decided to recode the script latest.cgi to :
Code:
## Include this at the top of all action scripts.
if (!CONTROLLER) { print "Cannot be executed directly"; exit; }

my $db = &dbconnect;

my $dbh=$db->prepare("SELECT * FROM " . $dbprefix . "thread ORDER by threadid DESC LIMIT 20");



$dbh->execute() or print "$! Cannot execute query DBI: $DBI::errstr";
## ($threads) = $dbh->fetchrow_array();
while (@rows = $dbh->fetchrow()) {
	($threads .= "<a href='$bburl/showthread.php?t=".$rows[0]."'>".$rows[1]."</a>\n")
}
$dbh->finish();



$oscar->send_im($who, "$threads");

($threads = "")
EDIT:
One last question:
when i start the bot I get
Code:
Can't get http://api.oscar.aol.com/SOA/key=MYAPIKEYHERE/resource-lists/users/*anonymous*/presence/~~/resource-lists/list[name="users"]/entry[@uri="user:MuftoBot"] -- 500 Internal error in validating key.VB Version Out Of Date!
There was an error in messages.cgi.  Returned was Can't call method "finish" on an undefined value at (eval 46) line 30, <FH> line 64.
 and Resource temporarily unavailableLoaded 191 users
.................You are now signed on to AOL Instant Messenger.
.........basic OSCAR service: Unknown extended info request
also, how do I start this without being logged in SHELL ? .. as when I exit the shell it automatically goes offline.

and, how can i ban/block users who curse X number of times?

finally, how about #exit , that would turn off the bot , useful at times at high loads.
Reply With Quote
  #27  
Old 12-31-2006, 04:43 PM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

#shutdown turns the bot off

As for your bot shutting off after you log off, use nohup. Example:

nohup /path/to/executable &

Remember the pid # it returns (after you hit return twice) in case you need to kill the process.

Make sure your AIM API key is correct.
Reply With Quote
  #28  
Old 01-01-2007, 12:25 PM
Mupetz Mupetz is offline
 
Join Date: Sep 2005
Location: Strasbourg
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't forget Google Talk
Reply With Quote
  #29  
Old 01-01-2007, 07:49 PM
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will not be adding any other IM services to this bot.
Reply With Quote
  #30  
Old 01-09-2007, 05:23 PM
Distance's Avatar
Distance Distance is offline
 
Join Date: Jul 2006
Location: Boston, Uk
Posts: 725
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh right ... damn no Msn then..

bye
Reply With Quote
  #31  
Old 01-10-2007, 03:52 AM
AzzidReign's Avatar
AzzidReign AzzidReign is offline
 
Join Date: Apr 2006
Posts: 497
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, this sounds pretty awesome!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05164 seconds
  • Memory Usage 2,312KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete