summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2015-06-29 08:58:31 -0400
committerAdam <Adam@anope.org>2015-06-29 08:58:31 -0400
commit8eb46772e6e9244575851ceaa86b39e57a1db060 (patch)
treecdb5a900345c3007ac5d402e407d3610b4e5b1a1 /modules
parentd563aa0da8f779505302b6c3d2b22b0b6e542cee (diff)
Don't allow loading hostserv mods if there can be no hostserv
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/hs_del.cpp3
-rw-r--r--modules/commands/hs_group.cpp2
-rw-r--r--modules/commands/hs_list.cpp2
-rw-r--r--modules/commands/hs_off.cpp3
-rw-r--r--modules/commands/hs_on.cpp3
-rw-r--r--modules/commands/hs_request.cpp1
-rw-r--r--modules/commands/hs_set.cpp3
7 files changed, 12 insertions, 5 deletions
diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp
index c27dc89d0..e103b8250 100644
--- a/modules/commands/hs_del.cpp
+++ b/modules/commands/hs_del.cpp
@@ -105,7 +105,8 @@ class HSDel : public Module
HSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandhsdel(this), commandhsdelall(this)
{
-
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
};
diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp
index a238c3f99..232b2bef3 100644
--- a/modules/commands/hs_group.cpp
+++ b/modules/commands/hs_group.cpp
@@ -86,6 +86,8 @@ class HSGroup : public Module
HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandhsgroup(this)
{
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
void OnSetVhost(NickAlias *na) anope_override
diff --git a/modules/commands/hs_list.cpp b/modules/commands/hs_list.cpp
index cbdbb25ae..db63c5cd4 100644
--- a/modules/commands/hs_list.cpp
+++ b/modules/commands/hs_list.cpp
@@ -152,6 +152,8 @@ class HSList : public Module
HSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandhslist(this)
{
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
};
diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp
index 75e6bc966..603b863c1 100644
--- a/modules/commands/hs_off.cpp
+++ b/modules/commands/hs_off.cpp
@@ -58,7 +58,8 @@ class HSOff : public Module
HSOff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandhsoff(this)
{
-
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
};
diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp
index d6897283a..d59206e27 100644
--- a/modules/commands/hs_on.cpp
+++ b/modules/commands/hs_on.cpp
@@ -65,7 +65,8 @@ class HSOn : public Module
HSOn(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandhson(this)
{
-
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
};
diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp
index 616b2e772..313057d25 100644
--- a/modules/commands/hs_request.cpp
+++ b/modules/commands/hs_request.cpp
@@ -362,7 +362,6 @@ class HSRequest : public Module
commandhsrequest(this), commandhsactive(this),
commandhsreject(this), commandhswaiting(this), hostrequest(this, "hostrequest"), request_type("HostRequest", HostRequest::Unserialize)
{
-
if (!IRCD || !IRCD->CanSetVHost)
throw ModuleException("Your IRCd does not support vhosts");
}
diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp
index 2940227aa..72e331e88 100644
--- a/modules/commands/hs_set.cpp
+++ b/modules/commands/hs_set.cpp
@@ -221,7 +221,8 @@ class HSSet : public Module
public:
HSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandhsset(this), commandhssetall(this)
{
-
+ if (!IRCD || !IRCD->CanSetVHost)
+ throw ModuleException("Your IRCd does not support vhosts");
}
};