MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | // ch.h - channel daemon defines |
| 2 | // -- |
| 3 | // $timestamp::$ |
| 4 | |
| 5 | #ifndef __DAEMON_CHANNEL_H__ |
| 6 | #define __DAEMON_CHANNEL_H__ |
| 7 | |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 8 | #define P_CHANNELS "channels" |
| 9 | #define P_STD_CHANNEL "std_channel" |
Arathorn | 78c0837 | 2019-12-11 20:14:23 +0100 | [diff] [blame] | 10 | #define P_SWAP_CHANNELS "swap_channels" |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 11 | |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 12 | #define CHMASTER "/p/daemon/channeld" |
Arathorn | 78c0837 | 2019-12-11 20:14:23 +0100 | [diff] [blame] | 13 | #define CMNAME "<MasteR>" |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 14 | |
| 15 | // Message types |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 16 | #define MSG_SAY 0 |
| 17 | #define MSG_EMOTE 1 |
| 18 | #define MSG_GEMOTE 2 |
| 19 | #define MSG_EMPTY 3 |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 20 | |
| 21 | // Errors |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 22 | #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 User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 27 | |
| 28 | // Commands |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 29 | #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 User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 35 | |
Arathorn | 78c0837 | 2019-12-11 20:14:23 +0100 | [diff] [blame] | 36 | // Defines fuer den Zugriff auf die Channeldaten in <channels>. |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 37 | #define I_MEMBER 0 |
| 38 | #define I_ACCESS 1 |
| 39 | #define I_INFO 2 |
Zesstra | e19391f | 2020-08-09 13:40:12 +0200 | [diff] [blame] | 40 | #define I_SUPERVISOR 3 |
Arathorn | 19459eb | 2019-11-30 00:45:51 +0100 | [diff] [blame] | 41 | #define I_NAME 4 |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 42 | |
| 43 | #endif //__DAEMON_CHANNEL_H__ |
| 44 | |
| 45 | // prototypes |
| 46 | #ifdef NEED_PROTOTYPES |
| 47 | |
| 48 | #ifndef __CHANNEL_H_PROTO__ |
| 49 | #define __CHANNEL_H_PROTO__ |
Arathorn | 78c0837 | 2019-12-11 20:14:23 +0100 | [diff] [blame] | 50 | public varargs int new(string ch_name, object owner, string|closure info); |
| 51 | public varargs int send(string ch, object pl, string msg, int type); |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 52 | |
| 53 | #endif //__CHANNEL_H_PROTO__ |
| 54 | |
| 55 | #endif //NEED_PROTOTYPES |