summaryrefslogtreecommitdiff
path: root/modules/hostserv/request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hostserv/request.cpp')
-rw-r--r--modules/hostserv/request.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/modules/hostserv/request.cpp b/modules/hostserv/request.cpp
index 2024ef3b3..2bad26b48 100644
--- a/modules/hostserv/request.cpp
+++ b/modules/hostserv/request.cpp
@@ -271,7 +271,21 @@ class CommandHSActivate : public Command
return;
}
- na->SetVhost(req->GetIdent(), req->GetHost(), source.GetNick(), req->GetTime());
+ HostServ::VHost *vhost = Serialize::New<HostServ::VHost *>();
+ if (vhost == nullptr)
+ {
+ source.Reply(_("Unable to create vhost, is hostserv enabled?"));
+ return;
+ }
+
+ vhost->SetOwner(na);
+ vhost->SetIdent(req->GetIdent());
+ vhost->SetHost(req->GetHost());
+ vhost->SetCreator(source.GetNick());
+ vhost->SetCreated(req->GetTime());
+
+ na->SetVHost(vhost);
+
EventManager::Get()->Dispatch(&Event::SetVhost::OnSetVhost, na);
if (Config->GetModule(this->GetOwner())->Get<bool>("memouser") && memoserv)