diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/cs_xop.c | 19 | ||||
| -rw-r--r-- | src/core/db_plain.cpp | 2 | ||||
| -rw-r--r-- | src/core/os_shutdown.c | 3 | ||||
| -rw-r--r-- | src/core/os_stats.c | 4 |
4 files changed, 15 insertions, 13 deletions
diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index 2fe9daf30..fdedfa9bf 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -547,14 +547,11 @@ class CSXOP : public Module if (serv_uplink && is_sync(serv_uplink)) OnUplinkSync(); - else - { - /* We don't want to add some commands until we are synced, so we know what modes - * exist and what dont - */ - ModuleManager::Attach(I_OnUplinkSync, this); - } - ModuleManager::Attach(I_OnChanServHelp, this); + + Implementation i[] = { + I_OnUplinkSync, I_OnServerDisconnect, I_OnChanServHelp + }; + ModuleManager::Attach(i, this, 3); } void OnUplinkSync() @@ -565,6 +562,12 @@ class CSXOP : public Module this->AddCommand(CHANSERV, new CommandCSHOP()); } + void OnServerDisconnect() + { + this->DelCommand(CHANSERV, "QOP"); + this->DelCommand(CHANSERV, "HOP"); + } + void OnChanServHelp(User *u) { if (ModeManager::FindChannelModeByName(CMODE_OWNER)) diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index 02dc71b3b..fb73d2860 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -48,7 +48,7 @@ static void ReadDatabase(Module *m = NULL) if (!db.is_open()) { - ircdproto->SendGlobops(NULL, "Unable to open %s for reading!", DatabaseFile.c_str()); + Alog() << "Unable to open " << DatabaseFile << " for reading!"; return; } diff --git a/src/core/os_shutdown.c b/src/core/os_shutdown.c index 670b23f57..3adc2638f 100644 --- a/src/core/os_shutdown.c +++ b/src/core/os_shutdown.c @@ -33,8 +33,7 @@ class CommandOSShutdown : public Command if (Config.GlobalOnCycle) oper_global(NULL, "%s", Config.GlobalOnCycleMessage); - save_data = 1; - delayed_quit = 1; + shutting_down = 1; return MOD_CONT; } diff --git a/src/core/os_stats.c b/src/core/os_stats.c index 4ff9617ae..f159c4806 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -225,8 +225,8 @@ class CommandOSStats : public Command { long count, mem; - notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_READ, total_read / 1024); - notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_WRITTEN, total_written / 1024); + notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_READ, TotalRead / 1024); + notice_lang(Config.s_OperServ, u, OPER_STATS_BYTES_WRITTEN, TotalWritten / 1024); get_user_stats(&count, &mem); notice_lang(Config.s_OperServ, u, OPER_STATS_USER_MEM, count, (mem + 512) / 1024); |
