blob: 82d7f15986d10a972507268087ec5add8fd63481 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001// MorgenGrauen MUDlib
2//
3// player/comm.h -- communication module properties
4//
5// $Id: comm.h,v 3.3 2000/02/09 15:56:25 Padreic Exp $
6
7#ifndef __PLAYER_COMM_H__
8#define __PLAYER_COMM_H__
9
10// living/comm.h brauchen wir auch.
11#include <living/comm.h>
12
13// properties
14
15#define P_INTERMUD "intermud" // Does she listen to it ?
Zesstra7459f252022-02-23 22:47:26 +010016#define P_BUFFER "buffer" // Kobold konfigurieren
MG Mud User88f12472016-06-24 23:31:02 +020017#define P_DEAF "deaf" // Taubheit
18#define P_PERM_STRING "perm_string" // Fuer Sprachflueche
19#define P_MESSAGE_BEEP "message_beep" // wenn gesetzt
20 // Anzahl der Sekunden dazwischen
21#define P_MESSAGE_PREPEND "message_prepend"
22// Will der Magier MT_DEBUG sehen?
23#define P_WIZ_DEBUG "std_p_wizdebug"
24
25#define MESSAGE_BEEP "\007"
26
Zesstra7459f252022-02-23 22:47:26 +010027// Konstanten fuer P_BUFFER
28#define KOBOLD_ONLINE 0x1 // bei Anwesenheit speichern
29#define KOBOLD_OFFLINE 0x2 // bei Abwesenheit speichern
30
Bugfix3afcb792022-01-21 22:32:42 +010031// Definitionen fuer Alerts
32// Eigentlich waere hier "p_lib_alert" als Inhalt des Defines vorgesehen, da
33// "visualbell" in den Savefiles steht, ist eine Migrations hier jedoch
34// aufwaendig und auf unbestimmte Zeit verschoben.
35#define P_ALERT "visualbell"
36#define AL_NO_SOUND 1
37// Bis 1024 (2^10) reserviert fuer allg. Einstellungen
Zesstra1cc6cf32022-02-09 11:49:31 +010038// Aktionsfilter:
Bugfix60f5bc62022-01-21 11:09:56 +010039#define MB_TELL 2048
40#define MB_SAY 4096
41#define MB_CHANNEL 8192
42#define MB_SHOUT 16384
Zesstra3a261e52022-02-10 14:00:31 +010043#define MB_MENTION 0x8000
Zesstra1cc6cf32022-02-09 11:49:31 +010044#define MB_MISC 0x10000 // alle anderen Aktionen ohne eigenen Filter
Bugfix60f5bc62022-01-21 11:09:56 +010045// Flags < 1048576 (2^20) reserviert fuer Flags
Zesstra3a261e52022-02-10 14:00:31 +010046#define MB_ALL (MB_SAY | MB_TELL | MB_CHANNEL | MB_SHOUT | MB_MENTION | MB_MISC)
Bugfix3afcb792022-01-21 22:32:42 +010047
MG Mud User88f12472016-06-24 23:31:02 +020048// definitions for Message()
49
50#define MSGFLAG_CHANNEL 0x0001 // messages from channeld.c
51#define MSGFLAG_CHIST 0x0002
52#define MSGFLAG_SOUL 0x0004 // messages from soul.c
53#define MSGFLAG_REMOTE 0x0008 // remote emotes
54#define MSGFLAG_SHOUT 0x0010 // communication commands
55#define MSGFLAG_TELL 0x0020
56#define MSGFLAG_SAY 0x0040
57#define MSGFLAG_WHISPER 0x0080
58#define MSGFLAG_MECHO 0x0100
59#define MSGFLAG_RTELL 0x0200 // tell from other mud
60
61#define MAX_SAVED_MESSAGES 50
62#define MAX_SAVED_CHATS 20
63
64// Was geht in den Kobold?
65#define MSGFLAG_CACHE (MSGFLAG_TELL | MSGFLAG_REMOTE | MSGFLAG_WHISPER | MSGFLAG_RTELL)
66
67#define MSGFLAG_DEAFCHK (MSGFLAG_SHOUT | MSGFLAG_TELL | MSGFLAG_SAY | MSGFLAG_WHISPER | MSGFLAG_CHANNEL | MSGFLAG_RTELL)
68
69// Rueckgabewerte von Message()
70#define MESSAGE_OK 1 // alles klar
71#define MESSAGE_CACHE 0 // Meldung steht im Kobold
72#define MESSAGE_IGNORE_YOU -1 // Meldung/Sender wird ignoriert
73#define MESSAGE_IGNORE_VERB -2
74#define MESSAGE_IGNORE_MUD -3
75#define MESSAGE_DEAF -4 // Empfaenger hoert nicht zu
76#define MESSAGE_CACHE_FULL -5 // Kobold kann nichts mehr merken
77
78// Flags fuer Statusreports
79#define DO_REPORT_HP 0x1
80#define DO_REPORT_SP 0x2
81#define DO_REPORT_POISON 0x4
82#define DO_REPORT_WIMPY 0x8
83#define DO_REPORT_WIMPY_DIR 0x10
84
Zesstra8b5320e2022-02-18 21:10:26 +010085// Pfad zum (Offline-) Kobold
86#define KOBOLD "/secure/kobold"
87
MG Mud User88f12472016-06-24 23:31:02 +020088#endif // __PLAYER_COMM_H__
89
90#ifdef NEED_PROTOTYPES
91
92#ifndef __PLAYER_COMM_H_PROTO__
93#define __PLAYER_COMM_H_PROTO__
94
Zesstra8b5320e2022-02-18 21:10:26 +010095#define MAX_KOBOLD_LIMIT 256
96
MG Mud User88f12472016-06-24 23:31:02 +020097// prototypes
98
99protected varargs int _recv(object ob, string message,
100 int flag, string indent);
101
102varargs int Message(string msg, int flag, string indent,
103 string cname, mixed sender);
104
105protected void status_report(int type, mixed val);
106protected void _notify(string msg, string action);
bugfix1b04afb2020-04-15 14:52:24 +0200107static void modify_prompt();
MG Mud User88f12472016-06-24 23:31:02 +0200108
109#endif // __PLAYER_COMM_H_PROTO__
110
111#endif // NEED_PROTOYPES
112