*
* This file is part of x3.
*
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
{ "GMSG_ID_INVALID", "$b%s$b is an invalid message ID." },
{ "GMSG_MESSAGE_COUNT", "$b%d$b messages found." },
{ "GMSG_NO_MESSAGES", "There are no messages for you." },
- { "GMSG_NOTICE_SOURCE", "[$b%s$b] Notice from %s:" },
- { "GMSG_MESSAGE_SOURCE", "[$b%s$b] Notice from %s, posted %s:" },
- { "GMSG_MOTD_HEADER", "$b------------- MESSAGE(S) OF THE DAY --------------$b" },
- { "GMSG_MOTD_FOOTER", "$b---------- END OF MESSAGE(S) OF THE DAY ----------$b" },
+ { "GMSG_NOTICE_SOURCE", "Notice to [$b%s$b] from %s:" },
+ { "GMSG_MESSAGE_SOURCE", "Notice to [$b%s$b] from %s, posted %s:" },
+ //{ "GMSG_MOTD_HEADER", "$b------------- MESSAGE(S) OF THE DAY --------------$b" },
+ { "GMSG_MOTD_HEADER", "$bNetwork Announcements$b" },
+ { "GMSG_MOTD_BAR", "---------------------------------------" },
+ { "GMSG_MOTD_FOOTER", "--------------- Thank You--------------" },
{ NULL, NULL }
};
static struct module *global_module;
static struct service *global_service;
static struct globalMessage *messageList;
+extern struct string_list *autojoin_channels;
static long messageCount;
static time_t last_max_alert;
static struct log_type *G_LOG;
if(message->flags & mask)
{
if (obstreperize && !count)
+ {
send_target_message(0, user->nick, global, "GMSG_MOTD_HEADER");
+ send_target_message(0, user->nick, global, "GMSG_MOTD_BAR");
+ }
notice_target(user->nick, message);
count++;
}
void
init_global(const char *nick)
{
+ struct chanNode *chan;
+ unsigned int i;
G_LOG = log_register_type("Global", "file:global.log");
reg_new_user_func(global_process_user);
reg_auth_func(global_process_auth);
global = AddService(nick, modes ? modes : NULL, "Global Services", NULL);
global_service = service_register(global);
}
+
+ if(autojoin_channels && global) {
+ for (i = 0; i < autojoin_channels->used; i++) {
+ chan = AddChannel(autojoin_channels->list[i], now, "+nt", NULL, NULL);
+ AddChannelUser(global, chan)->modes |= MODE_CHANOP;
+ }
+ }
+
saxdb_register("Global", global_saxdb_read, global_saxdb_write);
reg_exit_func(global_db_cleanup);
message_register_table(msgtab);