blob: c86d6c6abbc44a9a99c8a19891271ea39f325ded [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
Zesstrad9ec04b2020-08-11 23:47:03 +020036// Flags
37#define CHF_FIXED_SUPERVISOR 1 // Kein Wechsel des SV erlaubt
38
MG Mud User88f12472016-06-24 23:31:02 +020039#endif //__DAEMON_CHANNEL_H__
40
41// prototypes
42#ifdef NEED_PROTOTYPES
43
44#ifndef __CHANNEL_H_PROTO__
45#define __CHANNEL_H_PROTO__
Zesstrad9ec04b2020-08-11 23:47:03 +020046public varargs int new(string ch_name, object owner, string|closure desc,
47 int channel_flags);
Zesstrab7720dc2020-08-11 22:14:18 +020048public varargs int send(string chname, object pl, string msg, int type);
MG Mud User88f12472016-06-24 23:31:02 +020049
50#endif //__CHANNEL_H_PROTO__
51
52#endif //NEED_PROTOTYPES