login.c

ds2.10/fluffos-2.16-ds05/testsuite/clone/login.c · 610 B

From the archive ds2.10.zip

Download the archive   « Back to the archive contents

#include <globals.h>

// needs fixed to handle passwords

#ifdef __INTERACTIVE_CATCH_TELL__
void catch_tell(string str) {
    receive(str);
}
#endif

    void
logon()
{
    object user;

#ifdef __NO_ADD_ACTION__
    set_this_player(this_object());
#endif
    write("Welcome to Lil!\n\n");
    cat("/etc/motd");
    write("\n> ");
#ifdef __PACKAGE_UIDS__
    seteuid(getuid(this_object()));
#endif
    user= new("/clone/user");
    user->set_name("stuf" + getoid(user));
    exec(user, this_object());
    user->setup();
#ifndef __NO_ENVIRONMENT__
    user->move(VOID_OB);
#endif
    destruct(this_object());
}

Site Stats

Snippets: 1791
Codebases: 571