From 92e28d4047e9426ceb9ab54aa64a9cf8ff03ed49 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 31 May 2013 18:59:22 +0000 Subject: - Implement motd{} configuration blocks based on ircu's implementation git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2151 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/m_motd.c | 2 +- modules/m_rehash.c | 5 +++-- modules/m_stats.c | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/m_motd.c b/modules/m_motd.c index 805840f..4f30eb7 100644 --- a/modules/m_motd.c +++ b/modules/m_motd.c @@ -42,7 +42,7 @@ do_motd(struct Client *source_p) "MOTD requested by %s (%s@%s) [%s]", source_p->name, source_p->username, source_p->host, source_p->servptr->name); - send_message_file(source_p, &ConfigFileEntry.motd); + motd_send(source_p); } /* diff --git a/modules/m_rehash.c b/modules/m_rehash.c index 77f5633..8eebf1c 100644 --- a/modules/m_rehash.c +++ b/modules/m_rehash.c @@ -34,6 +34,7 @@ #include "send.h" #include "parse.h" #include "modules.h" +#include "motd.h" /* @@ -68,9 +69,9 @@ mo_rehash(struct Client *client_p, struct Client *source_p, else if (irccmp(parv[1], "MOTD") == 0) { sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, - "%s is forcing re-reading of MOTD file", + "%s is forcing re-reading of MOTD files", get_oper_name(source_p)); - read_message_file(&ConfigFileEntry.motd); + motd_recache(); found = 1; } diff --git a/modules/m_stats.c b/modules/m_stats.c index a903e92..12bb862 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -48,6 +48,7 @@ #include "whowas.h" #include "watch.h" #include "irc_res.h" +#include "motd.h" const char *from, *to; @@ -526,6 +527,7 @@ stats_memory(struct Client *source_p, int parc, char *parv[]) totww = wwu * sizeof(struct Client) + wwm; + motd_memory_count(source_p); count_ip_hash(&number_ips_stored,&mem_ips_stored); sendto_one(source_p, ":%s %d %s z :iphash %u(%llu)", me.name, RPL_STATSDEBUG, source_p->name, @@ -1562,7 +1564,7 @@ static const struct StatsStruct { 's', stats_service, 1, 0 }, { 'S', stats_service, 1, 0 }, { 't', stats_tstats, 1, 0 }, - { 'T', stats_tstats, 1, 0 }, + { 'T', motd_report, 1, 0 }, { 'u', stats_uptime, 0, 0 }, { 'U', stats_shared, 1, 0 }, { 'v', stats_servers, 1, 0 }, -- cgit