This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

vbulletin tcl

Support & discussion of released scripts, and announcements of new releases.
s
saiko

vbulletin tcl

Post by saiko »

aloha,

i added the vbulletin.tcl in the bot, and made the changes in my vbulletin site.. this tcl should normally let the bot spam new topics in the chan.. i have set everything correctly i think but still i get no reaction from my bot.. any suggestion? thx in advance
S
ShavdApe
Halfop
Posts: 46
Joined: Mon Dec 15, 2003 5:22 pm

Post by ShavdApe »

Ok I did reply earlier but figure you may as well just use the following so I edited the post.

This is tried and tested and does work I promise

Code: Select all

add to functions.php or create a seperate file and add to newthread.php 
require_once('./your_new_file_name.php');

// THE PHP
function irc_send($ta,$text) {

 // options
 $serverip	= "123.123.123.123"; // PUT IP OF YOUR BOT HERE
 $serverport	= "13481";

 // check if target and text aint empty
 if ($ta=="" || $text=="") {
  return;
 }

 // do splitchar
 $text = ereg_replace(";", ":", $text);
 $text = ereg_replace("<br>", ";", $text);

 // add md5 hash
 $line="$ta $text";

 // open socket and put the line
 $socket = @fsockopen ($serverip, $serverport, $null, $null, 30);
  if (!$socket) {
  echo " no connection made ";
}
 if ($socket) {
  @fputs($socket,"$line\n");
          for($i=0;$i<400000;$i++)
        {
            $g=$i;
        }
		  fclose($socket);
 }
}

function irc_checkid($forumid) {

  $public[forumids]	="2 4 5 6 9 10 11 13 14 15 16 17 18 19 20 21 27 28 29 30 31 32 33 34";
  $public[chan]		="#yourchan";
  
  $forumids=explode(" ", $public[forumids]);
  while ( list($n, $id) = each($forumids)) { 
   if ($forumid == $id) {
    return "$public[chan]";
   }
  }

    return "";
}
// END OF FUNCTIONS

Now in newthread.php
somewhere just before the following :
 eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");

ADD THIS

	$text2  = "\002[\00311,01Board\00300,01]\002 New thread in: \002$forumname[title]\002 Poster: \002$postusername \002 Subject: \002 $subject\002<br>";
	$text2 .= 002[\00311,01Board\00300,01]\002 Link: http://www.mydomain.com/showthread.php?threadid=$threadid\002";
	
	$chan=irc_checkid($forumid);
	irc_send($ta=$chan,$text=$text2);

OK NOW THE TCL 

listen 13481 script vbulletinaccept
proc vbulletinaccept {idx} {
control $idx vbincoming
}

proc vbincoming {idx args} {

putlog "$args"
             set line [join $args]
        if {[join $args] != "" } {
              set chan [lindex $line 0]
set line [lrange $line 1 end] 
set line [join $line]
               set line [split $line ";"]
foreach line $line { putserv "PRIVMSG $chan :$line" }
putlog "$line"
        }
killdcc $idx
}
putlog "vbulletin.tcl Loaded..."
Proof if it was needed hehe

1:48:28 AM <@STS-BoT> [New Post Announcement]
1:48:29 AM <@STS-BoT> Topic by ShavedApe: Trivia now running on STS-bot in GENERAL-CONVERSATION
1:48:30 AM <@STS-BoT> Url: http://virgo.lunarpages.com/~q-rpc02/sh ... readid=335
1:54:33 AM <@STS-BoT> [New Post Announcement]
1:54:34 AM <@STS-BoT> Topic by venmx: which side are you on, sony or microsoft? in GAMES-AND-CONSOLES-DISCUSSION
1:54:35 AM <@STS-BoT> Url: http://virgo.lunarpages.com/~q-rpc02/sh ... readid=336
a
aryx

Post by aryx »

I tried this script by ShavdApe, and I get it 90% working, except it wont announce from what forum the new thread is made.
An example:

<eggdrop> [Board] New thread in: Poster: nickname Subject: something
<eggdrop> [Board] Link: http://my.website.com/showthread.php?threadid=42

Notice the space. It seems like it can't resolve forum name for some reason from '\002$forumname[title]\002'. The poster, subject and link resolve works fine though. I have set everything in the script up correctly, but could it be it doesn't support latest vBulletin version (2.3.4)?
Is there anything not mentioned in the script I should include?

Oh and btw, where it says you need to add a few lines to newthread.php, I copy/pasted exactly what written above, although I get a parser error then because of this line '$text2 .= 002[\00311,01Board\00300,01]\002 Link:'. So i added: '"\' before '002' else it wouldn't work at all.
User avatar
Clipped
Halfop
Posts: 73
Joined: Fri Jan 24, 2003 2:27 am

Post by Clipped »

Which version of VB is this for?


The latest vb 3.0.0 Release Candidate 2

Im also wondering if it lags at all? Other versions alwasy seemed to lag the bot out to hell..

If its for the 2.0 serries would anyone be willing to port this to the newest version?

Thanks

C
a
aryx

Post by aryx »

woot I got it working! It's not "$forumname[title]" but "$forumtitle". Maybe i misunderstood first, but atleast I got it 100% working now. :)
S
ShavdApe
Halfop
Posts: 46
Joined: Mon Dec 15, 2003 5:22 pm

Post by ShavdApe »

Working and tested on RC2 atm.
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

Post by PLUGGER »

can this be done for phpBB aswell as vbulletin
S
ShavdApe
Halfop
Posts: 46
Joined: Mon Dec 15, 2003 5:22 pm

Post by ShavdApe »

There is a phpbb script around yes
P
PLUGGER
Voice
Posts: 24
Joined: Sat Nov 30, 2002 6:54 am
Contact:

Post by PLUGGER »

would you care to elaborate on this by any chance
S
ShavdApe
Halfop
Posts: 46
Joined: Mon Dec 15, 2003 5:22 pm

Post by ShavdApe »

I dont use phpbb so where you will find the script is not something I thought to keep. Have you tried phpbb.com?
G
Garp
Voice
Posts: 29
Joined: Mon Sep 15, 2003 7:58 pm

Post by Garp »

I wrote a nifty little scipts.php which gatters the last 3 posts from my phpbb and writes it onto a flat file.
The script.php does the usual mysql queries and is called all 10 minutes by cron/lynx.
For posting the flatfile into the channel, I use mc.readfile.tcl
s
saiko

Post by saiko »

does the vbulletin.tcl works for vb303 already?
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

do it work with vbulletin 2.2.9 ?
p
pmania
Voice
Posts: 1
Joined: Sun May 08, 2005 9:31 am

Post by pmania »

Where can I download this script ?
User avatar
cambodia
Halfop
Posts: 73
Joined: Sun Aug 22, 2004 1:03 am
Location: cambodia

Post by cambodia »

any idea that this script work with vb 3.5.0 ? well i'm happy to know the script writer develop to new version as vb develop as well :) any body got any idea ?
Post Reply