ping_a.c
来自「C实现的MUD,对大家基本入门网络游戏很有帮助!」· C语言 代码 · 共 46 行
C
46 行
/* File : ping_a.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 answer a ping request from another mud. */// Ported to ES2 mudlib by Annihilator@ES2 (06/15/95)#include <net/dns.h>#include <net/macros.h> inherit F_CLEAN_UP; // set our uidvoid create(){ seteuid(ROOT_UID);}// Someone has answered our ping of them.void incoming_request(mapping info){ if(!ACCESS_CHECK(previous_object())) return; // set the name in the network master if (info["NAME"] && info["NAME"] != Mud_name()) { DNS_MASTER->set_mud_info( htonn(info["NAME"]), info); // If there's mail to send out, do it now! MAIL_Q -> check_for_mail( info["NAME"], 3 ); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?