blob: 26e4d0e22bce24b039fcdac3210b72d7e251cfee [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
Arathorn19459eb2019-11-30 00:45:51 +01008#define P_CHANNELS "channels"
9#define P_STD_CHANNEL "std_channel"
Arathorn78c08372019-12-11 20:14:23 +010010#define P_SWAP_CHANNELS "swap_channels"
MG Mud User88f12472016-06-24 23:31:02 +020011
Arathorn19459eb2019-11-30 00:45:51 +010012#define CHMASTER "/p/daemon/channeld"
Arathorn78c08372019-12-11 20:14:23 +010013#define CMNAME "<MasteR>"
MG Mud User88f12472016-06-24 23:31:02 +020014
15// Message types
Arathorn19459eb2019-11-30 00:45:51 +010016#define MSG_SAY 0
17#define MSG_EMOTE 1
18#define MSG_GEMOTE 2
19#define MSG_EMPTY 3
MG Mud User88f12472016-06-24 23:31:02 +020020
21// Errors
Arathorn19459eb2019-11-30 00:45:51 +010022#define E_ACCESS_DENIED -1
23#define E_ALREADY_JOINED -2
24#define E_NOT_MEMBER -3
25#define E_EMPTY_MESSAGE -4
26#define E_UNKNOWN_TYPE -5
MG Mud User88f12472016-06-24 23:31:02 +020027
28// Commands
Arathorn19459eb2019-11-30 00:45:51 +010029#define C_NEW "new"
30#define C_JOIN "join"
31#define C_LEAVE "leave"
32#define C_SEND "send"
33#define C_LIST "list"
34#define C_FIND "find"
MG Mud User88f12472016-06-24 23:31:02 +020035
Arathorn78c08372019-12-11 20:14:23 +010036// Defines fuer den Zugriff auf die Channeldaten in <channels>.
Arathorn19459eb2019-11-30 00:45:51 +010037#define I_MEMBER 0
38#define I_ACCESS 1
39#define I_INFO 2
40#define I_MASTER 3
41#define I_NAME 4
MG Mud User88f12472016-06-24 23:31:02 +020042
43#endif //__DAEMON_CHANNEL_H__
44
45// prototypes
46#ifdef NEED_PROTOTYPES
47
48#ifndef __CHANNEL_H_PROTO__
49#define __CHANNEL_H_PROTO__
Arathorn78c08372019-12-11 20:14:23 +010050public varargs int new(string ch_name, object owner, string|closure info);
51public varargs int send(string ch, object pl, string msg, int type);
MG Mud User88f12472016-06-24 23:31:02 +020052
53#endif //__CHANNEL_H_PROTO__
54
55#endif //NEED_PROTOTYPES