blob: 9b2efc5dda2cc0ad193e848985beee79dc3face0 [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"
MG Mud User88f12472016-06-24 23:31:02 +020010
Arathorn19459eb2019-11-30 00:45:51 +010011#define CHMASTER "/p/daemon/channeld"
MG Mud User88f12472016-06-24 23:31:02 +020012
13// Message types
Arathorn19459eb2019-11-30 00:45:51 +010014#define MSG_SAY 0
15#define MSG_EMOTE 1
16#define MSG_GEMOTE 2
17#define MSG_EMPTY 3
MG Mud User88f12472016-06-24 23:31:02 +020018
19// Errors
Arathorn19459eb2019-11-30 00:45:51 +010020#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
MG Mud User88f12472016-06-24 23:31:02 +020025
26// Commands
Arathorn19459eb2019-11-30 00:45:51 +010027#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"
MG Mud User88f12472016-06-24 23:31:02 +020033
Arathorn19459eb2019-11-30 00:45:51 +010034// definition of the channel list entry indices
35#define I_MEMBER 0
36#define I_ACCESS 1
37#define I_INFO 2
38#define I_MASTER 3
39#define I_NAME 4
MG Mud User88f12472016-06-24 23:31:02 +020040
41#endif //__DAEMON_CHANNEL_H__
42
43// prototypes
44#ifdef NEED_PROTOTYPES
45
46#ifndef __CHANNEL_H_PROTO__
47#define __CHANNEL_H_PROTO__
48varargs int new(string ch, object pl, mixed info);
49varargs int send(string ch, object pl, string msg, int type);
50
51// ok, keine Prototypen, aber trotzdem nur fuer channeld.c interessant.
52#define MAX_HIST_SIZE 200
53#define MAX_CHANNELS 90
54
55#endif //__CHANNEL_H_PROTO__
56
57#endif //NEED_PROTOTYPES