diff options
| author | Adam <Adam@anope.org> | 2015-09-14 13:43:14 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2015-09-14 13:43:14 -0400 |
| commit | 8d13a355cd9b851b5cf9f6012c77b2af68a039f1 (patch) | |
| tree | c22eafe53844a809761ef7b15520857c533e8e9b | |
| parent | 8c4eec2b6e3bcc620258e2b928c2ea0b6351c327 (diff) | |
Remove associated oper blocks in os_oper when accounts are deleted
| -rw-r--r-- | modules/commands/os_oper.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index a99e770a7..7b74af5ea 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -277,6 +277,15 @@ class OSOper : public Module } } } + + void OnDelCore(NickCore *nc) anope_override + { + if (nc->o && dynamic_cast<MyOper *>(nc->o)) + { + delete nc->o; + nc->o = NULL; + } + } }; MODULE_INIT(OSOper) |
