blob: 7973d4f0201cb164874103da8cd9c024fba17e01 [file] [log] [blame]
Zesstra83f011d2016-04-24 20:09:05 +02001#pragma strict_types, save_types, rtt_checks, pedantic
2#pragma no_clone, no_shadow, no_inherit
3
4// inherit the basic inetd
5inherit __DIR__"inetd_base.c";
6
7#include <living/comm.h>
8#include <driver_info.h>
9
10// and implement mud-individual stuff that should be implemented as needed. If
11// the default is fine for your mud, keep it.
12protected void set_user()
13{
14 seteuid(getuid());
15}
16
17protected void save_me()
18{
19// save_object(__DIR__"ARCH/inetd");
20}
21
22protected int restore_me()
23{
24// return restore_object(__DIR__"ARCH/inetd");
25}
26
27protected void export_peer_list(mapping list)
28{
29}
30
31protected void debug_msg(string msg, int severity)
32{
33 object z=find_player("zesstra");
34 if (z)
35 z->ReceiveMsg(msg, MT_DEBUG, 0, "IM: ", this_object());
36}
37
38public void receive(string host, string msg, int hostport)
39{
40 if (previous_object() == master())
41 process_fragment(host, msg, hostport);
42}
43
44protected void create()
45{
46 configure_host((<host_s> name: "MG-Test-"+__HOST_NAME__,
47 ip: __HOST_IP_NUMBER__,
48 port: driver_info(DI_UDP_PORT),
49 mtu: 1024,
50 ));
51 ::create();
52}
53