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.