From 50a42d2cbf2ff00ecab6bd432e88c8ca17a47219 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 26 Jan 2013 21:49:27 -0500 Subject: Fix os_session to work with sql properly --- modules/commands/os_session.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modules/commands/os_session.cpp') 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 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::const_iterator it = this->Exceptions.begin(), it_end = this->Exceptions.end(); it != it_end; ++it) + for (std::vector::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::const_iterator it = this->Exceptions.begin(), it_end = this->Exceptions.end(); it != it_end; ++it) + for (std::vector::const_iterator it = this->Exceptions->begin(), it_end = this->Exceptions->end(); it != it_end; ++it) { Exception *e = *it; if (Anope::Match(host, e->mask)) -- cgit