[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Running the server
. . -> [Subject]  Smaug(FUSS) website WHO

Smaug(FUSS) website WHO

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Wed 20 Oct 2004 07:33 PM (UTC)
Message
I know Smaug could "synchronize" with the server website it is on, to generate a WHO list on a webpage. I'm using SmaugFUSS, and am wondering how this is done. I didn't see much in any of the documents.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Wed 20 Oct 2004 08:10 PM (UTC)
Message
If your talking about the request pipe, its basically worthless. I would look into the wolfpaw webserver, or look at afkmud, they have on demand who list creation.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #2 on Wed 20 Oct 2004 08:11 PM (UTC)
Message
Wolfpaw, ugh. They don't even have a bash_profile, no thanks. Not gonna switch codebases either. What's wrong with the WHO list generation?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #3 on Wed 20 Oct 2004 08:24 PM (UTC)

Amended on Wed 20 Oct 2004 08:29 PM (UTC) by Greven

Message
By wolfpaw, I meant the one created by Lrd_Elder, thats the name, I'm not refering to the service provider. This is the link http://www.geocities.com/SiliconValley/Mouse/6754/smaug.htm. And by looking at afkmud, I meant look at their web code and porting it to your code, not switching over.

If you have access to a wolfpaw account, to see the .bash_profile listed, you need to use ls -a from your root dir. I've made mods to mine, thats how I got to it.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #4 on Wed 20 Oct 2004 09:07 PM (UTC)
Message
Ah, okay. I'll check those over.

As for Wolfpaw, it had no bash_profile at all. Our team even emailed the server, they said we can't have it. Yeah...

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #5 on Wed 20 Oct 2004 09:17 PM (UTC)
Message
I think its a difference betweent the servers that they have, the one that I am on has one, but I know from helping other wolfpaw users that they do not in their account, so I think it might be box dependant.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #6 on Wed 20 Oct 2004 09:29 PM (UTC)

Amended on Wed 20 Oct 2004 10:24 PM (UTC) by Zeno

Message
The Wolfpaw snippet worked, except it points to my host dir, instead of my "host/username". Example:

Current who list:
fredrik.homelinux.org:1803/who

I need it to be:
fredrik.homelinux.org:1803/Zeno/who

Or will the port variation not change anything on the host dir?

Also I can't seem to have it persist over hotboots.

After a hotboot:
Comm: Loading player data for: Ayeraan (4K)
Comm: Loading player data for: Torath (10K)
Log: Shutting down Wolfpaw webserver on port 1803.
Log: Hotboot recovery complete.
Log: Booting Wolfpaw webserver on port 1803.
Log: Web features starting on port: 1803
Log: WebServer Disabled.


    my_addr.sin_family = AF_INET;
    my_addr.sin_port = htons(port);
    my_addr.sin_addr.s_addr = htons(INADDR_ANY);
    bzero(&(my_addr.sin_zero),8);

    if((bind(sockfd, (struct sockaddr*)&my_addr, sizeof(struct sockaddr))) == -1)
    {
        perror("web-bind");
        log_string("WebServer Disabled.");
        WEBSERVER_STATUS = FALSE;
        return;
    }


No idea what's wrong.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #7 on Wed 20 Oct 2004 11:28 PM (UTC)
Message
Yeah, I already got the dir problem fixed. Still can't fix the hotboot issue though. Not sure if I have to modify web-server functions, or part of comm.c, or even hotboot.

[EDIT] Where did your post go? >.>

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #8 on Wed 20 Oct 2004 11:31 PM (UTC)

Amended on Wed 20 Oct 2004 11:47 PM (UTC) by Greven

Message
As for the port, you shouldn't need to open the port again since we already have it, what I would do is where it starts the server( I assume its game_loop, can't look at work) if to put the same copyover check that your using for opening the other ports.

The other option is to close everything during hotboot, and jsut start a new one.

[EDIT] Sorry, had deleted it as it was simply saying to check where yuo opened the file descriptor for the file path.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #9 on Thu 21 Oct 2004 03:08 AM (UTC)
Message
K, home now, threw the web-server into my test of SWRFUSS, and I got it to work with hotboot, you just need to add the close code in like this

#ifdef I3
        if (I3_is_connected())
        {
                I3_savechanlist();
                I3_savemudlist();
                I3_savehistory();
        }
#endif

		sprintf(buf, "Shutting down webserver on port %d.", port+2);
		log_string(buf);
		shutdown_web();
This works good for me. More processor, but safest method.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #10 on Thu 21 Oct 2004 05:03 AM (UTC)
Message
After looking through it and adding it to my own codebase, as well as SWRFUSS, I notice that it uses STRALLOC for some unknown reason, but never frees them. Make sure that you modify it to free the strings up.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #11 on Sat 06 Nov 2004 06:01 PM (UTC)
Message
I can't seem to get it to work after hotboot still. It doesn't say the wolfpaw server starts after a hotboot.

In comm.c

    log_string("Booting Database");
    boot_db( fCopyOver );
    log_string("Initializing socket");
    if (!fCopyOver) /* We have already the port if copyover'ed */
    {
        control  = init_socket( port   );
    }
        sprintf(buf, "Booting Wolfpaw webserver on port %d.", port+2);
        log_string(buf);
        init_web(port+2);
    /* I don't know how well this will work on an unnamed machine as I don't
       have one handy, and the man pages are ever-so-helpful.. -- Alty */
    if (gethostname(hostn, sizeof(hostn)) < 0)
    {
      perror("main: gethostname");
      strcpy(hostn, "unresolved");
    }
    sprintf( log_buf, "%s ready at address %s on port %d.",     sysdata.mud_name, hostn, port );


More...
      if( fCopyOver )
      {
         log_string( "Initiating hotboot recovery." );
         hotboot_recover();
      }
    game_loop( );
    sprintf(buf, "Shutting down Wolfpaw webserver on port %d.", port+2);
    log_string(buf);
    shutdown_web();


And I added those lines you said to add.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #12 on Sun 07 Nov 2004 05:13 PM (UTC)

Amended on Sun 07 Nov 2004 05:15 PM (UTC) by Greven

Message
As the snippet suggested, I added the ability to turn it on/off with cset, and these are the sections of code that I am using, and it works 95% of the time. I have noticed that very occasionally it won't boot during a copyover, but I seem to have worked it out.
        log_string("Booting Database");
        boot_db(fCopyOver);
        log_string("Initializing socket");
        if (!fCopyOver) /* We have already the port if copyover'ed */
                control = init_socket(port);
        if (sysdata.web)
        {
                sprintf(log_buf, "Booting webserver on port %d.", port + 2);
                log_string(log_buf);
                init_web(port + 2);
        }
        snprintf(log_buf, MSL, "Star Wars Reality ready on port %d.", port);
        log_string(log_buf);
        if (fCopyOver)
        {
                log_string("Initiating hotboot recovery.");
                hotboot_recover();
        }

        game_loop();
        /*
         * That's all, folks.
         */

        if (sysdata.web)
        {
                sprintf(log_buf, "Shutting down webserver on port %d.",
                        port + 2);
                log_string(log_buf);
                shutdown_web();
        }
        log_string("Normal termination of game.");

And:
        fprintf(fp, "%s", "-1\n");
        FCLOSE(fp);
        log_string("Executing hotboot....");

        /*
         * added this in case there's a need to debug the contents of the various files 
         */
        if (debug)
        {
                log_string("Hotboot debug - Aborting before execl");
                return;
        }

        if (sysdata.web)
        {
	
            printf(log_buf, "Shutting down webserver on port %d.", port + 2);
            log_string(log_buf);
            shutdown_web();
        }

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Samson   USA  (683 posts)  [Biography] bio
Date Reply #13 on Sun 07 Nov 2004 06:08 PM (UTC)
Message
Or you could just pass the web descriptor as another port argument to the copyover. Much like is done with IMC2 or I3. I've done this already with the AFKMud codebase. It's not exactly a pretty looking solution, but it does seem to work, and there's no need to shut anything down.
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #14 on Mon 08 Nov 2004 04:00 PM (UTC)
Message
Actually it turns out I'm having the same problem as you Greven. The server will only work about 95% of the time after a hotboot. Although it does seem to not work that much, perhaps 60%. Do you know why it does this, or how to check if it is running, and if it isn't, then run it? (After a hotboot)

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,261 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]