summaryrefslogtreecommitdiff
path: root/modules/commands/cs_access.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-12 19:19:21 -0500
committerAdam <Adam@anope.org>2013-11-12 19:19:21 -0500
commitc9f4c2db1f90cc16bb23ac176cf4a6dbaa621696 (patch)
tree150a5367c203ad6fd0eb76d96c0adfcf728f2419 /modules/commands/cs_access.cpp
parentd1248d12491375f2496673d9f87842ff8dee9fa4 (diff)
try/catch cs_access AccessUnserialize just incase, don't crash if ns_ajoin is loaded before the protocol module
Diffstat (limited to 'modules/commands/cs_access.cpp')
-rw-r--r--modules/commands/cs_access.cpp10
1 files changed, 8 insertions, 2 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