summaryrefslogtreecommitdiff
path: root/modules/commands/hs_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
committerAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
commit2dec8e767a70def4b9b04a96ae4f75e4d1013038 (patch)
tree36f5b551ff359a578e17d5e7d2f486970d759a7b /modules/commands/hs_set.cpp
parent873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff)
Allow userless command sources
Diffstat (limited to 'modules/commands/hs_set.cpp')
-rw-r--r--modules/commands/hs_set.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp
index d4fbe9d5c..b2509bcea 100644
--- a/modules/commands/hs_set.cpp
+++ b/modules/commands/hs_set.cpp
@@ -24,7 +24,6 @@ class CommandHSSet : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
const Anope::string &nick = params[0];
@@ -80,9 +79,9 @@ class CommandHSSet : public Command
return;
}
- Log(LOG_ADMIN, u, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
+ Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
- na->SetVhost(user, host, u->nick);
+ na->SetVhost(user, host, source.GetNick());
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!user.empty())
source.Reply(_("VHost for \002%s\002 set to \002%s\002@\002%s\002."), nick.c_str(), user.c_str(), host.c_str());
@@ -126,7 +125,6 @@ class CommandHSSetAll : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
Anope::string nick = params[0];
@@ -182,9 +180,9 @@ class CommandHSSetAll : public Command
return;
}
- Log(LOG_ADMIN, u, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
+ Log(LOG_ADMIN, source, this) << "to set the vhost of " << na->nick << " to " << (!user.empty() ? user + "@" : "") << host;
- na->SetVhost(user, host, u->nick);
+ na->SetVhost(user, host, source.GetNick());
this->Sync(na);
FOREACH_MOD(I_OnSetVhost, OnSetVhost(na));
if (!user.empty())