services.c

final_realms_fluffos_v1/lib/net/old/intermud/services.c · 1.8 KB

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

/*    /daemon/services.c
 *    from the Nightmare IV LPC Library
 *    handles intermud services
 *    created by Descartes of Borg 950523
 *    modified for the Discworld mudlib by Turrican 25-10-95
 */

#ifndef __PACKAGE_SOCKETS__
#error You should not try to load /daemon/services.c without the sockets package
#else

#include <network.h>

mapping GetServices();

static void create() {
  seteuid(getuid());
}

#include "/net/intermud3/services/channel.c"
#include "/net/intermud3/services/emoteto.c"
#include "/net/intermud3/services/error.c"
#include "/net/intermud3/services/finger.c"
#include "/net/intermud3/services/locate.c"
#include "/net/intermud3/services/tell.c"
#include "/net/intermud3/services/who.c"

mapping GetServices() {
    return ([
#ifdef whatsthis
         "amcp" : "1.1",
#endif
#ifdef SERVICE_AUTH
         "auth" : 1,
#endif
#ifdef SERVICE_CHANNEL
         "channel" : 1,
#endif
#ifdef SERVICE_EMOTETO
         "emoteto" : 1,
#endif
#ifdef SERVICE_FILE
         "file" : 1,
#endif
#ifdef SERVICE_FINGER
         "finger" : 1,
#endif
#ifdef SERVICE_LOCATE
         "locate" : 1,
#endif
#ifdef SERVICE_MAIL
         "mail" : 1,
#endif
#ifdef SERVICE_NEWS
         "news" : 1,
#endif
#ifdef SERVICE_TELL
         "tell" : 1,
#endif
#ifdef SERVICE_UCACHE
         "ucache" : 1,
#endif
#ifdef SERVICE_WHO
         "who" : 1,
#endif
#ifdef PORT_FTP
         "ftp" : PORT_FTP,
#endif
#ifdef PORT_HTTP
         "http" : PORT_HTTP,
#endif
#ifdef PORT_NNTP
         "nntp" : PORT_NNTP,
#endif
#ifdef PORT_RCP
         "rcp" : PORT_RCP,
#endif
#ifdef PORT_SMTP
         "smtp" : PORT_SMTP,
#endif
         ]);
}

void eventShutdown(int secs) {
  if (file_name(previous_object()) != "/obj/shut")
    return;
  INTERMUD_D->eventWrite( ({ "shutdown", 5, mud_name(), 0, 
      INTERMUD_D->GetNameserver(), 0, secs }) );
}

#endif /* __PACKAGE_SOCKETS__ */

Site Stats

Snippets: 1791
Codebases: 571