X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/blobdiff_plain/4d99495c83df6a2bb0a0323eee599c5a7246c212..c9bf23febfe7c108b9da7dd1937b586eace40812:/src/global.c diff --git a/src/global.c b/src/global.c index cc05870..4663c1d 100644 --- a/src/global.c +++ b/src/global.c @@ -67,9 +67,39 @@ static const struct message_entry msgtab[] = { * notices. Make sure you grep for them if you ever add args * to the notice. */ - { "DEFCON_NETWORK_CHANGED", "Network DefCon level has changed to level %d" }, /* opserv.c */ - { "DEFCON_OPER_LEVEL_CHANGE", "%s is changing the DefCon level to %d" }, /* opserv.c */ - { "DEFCON_TIMEOUT_LEVEL_CHANGE", "The DefCon has changed back to level %d (timeout)" }, /* opserv.c */ + /* chanserv.c */ + { "CSMSG_REGISTERED_TO", "%s registered to %s by %s." }, + { "CSMSG_CHANNEL_MOVED", "%s moved to %s by %s." }, + { "CSMSG_SUSPENSION_MODIFIED", "%s suspension modified by %s." }, + { "CSMSG_SUSPENDED_BY", "%s suspended by %s." }, + { "CSMSG_UNSUSPENDED_BY", "%s unsuspended by %s." }, + { "CSMSG_OWNERSHIP_TRANSFERRED", "%s ownership transferred to %s by %s." }, + + /* mod-helpserv.c */ + { "HSMSG_BOT_RENAMED", "HelpServ bot %s (in %s) renamed to %s by %s." }, + { "HSMSG_BOT_MOVED", "HelpServ %s (%s) moved to %s by %s." }, + { "HSMSG_BOT_REGISTERED", "HelpServ %s (%s) registered to %s by %s." }, + { "HSMSG_BOT_EXPIRED", "HelpServ %s (%s) expired at request of %s." }, + { "HSMSG_BOT_UNREGISTERED", "HelpServ %s (%s) unregistered by %s." }, + + /* nickserv.c */ + { "NSMSG_ACCOUNT_RENAMED", "%s renamed account %s to %s." }, + { "NSMSG_ACCOUNT_MERGED", "%s (%s) merged account %s into %s." }, + + /* opserv.c */ + { "DEFCON_NETWORK_CHANGED", "Network DefCon level has changed to level %d" }, + { "DEFCON_OPER_LEVEL_CHANGE", "%s is changing the DefCon level to %d" }, + { "DEFCON_TIMEOUT_LEVEL_CHANGE", "The DefCon has changed back to level %d (timeout)" }, + { "OSMSG_CHANNEL_ACTIVITY_WARN", "Channel activity warning for channel %s: %s" }, + + /* spamserv.c */ + { "SSMSG_CHANNEL_MERGED", "$X (channel %s) merged into %s by %s." }, + { "SSMSG_CHANNEL_MOVED", "$X (channel %s) moved into %s by %s." }, + { "SSMSG_UNREG_MANUAL", "$X (channel %s) %s by %s." }, + { "SSMSG_REG_EXPIRED", "$X (channel %s) registration expired." }, + { "SSMSG_LOST_ALL_USERS", "$X (channel %s) lost all users." }, + { "SSMSG_REGISTERED_BY", "$X (channel %s) registered by %s." }, + { "SSMSG_UNREGISTERED_BY", "$X (channel %s) unregistered by %s." }, { NULL, NULL } }; @@ -373,7 +403,7 @@ message_send(struct globalMessage *message) void global_message_args(long targets, const char *language_entry, ...) { - struct globalMessage *message; + struct globalMessage *message = NULL; va_list arg_list; dict_iterator_t it; char response[MAXLEN]; @@ -394,6 +424,9 @@ global_message_args(long targets, const char *language_entry, ...) vsnprintf(response, MAXLEN-2, language_entry, arg_list); response[MAXLEN-1] = 0; + if (message) + message_del(message); + message = message_add(targets | MESSAGE_OPTION_SOURCELESS, now, 0, "", response); if (!message) continue;