startup.c

来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 48 行

C
48
字号
/* File    : startup.c * Creator : Pinkfish@Discworld *         : Grendel@Tmi-2 * When    : 93-08-15 * * This file is part of the tmi mudlib.  Please keep this header intact. * * This protocol is used to inform a mud we are starting up, and to send * information about ourselves. */#include <net/dns.h>#include <net/macros.h>inherit F_CLEAN_UP;// We got a startup message.voidincoming_request(mapping info){  if(!ACCESS_CHECK(previous_object())) return;  if (stringp(info["NAME"]))    {      // send info PING_A so it will be added to the mud address mapping      PING_A->incoming_request(info);      // send them a ping answer so they get our mud info      PING_Q->incoming_request(info);    }}voidcreate(){  seteuid(ROOT_UID);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?