diff options
-rw-r--r-- | modules/commands/cs_access.cpp | 10 | ||||
-rw-r--r-- | modules/commands/ns_ajoin.cpp | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index e78bac824..91ca8f1d9 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -25,7 +25,7 @@ class AccessChanAccess : public ChanAccess public: int level; - AccessChanAccess(AccessProvider *p) : ChanAccess(p) + AccessChanAccess(AccessProvider *p) : ChanAccess(p), level(0) { } @@ -41,7 +41,13 @@ class AccessChanAccess : public ChanAccess void AccessUnserialize(const Anope::string &data) anope_override { - this->level = convertTo<int>(data); + try + { + this->level = convertTo<int>(data); + } + catch (const ConvertException &) + { + } } bool operator>(const ChanAccess &other) const anope_override diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 2817dd1a6..383f1acac 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -252,7 +252,7 @@ class NSAJoin : public Module ajoinentry_type("AJoinEntry", AJoinEntry::Unserialize) { - if (!IRCD->CanSVSJoin) + if (!IRCD || !IRCD->CanSVSJoin) throw ModuleException("Your IRCd does not support SVSJOIN"); } |