forum announce via eggdrop!

Started by Fire-Fox, June 28, 2011, 04:41:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fire-Fox

#5
Have solved the issue!

thanks for the hint!

i have my own php script to the new_post script..

can i do this:
if (!in_array($forum_id, array("1"))) {
$forid = $arr["forid"];
switch($forid)
{
case 7:
$bot['password'] = "xxxxxxxxxxxx";
break;
default:
$bot['password'] = "xxxxxxxxxxxxx";
}
$bot['ip'] = "xxxxxxxxxxxxxx";
$bot['port'] = "17020";
$uname = htmlspecialchars($CURUSER["username"]);
$bot['messagea'] = "..:: Nyt topic i forum ::..";
$bot['messageb'] = "..:: Link - http://url.com/forums.php?action=viewtopic&topicid=".htmlspecialchars($topicid)." ::..";
$bot['messagec'] = "..:: Startet af: ".$uname." - Emne: ".htmlspecialchars($subject)." ::..";

$fp = fsockopen($bot['ip'], $bot['port'], $errno, $errstr, 40);

if($fp)
{
    fputs($fp, $bot['password'] . " " . $bot['messagea'] . "\n");
    sleep(1);
fputs($fp, $bot['password'] . " " . $bot['messageb'] . "\n");
    sleep(1);
    fputs($fp, $bot['password'] . " " . $bot['messagec'] . "\n");
    sleep(1);
    fclose($fp);
}
}

Mindless

#4
You need to make a bot function first otherwise you wont anything to send the data - The new_topic.php already has autoshout on it so thats exactly where your code will go. Check takeupload.php because theres a bot function for irc announce there commented out - thats what you need to use.

Fire-Fox


Mindless

Well what version are you using - only v2 has new_topic ?

Fire-Fox

Hey!

Maybe it's the wronge place, but here goes :)

Where in the "/forums/new_topic.php" shoul i place a code that will get eggdrop to announce to a irc chan?