| View previous topic :: View next topic |
| Author |
Message |
saiko Guest
|
Posted: Fri Dec 12, 2003 11:47 am Post subject: vbulletin tcl |
|
|
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 |
|
| Back to top |
|
 |
ShavdApe Halfop
Joined: 15 Dec 2003 Posts: 46
|
Posted: Tue Dec 16, 2003 9:52 pm Post subject: |
|
|
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: |
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/showthread.php?threadid=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/showthread.php?threadid=336 |
|
| Back to top |
|
 |
aryx Guest
|
Posted: Tue Jan 20, 2004 11:19 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Clipped Halfop

Joined: 24 Jan 2003 Posts: 73
|
Posted: Tue Jan 20, 2004 12:09 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
aryx Guest
|
Posted: Tue Jan 20, 2004 1:56 pm Post subject: |
|
|
| woot I got it working! It's not "$forumname[title]" but "$forumtitle". Maybe i misunderstood first, but atleast I got it 100% working now. :) |
|
| Back to top |
|
 |
ShavdApe Halfop
Joined: 15 Dec 2003 Posts: 46
|
Posted: Mon Feb 09, 2004 6:09 am Post subject: |
|
|
| Working and tested on RC2 atm. |
|
| Back to top |
|
 |
PLUGGER Voice
Joined: 30 Nov 2002 Posts: 24
|
Posted: Wed Feb 11, 2004 4:02 am Post subject: |
|
|
can this be done for phpBB aswell as vbulletin _________________ http://www.Plugger.info |
|
| Back to top |
|
 |
ShavdApe Halfop
Joined: 15 Dec 2003 Posts: 46
|
Posted: Sat Feb 14, 2004 10:02 am Post subject: |
|
|
| There is a phpbb script around yes |
|
| Back to top |
|
 |
PLUGGER Voice
Joined: 30 Nov 2002 Posts: 24
|
Posted: Sun Feb 15, 2004 6:59 am Post subject: |
|
|
would you care to elaborate on this by any chance _________________ http://www.Plugger.info |
|
| Back to top |
|
 |
ShavdApe Halfop
Joined: 15 Dec 2003 Posts: 46
|
Posted: Sun Feb 15, 2004 8:57 pm Post subject: |
|
|
| I dont use phpbb so where you will find the script is not something I thought to keep. Have you tried phpbb.com? |
|
| Back to top |
|
 |
Garp Voice
Joined: 15 Sep 2003 Posts: 29
|
Posted: Sun Mar 14, 2004 10:34 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
saiko Guest
|
Posted: Thu Sep 09, 2004 2:09 pm Post subject: |
|
|
| does the vbulletin.tcl works for vb303 already? |
|
| Back to top |
|
 |
cambodia Halfop

Joined: 22 Aug 2004 Posts: 73 Location: cambodia
|
Posted: Fri Mar 18, 2005 3:43 pm Post subject: |
|
|
| do it work with vbulletin 2.2.9 ? |
|
| Back to top |
|
 |
pmania Voice
Joined: 08 May 2005 Posts: 1
|
Posted: Sun May 08, 2005 9:34 am Post subject: |
|
|
| Where can I download this script ? |
|
| Back to top |
|
 |
cambodia Halfop

Joined: 22 Aug 2004 Posts: 73 Location: cambodia
|
Posted: Sun Jan 15, 2006 9:08 am Post subject: |
|
|
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 ? |
|
| Back to top |
|
 |
|