Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Compiling the server ➜ SWR Fuss Hotboot compile

SWR Fuss Hotboot compile

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


Posted by Asean Novari   USA  (82 posts)  Bio
Date Sun 17 Oct 2004 10:01 PM (UTC)

Amended on Wed 20 Oct 2004 07:30 AM (UTC) by Asean Novari

Message
I apologize for overlooking the right to share part. It was a
mistake that will not happen again. I do however appreciate
you taking the time to fix the code so it works. I have
gotten it running and it works perfectly.



Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #1 on Mon 18 Oct 2004 12:04 AM (UTC)

Amended on Mon 18 Oct 2004 12:12 AM (UTC) by Greven

Message
If your using fuss, then you would want to make it look like
    if (!fCopyOver) /* We have already the port if copyover'ed */
	control  = init_socket( port   );


That should be what you need.

2 points, though. The reason that you can't find it is that SWRFUSS, while superior to stock 1.0, isn't 1.0, so there will be minor differences. Secondly, I would like to quote the .txt file
Quote:
This snippet may not be posted for redistribution on any site
without obtaining prior written consent from the Alsherok team and
the Dark Warriors team.

3. For support of this snippet, come to Greven first, at either
http://darkwars.wolfpaw.net/cgi-bin/ikonboard.cgi or darkwarsmud@hotmail.com. I will do
what I can for email support, but the forum is generally a better way to
go.
Now I realize that your not trying to distribute it, and its seems that you may be inexperienced in such matters, but if you do not follow terms of agreement in snippets, people generally get angry and stop releasing them, as has happened so many times before to various people. In this circumstance I don't mind, its was an honest mistake, though since this work is based on Samson's original, he might, I don't know.

The 3rd term there isn't quite as strict, though if someone has support available for code they write directly, its usually a good idea to talk to them first, as they will know the code better.


Also as a side note, I will be working on a new version of it that should have FUSS supported and clean up some of the problem that have cropped up from time to time. I will post here when its available.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #2 on Mon 18 Oct 2004 02:28 AM (UTC)
Message
I have update the snippet for be a little cleaner, ran it through indent and put in some instructions on what needs to be changed for FUSS. Its available where it always is, I don't want to advertise, but since someone got it already, they must know where again :)

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #3 on Wed 20 Oct 2004 11:34 AM (UTC)
Message
A correction I think needs to be made here:


/*
 * Connected state for a channel.
 */
typedef enum
{
  CON_PLAYING,		CON_GET_NAME,		CON_GET_OLD_PASSWORD,
  CON_CONFIRM_NEW_NAME,	CON_GET_NEW_PASSWORD,	CON_CONFIRM_NEW_PASSWORD,
  CON_GET_NEW_SEX,	CON_READ_MOTD,
  CON_GET_NEW_RACE,	CON_GET_EMULATION,	CON_EDITING,
  CON_GET_WANT_RIPANSI,	CON_TITLE,		CON_PRESS_ENTER,
  CON_WAIT_1,		CON_WAIT_2,		CON_WAIT_3,
  CON_ACCEPTED,         CON_GET_PKILL,		CON_READ_IMOTD,
  CON_GET_NEW_EMAIL,    CON_GET_MSP,            CON_GET_NEW_CLASS,
  CON_ROLL_STATS,	CON_STATS_OK
} connection_types;

  Add the con stats and the = to make it look like this:

/*
 * Connected state for a channel.
 */
typedef enum
{
  CON_GET_NAME = -99,	CON_GET_OLD_PASSWORD,
  CON_CONFIRM_NEW_NAME,	CON_GET_NEW_PASSWORD,	CON_CONFIRM_NEW_PASSWORD,
  CON_GET_NEW_SEX,	CON_READ_MOTD,
  CON_GET_NEW_RACE,	CON_GET_EMULATION,	
  CON_GET_WANT_RIPANSI,	CON_TITLE,		CON_PRESS_ENTER,
  CON_WAIT_1,		CON_WAIT_2,		CON_WAIT_3,
  CON_ACCEPTED,         CON_GET_PKILL,		CON_READ_IMOTD,
  CON_GET_NEW_EMAIL,    CON_GET_MSP,            CON_GET_NEW_CLASS,
  CON_ROLL_STATS,	CON_STATS_OK, 		CON_COPYOVER_RECOVER,
  CON_PLAYING = 0,      CON_EDITING
} connection_types;


In your instructions you have CON_EDITING unspecified after CON_GET_NAME is set to -99. Due to how enumerations work, it won't be > 0 as you were probably hoping it would.

When you set a value in an enum, every value which follows it will be +1 more than the one before it. Where you have it now it would come out as -90 and not +1 like it should be. CON_EDITING isn't likely to be true for anyone in the chargen sequence of a stock SWR or Smaug. Also not sure where your CON_ROLL_STATS and CON_STATS_OK fit in, but if those should be > 0 they need to be moved as well.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #4 on Wed 20 Oct 2004 07:05 PM (UTC)
Message
I'm at work so I can't pull up specific references, but I think that the example I included may be old. The = 0 looks like its in the wrong place to me, thoug I am going totally off of memory. I know that I haven't encountered any problems at all with it. The CON_PLAYING looks very strange. I'll check when I get home.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #5 on Thu 21 Oct 2004 02:46 AM (UTC)
Message
Thanks for info, I was using in my test SWRFUSS
/*
 * Connected state for a channel.
 */
typedef enum
{
  CON_PLAYING = 0,	CON_GET_NAME,	CON_GET_OLD_PASSWORD,
  CON_CONFIRM_NEW_NAME,	CON_GET_NEW_PASSWORD,	CON_CONFIRM_NEW_PASSWORD,
  CON_GET_NEW_SEX,	CON_READ_MOTD,
  CON_GET_NEW_RACE,	CON_GET_EMULATION,	CON_EDITING,
  CON_GET_WANT_RIPANSI,	CON_TITLE,		CON_PRESS_ENTER,
  CON_WAIT_1,		CON_WAIT_2,		CON_WAIT_3,
  CON_ACCEPTED,         CON_GET_PKILL,		CON_READ_IMOTD,
  CON_GET_NEW_EMAIL,    CON_GET_MSP,            CON_GET_NEW_CLASS,
  CON_ROLL_STATS,	CON_STATS_OK, 		CON_COPYOVER_RECOVER
} connection_types;
The 0 is useless I realize, so I'm going with out it and have updated the snippet as such, thanks for the catch.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #6 on Sun 24 Oct 2004 12:13 AM (UTC)
Message
According to all of the hotboot/copyover snips I've ever seen, CON_PLAYING = 0 is in the right spot where I put it. All of the constates that preceed that are usually set aside for those who have not fully connected to the game. Usually because they're still suck in chargen. So any constate before then would be between -99 and -1 and cause them to get dropped. CON_PLAYING being 0, they get kept and any constate above that would as well.

Now, I haven't examined how your code works, but unless you've reconfigured how the code treats the constates, none of these partially completed people will be dropped. The largest reason for wanting to drop them would be to prevent problems saving data in structs that have not yet been defined.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #7 on Sun 24 Oct 2004 02:58 AM (UTC)
Message
K, now I'm a little confused. I assume your talking about when someone drops a connection during creation, before being put into game. Now, in my hotboot it will attempt to save all of the descriptors characters, so a person connecting would get caught at this point with an incomplete player file for writing. This is what I assume your talking about, its been a long day so I may be wrong. While looking in both my own and SWRFUSS save_char_obj, if the player is not authed, which they wouldn't be during creation, they do not save, so I don't see how you would get a problem saving them.

Also, I can't seem to find a reference to dropping or not dropping people in regards to their constate being higher or lower, all I can find is checking playing or editing. If there is a problem, I would be very appreciative in some direction, as I don't seem to understand the problem.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #8 on Sun 24 Oct 2004 04:23 PM (UTC)
Message
The problem lies in the fact that you check in do_hotboot for CON_PLAYING < 0, and have specified CON_PLAYING = 0 as your first entry in the enum table. This makes all of the other constates after it positive numbers, so they can not be less than CON_PLAYING. While it's true that save_char_obj won't save their pfiles, your hotboot code *DOES* save their descriptor information to the hotboot file.

When the hotboot_recover code is called, and they don't have a pfile, they will be cut off from the game and told there was an error and that their pfile has been lost. We both know they never had one, but the player won't and would assume based on that message that they've lost something. They would then of course have to start over again.
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #9 on Mon 25 Oct 2004 03:14 AM (UTC)

Amended on Mon 25 Oct 2004 03:22 AM (UTC) by Greven

Message
AH, I gotcha, makes sense. Theres not much of of a difference in just disconnecting them before or after the hotboot to the player, but its still less memory/processor. Been updated, thanks.

Actually, for my own mud, in do_users I use an array of names for the connection state, so in my own it won't work, I just changed it to check playing, but for normal SWR it will still work.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
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,958 views.

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

Go to topic:           Search the forum


[Go to top] top

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