This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

stats.mod Livestats Eggdrop load failure

Discussion of Eggdrop's code and module programming in C.
Post Reply
User avatar
Cougar
Voice
Posts: 3
Joined: Mon Mar 07, 2005 5:31 am
Location: The Promised Land

stats.mod Livestats Eggdrop load failure

Post by Cougar »

stats.mod Livestats Eggdrop load failure

[07:13] Stats.mod v1.3.3 loaded.
[07:13] Module loaded: stats
[07:13] Loading default slangfile: language/stats.lang
[07:13] * Hostname self-lookup failed. Please set 'my-ip' in the config file.

I know what you are thinking.... set the 'my-ip'. Wrong. Its set. The loads fine with stats.mod commented out. Its the livestats that is causing the failure. in the stats.conf there is a set livestats-ip "x.x.x.x" setting... and I've set it too, and tried with it commented out. I also tried changing the livestats port to a dozen different ones in different parts of the spectrum, to no avail.

So basically the bot loads fine when I just comment out livestats in the stats.conf file called by eggdrop's conf file. However the only reason I put this bot together was to give a channel livestats.

Any ideas what could be causing this? Perhaps something with the apache that needs to be dealt with? Or maybe an issue with the binding of the ip/port for livestats that the server may be blocking? Its a virtual server that I have. Any suggestions are appreciated. Thanks.

- Cougar
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

live stats listen socket polling sucks, I once had problems while DNS was a bit [censored] up, too.
But I do not fear my so I just told him:
eggdrop can open a listen port, so I command you stats.mod to do just the same!
and as told, he did... of course after I changed the source code :D.

Code: Select all

# open livestats.c
# search (line 73)
static void start_listen_livestats(int port)
# comment out these lines in the function
//  char tmp[50];
...
//  sprintf(tmp, "set my-ip \"%s\";", livestats_ip);
//  do_tcl("livestats-hack-start",
//      "set my-ip-livestats-backup ${my-ip};"
//      "set my-hostname-livestats-backup ${my-hostname};"
//      "set my-hostname \"\"");
//  do_tcl("livestats-hack-setip", tmp);
...
//  do_tcl("livestats-hack-end",
//     "set my-ip ${my-ip-livestats-backup};"
//      "set my-hostname ${my-hostname-livestats-backup}");
this changes the stats.mod-special-stupid-listen to the eggdrop-default-listen. I successfully recompiled (no make clean needed) and started the bot again with this code change (or better strip), after this the listen of stats.mod didn't stop the bot from loading an more :).
Last edited by De Kus on Sat Apr 16, 2005 3:27 am, edited 1 time in total.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Cougar
Voice
Posts: 3
Joined: Mon Mar 07, 2005 5:31 am
Location: The Promised Land

Great

Post by Cougar »

That sounds great. I will note that for future use.

This time, I decided to start apache on the server. And as soon as the webserver was running, the port bind for livestats immediately worked as intended and the bot loaded. So now there are TWO ways to fix this known issue. :) Thanks again for your response! I like it.

- Cougar
L
LoveGirL
Voice
Posts: 2
Joined: Thu May 26, 2005 1:24 am
Location: lebanon

Post by LoveGirL »

De Kus wrote:live stats listen socket polling sucks, I once had problems while DNS was a bit [censored] up, too.
But I do not fear my so I just told him:
eggdrop can open a listen port, so I command you stats.mod to do just the same!
and as told, he did... of course after I changed the source code :D.

Code: Select all

# open livestats.c
# search (line 73)
static void start_listen_livestats(int port)
# comment out these lines in the function
//  char tmp[50];
...
//  sprintf(tmp, "set my-ip "%s";", livestats_ip);
//  do_tcl("livestats-hack-start",
//      "set my-ip-livestats-backup ${my-ip};"
//      "set my-hostname-livestats-backup ${my-hostname};"
//      "set my-hostname """);
//  do_tcl("livestats-hack-setip", tmp);
...
//  do_tcl("livestats-hack-end",
//     "set my-ip ${my-ip-livestats-backup};"
//      "set my-hostname ${my-hostname-livestats-backup}");
this changes the stats.mod-special-stupid-listen to the eggdrop-default-listen. I successfully recompiled (no make clean needed) and started the bot again with this code change (or better strip), after this the listen of stats.mod didn't stop the bot from loading an more :).
but i did not understand what shall i do cause im newbie so can you pls help me what shall i do :cry: im really desperate thanks
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

  1. Open livestats.c
  2. Goto line 73
  3. comment out, putting '//' in from of, these lines in the function static void start_listen_livestats(int port)

    Code: Select all

    //  char tmp[50]; 
    ... 
    //  sprintf(tmp, "set my-ip \"%s\";", livestats_ip); 
    //  do_tcl("livestats-hack-start", 
    //      "set my-ip-livestats-backup ${my-ip};" 
    //      "set my-hostname-livestats-backup ${my-hostname};" 
    //      "set my-hostname \"\""); 
    //  do_tcl("livestats-hack-setip", tmp); 
    ... 
    //  do_tcl("livestats-hack-end", 
    //     "set my-ip ${my-ip-livestats-backup};" 
    //      "set my-hostname ${my-hostname-livestats-backup}");
Note: only comment out the lines listed, the lines covered in the ... must be left alone
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

LoveGirL wrote:thx but i did not find livestats.c so pls if u can help me prv me i would appreciate it
That's a no...

Did you download the mod? you do have to download it and place it in src/mod/.. so that your eggdrop tree looks like this:

/.../eggdropfolder/src/mod/livestats.mod/

The files should be in there. Just follow the directions.

If you cant even open a file then maybe you should not do stuff like this.
Last edited by Galadhrim on Thu Jun 23, 2005 6:50 pm, edited 1 time in total.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

I guarantee you that she is using windrop and never ever downloaded the source code which she could change and recompile. Just by reading my post carefully, there should be these 2 notes which should tell someone we are not talking about executables or liberies like .exe or .dll.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
L
LoveGirL
Voice
Posts: 2
Joined: Thu May 26, 2005 1:24 am
Location: lebanon

hey

Post by LoveGirL »

well easy guys just cause im a girl not give u right to be rude and sorry for prv u guys may be i should not do that are u feeling offended ? may be this should not be called egghelp after all and if all been so smart since they born why do they need teachers :wink: anyway i did download the mod and i know to open the file i simply did not find what u were talking about .after all we all come to life because of a woman so take it easy chill
G
Galadhrim
Op
Posts: 123
Joined: Fri Apr 11, 2003 8:38 am
Location: Netherlands, Enschede

Post by Galadhrim »

if you followed the steps and the line 73 was different from the one we stated then you might have opened a different file or downloaded a wrong version. We do expect some explanation so we can help you. "help me i cant find the file" does not work.
Post Reply