diff options
Diffstat (limited to 'modules/commands/os_session.cpp')
-rw-r--r-- | modules/commands/os_session.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 23d279801..56e31a908 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -17,25 +17,25 @@ class MySessionService : public SessionService { SessionMap Sessions; - ExceptionVector Exceptions; + Serialize::Checker<ExceptionVector> Exceptions; public: - MySessionService(Module *m) : SessionService(m) { } + MySessionService(Module *m) : SessionService(m), Exceptions("Exception") { } void AddException(Exception *e) anope_override { - this->Exceptions.push_back(e); + this->Exceptions->push_back(e); } void DelException(Exception *e) anope_override { - ExceptionVector::iterator it = std::find(this->Exceptions.begin(), this->Exceptions.end(), e); - if (it != this->Exceptions.end()) - this->Exceptions.erase(it); + ExceptionVector::iterator it = std::find(this->Exceptions->begin(), this->Exceptions->end(), e); + if (it != this->Exceptions->end()) + this->Exceptions->erase(it); } Exception *FindException(User *u) anope_override { - for (std::vector<Exception *>::const_iterator it = this->Exceptions.begin(), it_end = this->Exceptions.end(); it != it_end; ++it) + for (std::vector<Exception *>::const_iterator it = this->Exceptions->begin(), it_end = this->Exceptions->end(); it != it_end; ++it) { Exception *e = *it; if (Anope::Match(u->host, e->mask) || Anope::Match(u->ip, e->mask)) @@ -46,7 +46,7 @@ class MySessionService : public SessionService Exception *FindException(const Anope::string &host) anope_override { - for (std::vector<Exception *>::const_iterator it = this->Exceptions.begin(), it_end = this->Exceptions.end(); it != it_end; ++it) + for (std::vector<Exception *>::const_iterator it = this->Exceptions->begin(), it_end = this->Exceptions->end(); it != it_end; ++it) { Exception *e = *it; if (Anope::Match(host, e->mask)) |