Jul 03, 2008, 02:02 PM
I have a irc bot on a irc chan
and i have put some code in newthread.php so the bot announce to a given chan, but would it be possible so when a staff member post inside a staff topic and i wont be shown i main irc chan (hope someone knowns what iam talking about)
here is the code i have now in newthread.php
Something that switch between the topics
here is something that i have from els where...
in this case our staff section has fid=13
and i have put some code in newthread.php so the bot announce to a given chan, but would it be possible so when a staff member post inside a staff topic and i wont be shown i main irc chan (hope someone knowns what iam talking about)here is the code i have now in newthread.php
Something that switch between the topics
here is something that i have from els where...
in this case our staff section has fid=13
PHP Code:
$fid = $arr["fid"];
switch($forid)
{
case 13:
$bot['password'] = "xxxxxxxxxxxx";
break;
default:
$bot['password'] = "xxxxxxxxxxxxxxx";
}
PHP Code:
if(!$mybb->input['postpoll'])
{
$lang->redirect_newthread .= sprintf($lang->redirect_return_forum, $fid);
}
//Bot
$bot['password'] = "xxxxxxxxxxxxxxx";
$bot['ip'] ="xxx.xxxx.xxxx.xxxx";
$bot['port'] = "xxxxx";
$bot['message'] = "..:: Topic: ".$mybb->input['subject']." :: Link - http://www.xxxxxxxxx/showthread.php?tid=".htmlspecialchars($tid)." :: Startet af: $username ::..";
$fp = fsockopen($bot['ip'], $bot['port'], $errno, $errstr, 40);
if($fp)
{
fputs($fp, $bot['password'] . " " . $bot['message'] . "\n");
sleep(5);
fclose($fp);
}
//End
redirect($url, $lang->redirect_newthread);
