Go to the documentation of this file.
32 #include <unordered_map>
38 std::unordered_map<std::string, std::string>
bells;
43 static std::unordered_map<std::string, Region *>
regions;
56 if (
line[0] ==
'\0' ||
line[0] ==
'#') {
59 char *space = strchr(
line,
' ');
67 if (strcmp(
line,
"region") == 0) {
77 for (
size_t i = 0; i <
count; i++) {
78 if (strcmp(
split[i],
"*") == 0) {
101 auto god =
found->second->bells.find(god_name);
102 std::string
msg = god ==
found->second->bells.end() ?
found->second->fallback : god->second;
103 auto r =
msg.find(
"%god");
104 if (
r != std::string::npos) {
105 msg.replace(
r, 4, god_name);
112 pl =
pl->contr->next ?
pl->contr->next->ob : NULL;
129 code = va_arg(
args,
int);
static void ring_bell(void)
size_t bufferreader_current_line(BufferReader *br)
void LOG(LogLevel logLevel, const char *format,...)
void get_tod(timeofday_t *tod)
std::unordered_map< std::string, std::string > bells
event_registration events_register_global_handler(int eventcode, f_plug_event hook)
void add_hook(const char *name, collectorHook hook)
const char * determine_god(object *op)
void events_unregister_global_handler(int eventcode, event_registration id)
size_t split_string(char *str, char *array[], size_t array_size, char sep)
std::vector< char * > disabled_plugins
void cfcitybell_init(Settings *settings)
std::vector< region * > all_regions
unsigned long event_registration
static std::unordered_map< std::string, Region * > regions
static event_registration global_handler
region * get_region_by_map(mapstruct *m)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
static std::vector< std::string > split(const std::string &field, const std::string &by)
static int clock_listener(int *type,...)
static void load_bells(BufferReader *reader, const char *filename)
char * bufferreader_next_line(BufferReader *br)