blob: ad1f506bfac9a97697408b0e511db00d8b376bae [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// ch.h - channel daemon defines
2// --
3// $timestamp::$
4
5#ifndef __DAEMON_CHANNEL_H__
6#define __DAEMON_CHANNEL_H__
7
8#define P_CHANNELS "channels"
9#define P_STD_CHANNEL "std_channel"
10
11#define CHMASTER "/p/daemon/channeld"
12
13// Message types
14#define MSG_SAY 0
15#define MSG_EMOTE 1
16#define MSG_GEMOTE 2
17#define MSG_EMPTY 3
18
19// Errors
20#define E_ACCESS_DENIED -1
21#define E_ALREADY_JOINED -2
22#define E_NOT_MEMBER -3
23#define E_EMPTY_MESSAGE -4
24#define E_UNKNOWN_TYPE -5
25
26// Commands
27#define C_NEW "new"
28#define C_JOIN "join"
29#define C_LEAVE "leave"
30#define C_SEND "send"
31#define C_LIST "list"
32#define C_FIND "find"
33
34// definition of the list mapping entry
35// ([ channelname : ({ I_MEMBER, I_ACCESS, I_INFO, I_MASTER, I_NAME }) ])
36#define I_MEMBER 0
37#define I_ACCESS 1
38#define I_INFO 2
39#define I_MASTER 3
40#define I_NAME 4
41
42#endif //__DAEMON_CHANNEL_H__
43
44// prototypes
45#ifdef NEED_PROTOTYPES
46
47#ifndef __CHANNEL_H_PROTO__
48#define __CHANNEL_H_PROTO__
49varargs int new(string ch, object pl, mixed info);
50varargs int send(string ch, object pl, string msg, int type);
51
52// ok, keine Prototypen, aber trotzdem nur fuer channeld.c interessant.
53#define MAX_HIST_SIZE 200
54#define MAX_CHANNELS 90
55
56#endif //__CHANNEL_H_PROTO__
57
58#endif //NEED_PROTOTYPES
59