Author Topic: Lima login flowpath  (Read 4233 times)

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Lima login flowpath
« on: February 18, 2008, 01:31:39 pm »
Lima Login Flowpath

On player connection to mud, driver calls
object connect()
in /secure/master.c
->    attempts to return the USER_OB as defined by get_player_fname() in master.c
currently this is /secure/user.c as defined in /include/mudlib.h

Driver then calls
private nomask void logon()
in /secure/user.c from its inherited file /secure/user/login.c
->    this calls login_handle_logon(INITIAL_PROMPT, 0); in login.c which handles login using a switch command

NEW PLAYER
private nomask varargs
void login_handle_logon(int state, mixed extra, string arg)
->    This handles displaying the welcome info, getting name and passwords.
Control is passed to userinfo_handle_logon() in /secure/user/userinfo.c after confirming password.

protected nomask varargs
void userinfo_handle_logon(int state, mixed extra, string arg)
->   This gathers gender, email, real name, and webpage then control is passed to sw_body_handle_new_logon() in /secure/user/sw_body.c

protected nomask void sw_body_handle_new_logon()
->   This autowiz's if that flag is set, set the players priv's, and then calls create_body() in sw_body

void create_body()
->    If races are used, this gets the list and passes control to got_entry() in sw_body to let player choose their race.

void got_entry(function when_done, string line)
->   This handles the racial select, or relists them, or provides help information on a race. control is then passed to incarnate() in sw_body.c

private nomask void incarnate(int is_new, string bfn)
->   This function does several things. First it creates a body for them based on their racial pick.
Then it calls reset_parse_info in master.c which calls parse_refresh() (Not sure what this does)
Then it has the LAST_LOGIN_D log my name and ip
Then it sets my gender in the body
Then it saves me
Then it starts my shell
Then it calls enter_game in /std/body.c
->    This sets up cmd hooks, moves me to start room (defined in /std/body/start.c), announces entrance, makes me do a look and updates my health
    Then it runs a .login script for my shell, if I am a wizard
Then it calls init_stats in the /std/m_bodystats.c
Then it saves me again
Then it calls initialize_user which is back in /secure/user/login.c which initializes channels and shows the didlog

Now I am in game in the startroom playing.

Offline Am0k

  • Acquaintance
  • *
  • Posts: 9
    • View Profile
Re: Lima login flowpath
« Reply #1 on: February 18, 2008, 04:37:34 pm »
Very nice guide, it will certainly be of help to people that start out with Lima and want to change something in the login flow.

As to parse_refresh()

Quote
  Efun: void parse_refresh()
 
   The parsing package caches information about objects in order to
   improve performance. This means that if any information that gets
   cached is changed, you need to tell MudOS to clear the cache. That's
   what this efun does. If the information returned by any of the applies
   below changes, you need to call parse_refresh() so that the parser
   knows it has changed. For example if the name of an object changes, or
   perhaps an adjective changes as a spell is cast to change it from blue
   to red - call parse_refresh() afterwards. The efun clears the cache
   for the object that called it.

Quoted from Scatter's guide to the MudOS parser.

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: Lima login flowpath
« Reply #2 on: February 19, 2008, 06:24:43 am »
Thanks for that. Ill update this shortly too with the existing player flowpath