egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

tcl/php pack to display phpBB board messages in #channel
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Garp
Voice


Joined: 15 Sep 2003
Posts: 29

PostPosted: Tue Mar 16, 2004 3:43 am    Post subject: tcl/php pack to display phpBB board messages in #channel Reply with quote

Days ago I found here a snippet to post invision bord messages into a channel. Now I prepared a package to make it easy for phpBB users.

Please test it and give me some response about it if possible. You can download it at http://phpbb2egg.pixelsndots.com/phpbb2egg.zip - it's easy to install.

For tests I've installed http://phpbb2egg.pixelsndots.com, the posts are displayed in #phpBB2egg on undernet.

Still there is a lot to do but it works fine. I've tested it with phpBB2.0.7
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Tue Mar 16, 2004 10:27 am    Post subject: Reply with quote

The .zip file dosen't seem to be there..
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
spock
Master


Joined: 12 Dec 2002
Posts: 319

PostPosted: Tue Mar 16, 2004 1:26 pm    Post subject: Reply with quote

http://phpbb2egg.pixelsndots.com/phpbb2egg.beta.zip
_________________
photon?
Back to top
View user's profile Send private message
]Kami[
Owner


Joined: 24 Jul 2003
Posts: 590
Location: Slovenia

PostPosted: Thu Mar 18, 2004 12:03 pm    Post subject: Reply with quote

Nice, just what i needed Smile
_________________
Slovene Eggdrop Page
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
the_crow
Halfop


Joined: 28 Feb 2003
Posts: 42
Location: Lisboa, Portugal

PostPosted: Sat May 15, 2004 12:09 am    Post subject: Reply with quote

can anyone tell me if this really work with you?? i tried this thing, but the egg didn't give me any signal Neutral
Back to top
View user's profile Send private message
the_crow
Halfop


Joined: 28 Feb 2003
Posts: 42
Location: Lisboa, Portugal

PostPosted: Sat May 15, 2004 10:54 am    Post subject: Reply with quote

i found the error, but i don't know how to correct...
can you give me a light Smile


error: Tcl error [phpbb2eggincoming]: invalid idx
Back to top
View user's profile Send private message
Nash0r
Guest





PostPosted: Wed Jul 28, 2004 8:13 pm    Post subject: Reply with quote

*bump*

Any updates on this one?
Back to top
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Thu Jul 29, 2004 3:15 am    Post subject: Reply with quote

Eleet, I like the idea. Mr. Green
I would recommend the owner of the script should submit it on egghelp.org's TCL Archive and other famous on the web so the public is aware of such a script. Wink
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Jul 29, 2004 7:11 am    Post subject: Reply with quote

awyeah wrote:
Eleet, I like the idea. Mr. Green
I would recommend the owner of the script should submit it on egghelp.org's TCL Archive and other famous on the web so the public is aware of such a script. Wink

The scripts require some more work before they can be released IMO...the php provided has some weird stuff in it (a while loop that looks like it's supposed to emulate sleep(), (try fflush() instead?) no timeout for the socket etc..) and the tcl part is insecure (just find the port and you're free to talk through the bot Razz)
_________________
Have you ever read "The Manual"?
Back to top
View user's profile Send private message
AxS
Halfop


Joined: 09 Apr 2003
Posts: 46

PostPosted: Tue Oct 26, 2004 8:26 pm    Post subject: Reply with quote

Anyone managed to fix this script so that it works with phpBB 2.0.10 ? I have a no go and as user said...as is, it seems not workable - can someone fix the code? Please? Or is there another script out there that does what this one set out to do? Rolling Eyes

Thanx peeps
Back to top
View user's profile Send private message
Xandor
Voice


Joined: 14 Mar 2005
Posts: 3

PostPosted: Mon Mar 14, 2005 11:06 am    Post subject: Reply with quote

It works in the 2.0.13 but i found i needed to change one more thing in the "phpbb2egg.php".
find the following (line 14):

Code:
$nick = $userdata[user_id];

and change it to
Code:
$nick = $userdata[username];



it needs to be $userdata[username] or it wont find the username, and only post the user's ID.
i'm working a little on trying to improve the script a little. I'll post it here when/if i get it done Smile
Back to top
View user's profile Send private message MSN Messenger
cambodia
Halfop


Joined: 22 Aug 2004
Posts: 73
Location: cambodia

PostPosted: Fri Mar 18, 2005 3:28 pm    Post subject: Reply with quote

do this work with php 2.0.10 ?
Back to top
View user's profile Send private message
falcon69
Voice


Joined: 13 Aug 2005
Posts: 6

PostPosted: Sat Aug 13, 2005 3:37 am    Post subject: Reply with quote

the_crow wrote:
i found the error, but i don't know how to correct...
can you give me a light Smile


error: Tcl error [phpbb2eggincoming]: invalid idx


theres plenty of topics on this out there...but i cant seem to find a fix for it...any ideas?? anyone??? please???
Back to top
View user's profile Send private message
Garp
Voice


Joined: 15 Sep 2003
Posts: 29

PostPosted: Fri Apr 07, 2006 9:23 pm    Post subject: phpbb2egg package improved Reply with quote

I did some work on the phpbb2egg pack and would like to get some comments on it.

phpbb2egg.tcl:

Code:

listen 7777 script phpbb2eggaccept pub
set check(pass) "agoodpasshere"


proc phpbb2eggaccept {idx} {
control $idx phpbbincoming
}

proc phpbbincoming {idx args} {
global check

set args [join $args]
set inc(pass) [lindex [split $args] 0]
set inc(chan) [lindex [split $args] 1]
set inc(message) [join [lrange [split $args] 2 end]]

 if { $inc(message) != ""} {
  killdcc $idx
 }
 if {[string match [md5 $check(pass)] $inc(pass)]} {

  set line [split $inc(message) ";"]
   foreach line $line {
    putserv "PRIVMSG $inc(chan) :\00304$line"

   }
 } else { return 0 }

}
putlog "\00312phpbb2egg.tcl beta 0.0.2"


phpbb2egg.php:
Code:

<?php


$bb2egg['channel'] = "#your_channel";
$bb2egg['ids'] = "4 5 6 7 8"; // forums to display posts from
$bb2egg['botip'] = "255.255.255.255"; // your bot's ip
$bb2egg['botport'] = "7777"; // a nice port
$bb2egg['boardurl'] = "www.yourdomain.com";
$bb2egg['pass'] = "agoodpasshere";




function send2egg($mode, $forumid, $topic_id, $user_id, $subject, $message, $poll_title)
{

### echo "$mode, $forumid, $topic_id, $user_id, $subject, $message, $poll_title";
        global $userdata, $bb2egg;

        // something to do?

        if ( check_id($forumid) == 0 )
        {
           return;
        }


        $nick = $userdata[$user_id];

        if ( $nick == "" ) { $nick = "A Guest"; }

      //strip BBCode off
        $message = preg_replace("#\[(.*?)]#si", "", $message);

        // shorten longer postings to 300 signs
        $text = wordwrap($message, 300, "\0") . ' ...';


      //here we ask for several cases and do some formating stuff with tcl readable colors.
      if ( $poll_title != '' )
      {
         $text2  = "\00300,02 New poll! \00301,99 on our board:<br>";
      }
      else if ( $mode == 'newtopic' )
      {
         $text2  = "\00300,02 New topic! \00301,99 on our board:<br>";
      }
      else
      {
         $text2  = "\00300,02 Fresh! \00301,99 from our board:<br>";
       }

        if ( $poll_title != '' )
        {
           $text2  .= "\00300,04 $nick \00302,99 asks: $poll_title <br>";
        }

       else if ( $subject != '' )
       {
           $text2  .= "\00300,04 $nick \00302,99 about the subject $subject :<br>";
           $text2 .= "\00302,99$message <br>";
        }

        else
        {
           $text2  .= "\00300,04 $nick".":";
           $text2 .= "\00302,99$message <br>";
        }



           $text2 .= "Link: \037\00312,99" . $bb2egg['boardurl'] . "/viewtopic.php?t=$topic_id\003\037\ ";


        phpbb2egg($text2);

}



function phpbb2egg($text)
{
global $bb2egg;

        if ( $text == '') {
        return;
        }

        $text = ereg_replace(";", ":", $text);
        $text = ereg_replace("<br>", ";", $text);



            $fp = fsockopen($bb2egg['botip'], $bb2egg['botport'], $errno, $errstr, 30);

            if ($fp) {
                fputs($fp, md5($bb2egg['pass']) ." ". $bb2egg['channel'] ." $text\n");
                usleep(500);
                fclose($fp);
            }

}


function check_id($current)
{
global $bb2egg;

        $forumids=explode(" ", $bb2egg['ids']);

        while ( list($n, $id) = each($forumids))
        {

            if ($id == $current)
            {
            return 1;
            }

        }

        return 0;



}


?>


the zip file with a Readme ( adding stuff to posting.php in phpbb and some maybe useful remarks) are availible here : http://phpbb2egg.pixelsndots.com/phpbb2egg.zip
Back to top
View user's profile Send private message
dotslasher
Halfop


Joined: 10 Aug 2003
Posts: 62

PostPosted: Thu May 25, 2006 6:54 am    Post subject: Reply with quote

I keep getting the "Lost connection while identing"

I have changed usleep to all sorts of values, nothing work.

any suggestions?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber