]Kami[ wrote:*Click*
Code: Select all
I found in some forums requests on a good script for posting new posts from a phpbb into a irc #channel. On http://forum.egghelp.org I found a fragment of a script from an unknow author for a payboard. Well. Here we go.
INSTALLATION:
Put the phpbb2egg.tcl into your bots /scripts directory and add the line
source scripts/phpbb2egg.tcl
at the end of your bot's .conf. Rehash your baby would be a good idea.
OPEN: posting.php
Search for:
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
include($phpbb_root_path . 'includes/phpbb2egg.'.$phpEx);
After it add:
include($phpbb_root_path . 'includes/phpbb2egg.'.$phpEx);
Search for:
if ( $error_msg == '' )
{
if ( $mode != 'editpost' )
{
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id'];
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
Add after:
//
// mod : php2egg
//
send2egg($mode, $forum_id, $topic_id, $user_id, str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $channel, $ids, $botip, $botport, $boardurl);
//
// fini mod : php2egg
//
Now open the included file phpbb2egg.php and fill the following variables with some usefull content:
$channel = "#gaydummies"; //channel to post stuff
$ids = "1 2 3 4 5"; // Id's of your forum to post stuff from
$botip = "62.80.118.90"; // sure the ip to reach your bot
$botport = "13481"; // a good botport
$boardurl = "www.phpbb2egg.pixelsndots.com"; // yes sure :)
Save phpbb2egg.php in /your/phpBB/includes/
That's it.
Garp <garp@pixelsndots.com>
TyPLUGGER wrote:]Kami[ wrote:*Click*
very helpfull
think this is something your looking for Namik
if you want the whole archive give me a shout, and it does work on phpbb cause i have it running on my site and my irc serverCode: Select all
I found in some forums requests on a good script for posting new posts from a phpbb into a irc #channel. On http://forum.egghelp.org I found a fragment of a script from an unknow author for a payboard. Well. Here we go. INSTALLATION: Put the phpbb2egg.tcl into your bots /scripts directory and add the line source scripts/phpbb2egg.tcl at the end of your bot's .conf. Rehash your baby would be a good idea. OPEN: posting.php Search for: $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); include($phpbb_root_path . 'includes/bbcode.'.$phpEx); include($phpbb_root_path . 'includes/functions_post.'.$phpEx); include($phpbb_root_path . 'includes/phpbb2egg.'.$phpEx); After it add: include($phpbb_root_path . 'includes/phpbb2egg.'.$phpEx); Search for: if ( $error_msg == '' ) { if ( $mode != 'editpost' ) { $user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id']; update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); Add after: // // mod : php2egg // send2egg($mode, $forum_id, $topic_id, $user_id, str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $channel, $ids, $botip, $botport, $boardurl); // // fini mod : php2egg // Now open the included file phpbb2egg.php and fill the following variables with some usefull content: $channel = "#gaydummies"; //channel to post stuff $ids = "1 2 3 4 5"; // Id's of your forum to post stuff from $botip = "62.80.118.90"; // sure the ip to reach your bot $botport = "13481"; // a good botport $boardurl = "www.phpbb2egg.pixelsndots.com"; // yes sure :) Save phpbb2egg.php in /your/phpBB/includes/ That's it. Garp <garp@pixelsndots.com>
Code: Select all
From phpbb2egg.php:
==============
<?php
// version 1.0.1 beta[development]
$channel = "#spider.priv";
$ids = "1 2 3 4 5"; // forums to display posts from
$botip = "82.96.72.4"; // your bot's ip
$botport = "7580"; // a nice port
$boardurl = "http://www.teamspider.org/uber/phpBB2";
Code: Select all
# you can change the port here, but pls think about to change it to
# the same port on functions_phpbb2egg.php:
Code: Select all
// version 1.0.1 beta[development]
$channel = "#snakehouse";
$ids = "45 48 4"; // forums to display posts from
$botip = "snakehouse.no-ip.info"; // your bot's ip
$botport = "3334"; // a nice port
$boardurl = "http://www.Plugger.info/mainsite/forums";
Code: Select all
# found on egghelp.org a posting by ShavdApe about a phpbb2egg script
# to post live into a channel when a post on a board is made
# add the line source/phpbb2egg.tcl into your .conf and rehash the bot
# you can change the port here, but pls think about to change it to
# the same port on functions_phpbb2egg.php:
listen 3334 script phpbb2eggaccept
proc phpbb2eggaccept {idx} {
control $idx phpbb2eggincoming
}
proc phpbb2eggincoming {idx args} {
putlog "$args"
set line [join $args]
if {[join $args] != "" } {
set chan [lindex $line 0]
set line [lrange $line 1 end]
set line [join $line]
set line [split $line ";"]
foreach line $line { putserv "PRIVMSG $chan :$line" }
putlog "$line"
}
killdcc $idx
}
putlog "phpbb2egg.tcl Loaded..."
and if you reply to this the eggdrop will display it too[06:11] <|SnakeBot|> New topic! on the Forums:
[06:11] <|SnakeBot|> about the subject test post for eggdrop :
[06:11] <|SnakeBot|> test post to show eggdrop will paste this text
[06:11] <|SnakeBot|> Link: http://snakehouse.no-ip.info/snakehouse ... .php?t=397