1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 23:03:12 +02:00

Allow userless command sources

This commit is contained in:
Adam
2012-06-18 05:04:30 -04:00
parent 873d4287de
commit 2dec8e767a
153 changed files with 1029 additions and 1060 deletions
+7 -8
View File
@@ -24,22 +24,21 @@ class CommandNSUpdate : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
User *u = source.u;
User *u = source.GetUser();
if (!u)
return;
NickAlias *na = findnick(u->nick);
if (!na)
if (na && na->nc == source.nc)
{
source.Reply(NICK_NOT_REGISTERED);
return;
na->last_realname = u->realname;
na->last_seen = Anope::CurTime;
}
na->last_realname = u->realname;
na->last_seen = Anope::CurTime;
FOREACH_MOD(I_OnNickUpdate, OnNickUpdate(u));
source.Reply(_("Status updated (memos, vhost, chmodes, flags)."), Config->NickServ.c_str());
return;
}
bool OnHelp(CommandSource &source, const Anope::string &) anope_override