diff options
author | Adam <Adam@anope.org> | 2013-05-08 20:26:45 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-08 20:26:45 -0400 |
commit | 735e234c2c7a984b01295f86045545ed8d9838ce (patch) | |
tree | 87d7cce721eaa7a34d71b17c73f317750d87caef /modules/commands/os_defcon.cpp | |
parent | 735f0ba6cf5602396bc2cabd6ceca0e92a0edd00 (diff) |
Fixed some issues and desyncs with creating empty permanent channels on startup & dropping empty channels
Diffstat (limited to 'modules/commands/os_defcon.cpp')
-rw-r--r-- | modules/commands/os_defcon.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 6d47d3a9f..236cf2e2f 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -335,7 +335,7 @@ class OSDefcon : public Module OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), session_service("SessionService", "session"), akills("XLineManager", "xlinemanager/sgline"), commandosdefcon(this) { - Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelCreate }; + Implementation i[] = { I_OnReload, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelSync }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); } @@ -509,15 +509,7 @@ class OSDefcon : public Module if (DConfig.sessionlimit <= 0 || !session_service) return; - Session *session; - try - { - session = session_service->FindSession(u->ip); - } - catch (const SocketException &) - { - return; - } + Session *session = session_service->FindSession(u->ip); Exception *exception = session_service->FindException(u); if (DConfig.Check(DEFCON_REDUCE_SESSION) && !exception) @@ -553,7 +545,7 @@ class OSDefcon : public Module this->ParseModeString(); } - void OnChannelCreate(Channel *c) anope_override + void OnChannelSync(Channel *c) anope_override { if (DConfig.Check(DEFCON_FORCE_CHAN_MODES)) c->SetModes(OperServ, false, "%s", DConfig.chanmodes.c_str()); |