[DEV] phpbb2eggdrop irc mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Garp
Registered User
Posts: 15
Joined: Tue Feb 24, 2004 8:27 pm
Location: Germany
Contact:

New Version availible

Post by Garp »

phpbb2egg reloaded

Activities on your phpBB are displayed asap in your irc channel

The mod provides the following features:

- posting new posts and polls in a irc channel network of your choice
- required: eggdrop

Improvements:
- password protection to control access to your bot
- new improved ways to avoid 'Lost connection while identing'

Here is the download : http://phpbb2egg.pixelsndots.com/phpbb2egg.zip



The zip contains:
- README
- phpbb2egg.tcl for eggdrop
- phpbb2egg.php into functions/


Troubleshoting:

Don't install the .tcl in a bot, that has other heavy duties. If the bot is - seen from the webserver - lagged, you don't get the posts into your channel.

If you see messages like 'Lost connection while identing' on the bots partyline:

- open phpbb2egg.php
- find:

Code: Select all

 usleep(500);
- increase the value. 2000 millisecounds works fine if a bot is lagged. WARNING! This will lead to a delay while posting! So keep it as small as you can.
- if you run your board on a windows server replace usleep() with sleep(<secounds>). 2 secounds should be enough.


You can edit the output of the bot in phpbb2egg.php.

- find: all lines starting with

Code: Select all

$text2  = .......
- For advices about text decoration in phpbb2egg.tcl read http://www.suninet.org/tclguide/index.php?chap=12&pg=5

Don't forget the trailing <br> on each line starting with "$text2 = .......". It's a delimiter.

2do:
- easier way to define the look in the channel
- variable for 'display only new threads' vs 'display all posts'
- maybe admin section?
- maybe tickbox on posting 'show my message in #channel'
- maybe enable/disable mod via acp?

Suggestions are very welcome!
ol_who
Registered User
Posts: 3
Joined: Sun Sep 07, 2003 10:34 pm

Humm Still dosent work

Post by ol_who »

Hello, I have installed the script on a board and setup an eggdrop bot

I have verified through Ethereal that the connection from site to bot happened and was Acklowlaged

Code: Select all

[16:33] Telnet connection: clust03-www05.powweb.com/1777
[16:33] Lost connection while identing [clust03-www05.powweb.com/1777]
Yes, I have tried verious settings of "usleep();" from 500-2000-10000

I am experianced at the web service level and php level, however I am new to the Eggdrop and TCL level

Any help is greatly appreciated! Thanks in advance!
User avatar
W|-|IPPY
Registered User
Posts: 67
Joined: Thu Apr 07, 2005 2:36 pm

Post by W|-|IPPY »

I can't even pull the download, any chance you could check the download is working Garp? Thanks.
Garp
Registered User
Posts: 15
Joined: Tue Feb 24, 2004 8:27 pm
Location: Germany
Contact:

Post by Garp »

TheOne1337
Registered User
Posts: 8
Joined: Sat May 06, 2006 8:27 am

Post by TheOne1337 »

I tried to use this mod with phpBB 2.0.20 + Eggdrop 1.6.17. It gives me this error. And i can't get it work? I tried different port too. My server provider has safemode on, does it effect to this?

Code: Select all

Warning: fsockopen(): unable to connect to 212.226.140.97:25273 in /home/users/blaaj/www/forum/includes/phpbb2egg.php on line 94

Warning: Cannot modify header information - headers already sent by (output started at /home/users/blaaj/www/forum/includes/phpbb2egg.php:94) in /home/users/blaaj/www/forum/posting.php on line 611

Warning: Cannot modify header information - headers already sent by (output started at /home/users/blaaj/www/forum/includes/phpbb2egg.php:94) in /home/users/blaaj/www/forum/includes/page_header.php on line 483

Warning: Cannot modify header information - headers already sent by (output started at /home/users/blaaj/www/forum/includes/phpbb2egg.php:94) in /home/users/blaaj/www/forum/includes/page_header.php on line 485

Warning: Cannot modify header information - headers already sent by (output started at /home/users/blaaj/www/forum/includes/phpbb2egg.php:94) in /home/users/blaaj/www/forum/includes/page_header.php on line 486
Garp
Registered User
Posts: 15
Joined: Tue Feb 24, 2004 8:27 pm
Location: Germany
Contact:

Post by Garp »

Safe_mod on shouldn't cause a error.

Have you rehashed your bot after installing? Can you please post the output of .dccstat on your partyline?
TheOne1337
Registered User
Posts: 8
Joined: Sat May 06, 2006 8:27 am

Post by TheOne1337 »

Yes. I rehashed

Code: Select all

(14:51:19) <Thebot> [14:50] #Theone# dccstat
(14:51:19) <Thebot> SOCK ADDR     PORT  NICK      HOST              TYPE
(14:51:19) <Thebot> ---- -------- ----- --------- ----------------- ----
(14:51:19) <Thebot> 3    D4E28C61 25273 (script)  phpbb2eggaccept   lstn  25273 pub
(14:51:19) <Thebot> 4    D4E28C61 25272 (telnet)  *                 lstn  25272
(14:51:19) <Thebot> 5    00000000     0 (dns)                       dns   (ready)
(14:51:19) <Thebot> 9    C3C5345A  6667 (server)  irc.ezava.fi serv  (lag: 0)
(14:51:19) <Thebot> 13   D4E28C61 26262 (script)  phpbb2eggaccept   lstn  26262 pub
(14:51:19) <Thebot> 11   50DFF6E0  1024 Theone   -223.aga.fav.com chat  flags: cPtEp/0
TheOne1337
Registered User
Posts: 8
Joined: Sat May 06, 2006 8:27 am

Post by TheOne1337 »

Is there any eggdrop settings that have to change before this mod? When this mod works as it should work, if im in dccchat with bot (partyline) should there be text or something that says when phpbb sends text to it?

I tested couple of things and figured out that problem is with tcl(?). I tried to connect to www site with wsockopen and it connected i think. Could anyone suggest some code what i could use to debug what is worng with this. I asked from my server provider and they said that there is no reason why it shouldn't be work.

Sorry my bad english but i hope that somebody understands.
dotslasher
Registered User
Posts: 17
Joined: Sat Mar 13, 2004 12:17 pm
Contact:

Post by dotslasher »

i also keep getting the "Lost connection while identing"

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

any suggestions?

*edit*

ohwell i dont care anymore, this script is crappy.
tekster
Registered User
Posts: 7
Joined: Tue May 30, 2006 3:13 pm

Post by tekster »

hey i got this working except for a few questions that i have, when it outputs to the channel all the text is red, but i have no declared any colors or anything so im confused on that, and also the $nick does not show, just displays a 0 instead of the actual username. thx

edit: also to add to a problem somewhat, when a post is deleted it still displays in the channel but with message being blank.


ps: dotslasher, have you tried just 'sleep(2)' and not usleep( )
Garp
Registered User
Posts: 15
Joined: Tue Feb 24, 2004 8:27 pm
Location: Germany
Contact:

Post by Garp »

tekster wrote: when it outputs to the channel all the text is red, but i have no declared any colors or anything so im confused on that


Yes. You can find the colors or the output design in phpbb2egg.php. Look after lines like

Code: Select all

$text2  = "\00300,02 New topic! \00301,99 on our board:<br>"
The colors are defined in tcl. \003XX,YY where XX is the font color and YY is the background color. The colors are defined like in mirc - 00 is white, 04 is red and 12 is blue - just as example. So \00300,02 creates white text on a dark blue background.

For more details on using colors in tcl scripts please read this post on forum.egghelp.org

But I will find a more comfortable way to control the design of the bot's output.
tekster wrote: also the $nick does not show, just displays a 0 instead of the actual username


Yes this is a bug, I will fix it.
tekster wrote: also to add to a problem somewhat, when a post is deleted it still displays in the channel but with message being blank.


Thank you, this is a bug too, I will fix it.
tekster
Registered User
Posts: 7
Joined: Tue May 30, 2006 3:13 pm

Post by tekster »

alright cool thx :)

is this a hard fix?

edit: i also have a question, is it possible to only show a clip of the message and not the whole message? so it doesnt spam the channel
Garp
Registered User
Posts: 15
Joined: Tue Feb 24, 2004 8:27 pm
Location: Germany
Contact:

Post by Garp »

That's already in. Find in phpbb2egg.php:

Code: Select all

        // shorten longer postings to 300 signs
        $text = wordwrap($message, 300, "\0") . ' ...';
tekster
Registered User
Posts: 7
Joined: Tue May 30, 2006 3:13 pm

Post by tekster »

oh didnt realize thats what that is, ty :)
Drud
Registered User
Posts: 1
Joined: Sun Jun 18, 2006 7:21 pm

Post by Drud »

Anyone having trouble when running the phpbb board on one webhost, and the eggdrop on another host?

I've tried running everything on localhost, and it worked like a charm - no problems at all.
The shell acount administrator have insured me that the port i'm using is open, and the webhost isn't blocked.

If anyone have tried, and found a solution i'm all ears.

Btw, when testing on localhost a found an malfunction when the topic included a space within the first 300 chars that are send to the eggdrop, it simply didn't get the rest of the script done (the link). This can be corrected in the php file by adding this line:
$message = str_replace("\n", "", $message);
Just before this line
$message = preg_replace("#\[(.*?)]#si", "", $message);

That solved this little problem for me :)
Post Reply

Return to “[2.0.x] MODs in Development”