vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Irc post Notifier -With eggdrop (https://vborg.vbsupport.ru/showthread.php?t=39974)

dong 06-16-2002 10:00 PM

Irc post Notifier -With eggdrop
 
Irc thread Notifier -With eggdrop [VB 2.2.x > 2.3.x]
https://vborg.vbsupport.ru/showthrea...threadid=39974
################################################## ###################
for installation on VB 3.x.x
the only things that are different are the placement of the code-adds
to /newthread.php and admin/index.php. the code-add of /newthread.php
itself stays the same. admin/ircaddon.php, /irc.php and the required
sql query also stays the same.
since i dont have vb3 i cant check. if anyone tell me where the
code should be in vb3, i will add it to this install text

--
1.0
this is an modification of dymo's Irc post Notifier without eggdrop,
dymo should get all credit, cos i didn't do that much modifications
to his hack. Also IRiDiuM deserves some credit for his tcl, thx dude :)
https://vborg.vbsupport.ru/showthrea...threadid=38205
--
2.0
removed reply announcement from irc.php and ircadmin.php ,irc.php has
simplyfied code, added chan choice to the admin
--
2.9
code adjustment to newthread.php rewritten. added multiple channel support
removed the ircaddon_install.php, everything is in this txt

################################################## ###################
What it does:
------------
When a new thread is posted by a user on your board a message will
be send to your eggdrop irc bot, and the bot echo's it to your
irc channel

*note: YOU NEED AN EGGDROP BOT CONNECTED TO AN IRC SERVER FOR THIS
u can get eggdrop here: http://www.egghelp.org/
or windrop here: http://windrop.sourceforge.net/

other ircbots that can run tcl scripts could also be usefull

################################################## ###################
When UPGRADING TO 2.0
---------------------
then you only have to overwrite/copy irc.php, ircadmin.php and
vbulletin.tcl to the right places. NO updates to newthread.php
newreply.php and admin/index.php are required

When UPGRADING TO 2.9
---------------------
then you have to overwrite/copy irc.php, ircadmin.php and
vbulletin.tcl to the right places. the old adjustment in
newthread.php must be replaced with the new one
also edit port number in vbulletin.tcl if you did that before
and you have to reconfigure all options in the ircadmin

################################################## ###################
place the files from the zip in:
--------------------------------
ircadmin.php -> vb admin dir
irc.php -> vb root dir
vbulletin.tcl -> eggdrop script dir

################################################## ###################
config your eggdrop:
--------------------
edit in vbulletin.tcl
if you want to use another portnumber then 1337, than edit that number

edit your eggdrop config file (eggdrop.conf):
add at the end:
source scripts/vbulletin.tcl

################################################## ###################
run required sql queries:
--------------------------
add a new table with phpmyadmin > run the queries in install.sql

################################################## ###################
php adjustments:
----------------
++++++++++++++++++
open /newthread.php
and find:
++++++++++++++++++

// redirect
if ($postpoll) {
$goto="poll.php?s=$session[sessionhash]&threadid=$threadid&polloptions=".intval($pollopti ons);
} elseif ($visible) {
$goto="showthread.php?s=$session[sessionhash]&threadid=$threadid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}

++++++++++++++++++
under that add:
++++++++++++++++++

// irc addon
$ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
if($ircdata[ircthread] == "1") {
$Action = "new";
$fid = $ircdata[ircchan1forum];
$ircforum = preg_replace("/[[:space:]]+/", " ", $fid);
$ircforum = " ".$ircforum." ";
$forumtoirc = "/ ".$forumid." /";
if (preg_match($forumtoirc ,$ircforum)) {
$ircchan=$ircdata[ircchannel1];
require("irc.php");
}
$fid = $ircdata[ircchan2forum];
$ircforum = preg_replace("/[[:space:]]+/", " ", $fid);
$ircforum = " ".$ircforum." ";
$forumtoirc = "/ ".$forumid." /";
if (preg_match($forumtoirc ,$ircforum)) {
$ircchan=$ircdata[ircchannel2];
require("irc.php");
}
$fid = $ircdata[ircchan3forum];
$ircforum = preg_replace("/[[:space:]]+/", " ", $fid);
$ircforum = " ".$ircforum." ";
$forumtoirc = "/ ".$forumid." /";
if (preg_match($forumtoirc ,$ircforum)) {
$ircchan=$ircdata[ircchannel3];
require("irc.php");
}
}
//

++++++++++++++++++
open admin/index.php
and find:
++++++++++++++++++

makenavselect("User Groups","<hr>");

++++++++++++++++++
under that add:
++++++++++++++++++

//ircaddon
makenavoption("Modify/Enable/Disable IRC","ircadmin.php?action=settings");
makenavselect("IRC");

++++++++++++++++++
hacks done


################################################## ###################
configure the ircaddon:
-----------------------
go to the admin control panel and find "Modify/Enable/Disable IRC"
on the left.
configure all options
notes:
- IRC Forum ID`s
put all your forum id's that you want to have notified in irc here,
use only 1 space to seperate forumid numbers

- IRC Server Address
here you put the ip/hostname of your eggdrop bot

- IRC Server Port
here you put the port number which is set in the vbulletin.tcl script.
This is the port# the bot listens to for notifier messages. in this
case its 1337

################################################## ###################
now your done


################################################## ###################
the following problems could occure:
------------------------------------

Connection Refused
this error occures on 2 known occasions:

1# u have to make sure ur provider allows u to open a port
(in this case 1337, u could try another port, but don't forget to also
change it in the vbulletin.tcl)

2# make sure ur eggdrop has opened a port (1337) to listen for messages.

--
Connection Timeout
this error occures when your bot is offline, or the host of your vb board
cant reach the bots ip
--
slow displaying of the thread announcement is caused by the bot
requesting ident information from the vb boards host. currently i haven't
found any solution for this problem. adjusting the ident timeout setting
on the bot doesnt help, but ive noticed that an eggdrop is faster then a windrop.
if someone has more insight to this plz tell us
--
hint:
make sure a firewall is not blocking any communication
lasttime i helped someone install, it didnt work cos the idiot didnt
turned the firewall off on the bot box. after telling him for the 5th
time 'turn the fecking firewall off' it worked
so make sure nothing is blocking its communication, at the isp where your
vb is running or at the box where the bot is running
--

*504 views on previous attachment 1.0
*141 views on previous attachment 2.0

JohnWoo 06-17-2002 07:04 PM

greate work

/me install

Demascus 06-17-2002 07:36 PM

gr8 work but i dont have a eggdrop or a shell to run it on

ModshackUK 06-17-2002 08:20 PM

Any chance of a txt version of the instructions as the text is getting mixed up with the installer and its causing me loads of parse errors.

Also for those who use quick reply this will not work as it will bypass it if a member uses it to make a reply to a thread.

HM

mADmAX` 06-17-2002 08:22 PM

I have the eggdrop installed and everything as you stated.

I run the script from IE6 and get Connection refused (111)

When I make a post in the category # I choose, it takes a little while then it redirects but does not come to the channel and notify. I have it pointed at the eggdrop ip and port as stated also. What could the problem be.

NTLDR 06-17-2002 09:04 PM

Quote:

Originally posted by mADmAX`
I have the eggdrop installed and everything as you stated.

I run the script from IE6 and get Connection refused (111)

When I make a post in the category # I choose, it takes a little while then it redirects but does not come to the channel and notify. I have it pointed at the eggdrop ip and port as stated also. What could the problem be.

Its the same problem as outlined above:

Quote:

Originally posted by dong
Connection Refused(117)

this means your host doesnt allow to open a connection on (in this case) port 1337
you could try to resolve this by setting the listening portnumber to a more common port, like 23 (telnet)

You need to change the port number.

mADmAX` 06-17-2002 09:27 PM

I changed ports to some others and same problem. I changed the ircd to unreal recently and got the same error but it did notify. This was with the previous release, not the eggdrop. I never tried the eggdrop with Unreal at that time though. Well anyways, I had many other problems so I had to go back to UIRCD 3.0.7 and I am getting the same problem which I hoped the eggdrop would fix. So in other words, I dont think the port is the problem cause it did work on Unreal with that same port.

mADmAX` 06-17-2002 09:53 PM

Well, I didnt make the changes in newreply and new thread to the changes for this way, so I just did (dont know if they are the same).

I get a parse error and wondering something...

$ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
if($ircdata[ircthread] == "1") {
$Action = "new";
$fid = trim($ircdata[ircforum]);
$ircforum=explode(" ", preg_replace("/[[:space:]]+/", " ", $fid) );
while (list($key,$val)=each($ircforum))
{
if ((strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
{
require("irc.php");
}

"Seems theres two } 's missing but I do not know where they belong?"

mADmAX` 06-17-2002 10:11 PM

I put two } at the end of that to stop the parsing and I was connected to the bot that I have eggdrop running in the channel to see if I could see anything funny

This is what I seen...

<xxxx> [16:04] Telnet connection: xxx.xxx.xxx.19/32989
<xxxx> [16:04] Timeout/EOF ident connection

dong 06-18-2002 02:14 AM

Quote:

Originally posted by ModshackUK
Any chance of a txt version of the instructions as the text is getting mixed up with the installer and its causing me loads of parse errors.

Also for those who use quick reply this will not work as it will bypass it if a member uses it to make a reply to a thread.

HM

where do u get those parse errors?, in the installer?
i tested the install_ircaddon.php script, it runned ok 4 me
u shoeld read very good, i think it should work, if u have connection refused, the script works, but u need to find a better port , maybe ask your host what ports u may open

dong 06-18-2002 02:18 AM

Quote:

Originally posted by mADmAX`
I have the eggdrop installed and everything as you stated.

I run the script from IE6 and get Connection refused (111)

When I make a post in the category # I choose, it takes a little while then it redirects but does not come to the channel and notify. I have it pointed at the eggdrop ip and port as stated also. What could the problem be.

read the last bit of my post, try another port...

dong 06-18-2002 02:22 AM

Quote:

Originally posted by mADmAX`
Well, I didnt make the changes in newreply and new thread to the changes for this way, so I just did (dont know if they are the same).

I get a parse error and wondering something...

$ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
if($ircdata[ircthread] == "1") {
$Action = "new";
$fid = trim($ircdata[ircforum]);
$ircforum=explode(" ", preg_replace("/[[:space:]]+/", " ", $fid) );
while (list($key,$val)=each($ircforum))
{
if ((strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
{
require("irc.php");
}


"Seems theres two } 's missing but I do not know where they belong?"

this is the part of my newthread.php
PHP Code:

        $goto="showthread.php?s=$session[sessionhash]&threadid=$threadid";
      } else {
        
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
      }
// Create a notice on irc channel
      
$ircdata $DB_site->query_first("SELECT * FROM ircaddon");
             if(
$ircdata[ircthread] == "1") {
                 
$Action "new";
                
$fid trim($ircdata[ircforum]);
                
$ircforum=explode(" "preg_replace("/[[:space:]]+/"" "$fid) );
                while (list(
$key,$val)=each($ircforum)) 
                {
                    if ((
strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
                    {
                        require(
"irc.php");
                    }
                }
            }
      eval(
"standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
    }
  }
}

// ############################### start new thread ###############################
if ($action=="newthread") {

//  $foruminfo=getforuminfo($forumid);
  
$message htmlspecialchars($message); // Without this, a </textarea> in the message breaks the form on preview
  
$subject htmlspecialchars($subject); 

this is something u can compare with
it runns exellent with my crap
but
i know there are some problems with newreply, but thats of later concern, it should notfiy whit the ++++ i gave u, unless u got connection refused..

mADmAX` 06-18-2002 08:04 AM

Quote:

Originally posted by ModshackUK
Any chance of a txt version of the instructions as the text is getting mixed up with the installer and its causing me loads of parse errors.

Also for those who use quick reply this will not work as it will bypass it if a member uses it to make a reply to a thread.

HM

dong has overlooked an error in the install script...thus why you getting the parse errors...

Change this:
{
require("irc.php");
}

to:
{
require("irc.php");
}
}
}

Also, the newreply.php check for action=xxx

Another error is it should =="reply" not "new"

BTW, I am in no way putting your work down dong, I am just trying to help others with the same probs I went through. I also got it to work .... yippie :)

Floris 06-18-2002 09:02 AM

Does eggdrop need to run on the same server as the web server ? Because I have a seperate shell for eggdrop on a different server then the web server where I will run the .php files.

mADmAX` 06-18-2002 09:14 AM

No, I am running it on two different servers.

dong 06-18-2002 12:03 PM

Quote:

Originally posted by mADmAX`


dong has overlooked an error in the install script...thus why you getting the parse errors...

Change this:
{
require("irc.php");
}

to:
{
require("irc.php");
}
}
}

Also, the newreply.php check for action=xxx

Another error is it should =="reply" not "new"

BTW, I am in no way putting your work down dong, I am just trying to help others with the same probs I went through. I also got it to work .... yippie :)

yea, thx for showing me the error, i thought those } were already in the original script, sometimes i cant see the forest through the tree's :P

i updated the zip

dong 06-18-2002 12:41 PM

Quote:

Originally posted by ModshackUK
Any chance of a txt version of the instructions as the text is getting mixed up with the installer and its causing me loads of parse errors.

Also for those who use quick reply this will not work as it will bypass it if a member uses it to make a reply to a thread.

HM


added an installation.txt which include the script hacks
its in the new zip

ModshackUK 06-18-2002 02:26 PM

Quote:

added an installation.txt which include the script hacks
its in the new zip
I have looked at the new zip and can not find it ?

HM

TaP 06-19-2002 06:25 PM

anyone got this to work at all?

mADmAX` 06-19-2002 07:28 PM

yes I have...whats your prob, maybe I can help you as I had lots of probs but I did get it working :)

TaP 06-19-2002 08:41 PM

well when i make a post, i have my eggdrop in the chan and everyhiing...the post goes thru and up on the board...but there is no announcement in the irc chan :( ...

Pady 06-20-2002 05:53 AM

thanks , i am using it on my board ;)

[high]* Pady installed it ;)[/high]

nitro 06-20-2002 01:57 PM

hi donq glad to c u have started yer own thread

as u know i installed your eggdrop mod from the -no eggdrop thread

just a small question

have my bugs been addressed with yer hack

1. get duble announce on sum forums mainly with an id 20+
2. forum that i have not specified is announcing tho others that i have not specified are cool
3.on reply the forum name is not displayed in the announce

apart from these as u know i have it working gr8
an the hack is the coolerst 1 yet

Juanito 07-10-2002 08:43 PM

The hack is working for me, new thread is created and post annouced on irc but we aren't taked back to the thread, we stay stiucked on a white page.

----edited---

Nevermind, I forgot that you should modify the newthread.php in two places, witch was not specified in the install file I think... All working perfectly now, awesome hack :D

Juanito 07-12-2002 01:05 AM

OK, one more thing! Now that I got it working perfectly, I don't understand how to custumize the way the IRC messages looks. What should I do if I want the text not inverted, blue or green with only the username, title and forum in bold ?


I assume this is in those parts of irc.php, but I don't understand how I should modify it...

PHP Code:

 fputs($fp,"\002[\00311,01X\00300,01]\002 New thread in: \002".$forumname[title].".\002 Poster: \002".$postusername.".\002 Subject: \002 ".$subject.". \002 \002[\00311,01X\00300,01]\002 \n\n");
        for(
$i=0;$i<3000000;$i++) 


redline 07-14-2002 08:38 PM

hello i installed this hack
but its not notifing new threads

i have modified this in newthread.php

$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$forumid";
}
// irc addon
$ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
if($ircdata[ircthread] == "1") {
$Action = "new";
$fid = trim($ircdata[ircforum]);
$ircforum=explode(" ", preg_replace("/[[:space:]]+/", " ", $fid) );
while (list($key,$val)=each($ircforum))
{
if ((strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
{
require("irc.php");
}
}
}
eval("standardredirect(\"".gettemplate("redirect_p ostthanks")."\",\"$goto\");");
} else {
//create new thread

vyrusmulder 07-30-2002 07:09 AM

can i install it on a 2.2.1 vbulletin ???

dong 08-12-2002 02:58 PM

yes

Frank 08-13-2002 09:40 PM

I have:
newthread.php
PHP Code:

      // Create a notice on irc channel
      
$ircdata $DB_site->query_first("SELECT * FROM ircaddon");
             if(
$ircdata[ircthread] == "1") {
                 
$Action "new";
                
$fid trim($ircdata[ircforum]);
                
$ircforum=explode(" "preg_replace("/[[:space:]]+/"" "$fid) );
                while (list(
$key,$val)=each($ircforum)) 
                {
                    if ((
strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
                    {
                        require(
"irc.php");
                    }
                }
            }
      
// 

and newreply.php:

PHP Code:

      // irc addon
      
$ircdata $DB_site->query_first("SELECT * FROM ircaddon");
             if(
$ircdata[ircreply] == "1") {
                 
$Action "reply";
                
$fid trim($ircdata[ircforum]);
                
$ircforum=explode(" "preg_replace("/[[:space:]]+/"" "$fid) );
                while (list(
$key,$val)=each($ircforum)) 
                {
                    if ((
strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
                    {
                        require(
"irc.php");
                    }
                }
            }
      
// 

All requests still get handled by the
PHP Code:

   else if($Action == 'reply'

branch of the code, regardless of whether the action is 'new'

Regardless of whether a new thread is started or a reply to an existing thread is posted, I always get the same message on IRC of:

[23:37] (@cyoot): {New reply in: Subject: Mac Users. Thread starter: Ali H, New poster: Frank. }

Note "new reply", never says "new thread".

Also, how can the braces around it be removed.

Also, why does the forum name not show up?

Thanks.

draven 09-05-2002 07:33 PM

The hack works really great. Could one easily make a direct link to the post/thread?

Floris 09-05-2002 07:37 PM

It would be great if someone with .tcl and .php knowledge could clean up the files so that irc post thread stuff is removed and it wont timeout on the ident to the bot etc, which would save SO much time when posting new threads/posts.

Currently I only let it do threads, since they are made less.
new reply would be great, but ppl seriously complain a lot about the lag on the forum.

Floris 09-07-2002 10:36 PM

I just run into a bug.
When someone starts a poll, it will announce the thread (which is actually poll.php?something.. so the user could edit the post (bad vB!) or they get a msg that the poll can't be edited because i am not the owner of it. It SHOULD say the url to the thread, and not the poll :P

moosey 09-12-2002 03:20 PM

Works fine for me just one thing though it updates to the IRC Chan all most instantly but then it sits there for a minute or so b4 it post the actual message in the forum?

Great work btw :-)

Code:

<?
global $goto, $DB_site, $Action, $ircdata;

$fp = fsockopen ($ircdata[ircserver], $ircdata[ircport], $errno, $errstr, 30);
if (!$fp)
{
    echo "$errstr ($errno)<br>\n";
}
else
{
if($Action == 'new')
    {

        global $postusername, $subject, $forumid;
        $forumname = $DB_site->query_first("SELECT title FROM forum WHERE forumid=".$forumid);
        fputs($fp,"8,5 New thread in: \002" .$forumname[title]. ".\002 Poster: \002".$postusername.".\002 Subject: \002 ".$subject.".\002 LINK: \002 http://www.simplymaya.co.uk/forums/".$goto.". \002 \n\n");

        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }

    }
else

{
        global $postusername, $subject, $forumid, $threadinfo;
        $forumname = $DB_site->query_first("SELECT title FROM forum WHERE forumid=".$forumid);
        fputs($fp," 5,15New reply in: \002".$forumname[title]." \002 Subject: \002".$threadinfo[title].".\002 Thread starter: \002".$threadinfo[postusername]."\002, Replies:\002".($threadinfo[replycount] + 1).". \002 \n\n\n");

        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }

}


  fputs($fp, "QUIT :Message delivered\n");
    fclose ($fp);
}




?>

I modified the irc.php file works like a dream now thanks very much :)

Floris 01-10-2003 08:45 AM

No matter what I do, the private forum, with forumid XX keeps getting posted, while all the other forums that are not listed don't get posted.

Uhm,

forums to include: 1,2,3,4,5
private mod forums: 6,7,8

and it posts on irc: 1,2,3,4,5,8

So .. how to exclude that one that it shouldn't but still does?

DPoole 01-12-2003 02:04 AM

can anyone help and to save myself a load of grief can you answer this quick question

i dont have eggdrop from shell so if i was to say run it from me comp (localhost) would that not make it work ? as at moment this is only way for me to get an eggdrop up and running.

Mephisteus 01-19-2003 02:45 PM

I have an eggdrop installed and did the file edits, but I think I edited the wrong parts. Since there are multiple appearences of the lines you have to find. Could someone post their newreply & newthread part? I am listening on port 22, this is the port I connect to using SSH. I also get an tcl error when I connect. WHAT'S GOING WRONG!? PS. I'm new to eggdrop :p

spaceb 01-23-2003 04:47 AM

Thanks for the hack it's really a great one but there's a ptoblem..
Either it's posting from all the forums , or either if i choose not to post all forums, it dosen't post at all..

I'm using an eggdrop and a vbb version 2.2.7.. maybe it dosen't work on this version or something ? :/

Killer 02-05-2003 02:14 PM

I installed the hack, too. Works fine. But one problem: Some of the buttons in admin CP seem to have no function or not the function they should have. Look at the end of my posting, there u can see what the bot does depending on what files are checked ind admin CP. I only want to turn off the notification on new replys!

I would be very thankful for hints to solve this problem.

Below u can see my edited files:

newreply.php:
Code:

// irc addon
          $ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
                    if($ircdata[ircthread] == "1") {
                        $Action = "reply";
                                $fid = trim($ircdata[ircforum]);
                                $ircforum=explode(" ", preg_replace("/[[:space:]]+/", " ", $fid) );
                            while (list($key,$val)=each($ircforum))
                                {
                                    if ((strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
                                        {
                                                require("irc.php");
                                        }
                                }
                        }
      //

newthread.php:
Code:

// Create a notice on irc channel
          $ircdata = $DB_site->query_first("SELECT * FROM ircaddon");
                    if($ircdata[ircthread] == "1") {
                        $Action = "new";
                                $fid = trim($ircdata[ircforum]);
                                $ircforum=explode(" ", preg_replace("/[[:space:]]+/", " ", $fid) );
                            while (list($key,$val)=each($ircforum))
                                {
                                    if ((strstr(" ".$forumid," ".trim($val))!="") || ($ircdata[ircforum] == 0))
                                        {
                                                require("irc.php");
                                        }
                                }
                        }
      //

irc.php:
Code:

<?
global $goto, $DB_site, $Action, $ircdata;

$fp = fsockopen ($ircdata[ircserver], $ircdata[ircport], $errno, $errstr, 30);
if (!$fp)
{
    echo "$errstr ($errno)<br>\n";
}
else
{

  if($Action == 'new')
    {
        global $postusername, $subject, $forumid;
        $forumname = $DB_site->query_first("SELECT title FROM forum WHERE forumid=".$forumid);
        if($ircdata[ircchannel1] != FALSE)
            fputs($fp,"\002[\00311,01X\00300,01]\002  New thread in: \002".$forumname[title]."\002    Poster: \002".$postusername."\002    Subject: \002".$subject."\002 \002[\00311,01X\00300,01]\002\n\n");
        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }
        if($ircdata[ircchannel2] != FALSE)
            fputs($fp, "PRIVMSG ".$ircdata[ircchannel2]." :New thread in ".$forumname[title].". Poster: ".$postusername.". Subject: ".$subject.". Link: http://yourdomain.com/".$goto."\n");
        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }
        if($ircdata[ircchannel3] != FALSE)
            fputs($fp, "PRIVMSG ".$ircdata[ircchannel3]." :New thread in ".$forumname[title].". Poster: ".$postusername.". Subject: ".$subject.". Link: http://yourdomain.com/".$goto."\n");
    }
    else if($Action == 'reply')
    {
        global $postusername, $subject, $forumid, $threadinfo;
        $forumname = $DB_site->query_first("SELECT title FROM forum WHERE forumid=".$forumid);
        if($ircdata[ircchannel1] != FALSE)
            fputs($fp, "\002[\00311,01X\00300,01]\002 New reply in: \002".$forumname[title]."\002    Subject: \002".$threadinfo[title]."\002    Thread starter: \002".$threadinfo[postusername]."\002    New poster: \002".$threadinfo[lastposter]."\002 \002[\00311,01X\00300,01]\002\n\n\n");
        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }
        if($ircdata[ircchannel2] != FALSE)
            fputs($fp, "PRIVMSG ".$ircdata[ircchannel2]." :There is a reply to a post in ".$forumname[title]." with the subject: ".$threadinfo[title].". Thread starter: ".$threadinfo[postusername].", New poster: ".$threadinfo[lastposter].". Link: http://yourdomain.com/".$goto."\n\n\n");
        for($i=0;$i<30000;$i++)
        {
            $g=$i;
        }
        if($ircdata[ircchannel3] != FALSE)
            fputs($fp, "PRIVMSG ".$ircdata[ircchannel3]." :There is a reply to a post in ".$forumname[title]." with the subject: ".$threadinfo[title].". Thread starter: ".$threadinfo[postusername].", New poster: ".$threadinfo[lastposter].". Link: http://yourdomain.com/".$goto."\n\n\n");
    }
    for($i=0;$i<30000;$i++)
    {
        $g=$i;
    }
    for($i=0;$i<23;$i++)
    {
        $info .= fgets ($fp,1280);
    }
    fputs($fp, "QUIT :Message delivered\n");
    fclose ($fp);
}




?>




What the bot does:

[x] = set to "on" in Admin CP
[ ] = set to "off" in Admin CP

1) Irc Post Notification Addon
2) Irc All New Threads Notification Addon
3) Irc All New Reply's Notification Addon


Case 1: 1) [ ] 2) [ ] 3) [x] ---> Bot does nothing
Case 2: 1) [ ] 2) [ ] 3) [ ] ---> Bot does nothing
Case 3: 1) [ ] 2) [x] 3) [ ] ---> Bot posts new threads and new replies
Case 4: 1) [x] 2) [ ] 3) [ ] ---> Bot does nothing
Case 5: 1) [ ] 2) [x] 3) [x] ---> Bot posts new threads and new replies
Case 6: 1) [x] 2) [x] 3) [ ] ---> Bot posts new threads and new replies
Case 7: 1) [x] 2) [ ] 3) [x] ---> Bot does nothing
Case 8: 1) [x] 2)[x] 3)[x] ---> Bot posts new threads and new replies

I am running vBB 2.2.6

Any hints to make the bot only post on new threads?

Killer 02-05-2003 08:52 PM

I found the buggy thing :)

Take newreply.php and search for:

Code:

if($ircdata[ircthread] == "1")
Replace ircthread with ircreply

The ON/OFF - Option for New Reply Notification should work now :)

Nicarlo 02-24-2003 11:13 PM

no matter what i do it never dispays the new thread although it does display the new reply's how can i fix this ?


All times are GMT. The time now is 04:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01502 seconds
  • Memory Usage 1,946KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (5)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete