REGISTER or LOGIN to have the annoying ads removed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bot on mybb
#1
I have a irc bot on a irc chan Smile 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$errstr40);
if(
$fp)
{
fputs($fp$bot['password'] . " " $bot['message'] . "\n");
sleep(5);
fclose($fp);
}
//End
redirect($url$lang->redirect_newthread); 
#2
Put the whole bot code in another if statement

Code:
if($fid != 13)
{
// BOT CODE
}
#3
Don't follow... Sad
#4
You don't want to post 'new threads' of your Staff Section on IRC ... so if the $fid == Staff Section, do nothing else post the new thread ...

$fid : FID of Current ForumSection
!= : not equal to
13 : FID of your Staff Section

So you put the code; that thing you or someone else added to the newthread.php page and you put it between that if statement i posted 2posts up.

If that's to hard to follow; don't bother my posts then.


Possibly Related Threads...
Thread Author Replies Views Last Post
  MyBB Multiforums Mod - Start a free MyBB Forum Host! BMR777 6 6,274 Mar 22, 2008, 03:17 PM
Last Post: Violation

Forum Jump:


Users browsing this thread: 1 Guest(s)