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 | |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 36 | #endif //__DAEMON_CHANNEL_H__ |
| 37 | |
| 38 | // prototypes |
| 39 | #ifdef NEED_PROTOTYPES |
| 40 | |
| 41 | #ifndef __CHANNEL_H_PROTO__ |
| 42 | #define __CHANNEL_H_PROTO__ |
Arathorn | 78c0837 | 2019-12-11 20:14:23 +0100 | [diff] [blame] | 43 | public varargs int new(string ch_name, object owner, string|closure info); |
Zesstra | b7720dc | 2020-08-11 22:14:18 +0200 | [diff] [blame^] | 44 | public varargs int send(string chname, object pl, string msg, int type); |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 45 | |
| 46 | #endif //__CHANNEL_H_PROTO__ |
| 47 | |
| 48 | #endif //NEED_PROTOTYPES |