1
0
mirror of https://github.com/anope/anope.git synced 2026-06-24 20:06:40 +02:00
Files
anope/modules/nickserv/ns_update.cpp
T
Sadie Powell 535ff9b839 Stop showing the last real name in the nick information output.
This isn't really used anymore and a lot of clients just set it to
a static string so it doesn't make sense to show it.
2025-09-12 15:33:00 +01:00

64 lines
1.4 KiB
C++

/* NickServ core functions
*
* (C) 2003-2025 Anope Team
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*/
#include "module.h"
class CommandNSUpdate final
: public Command
{
public:
CommandNSUpdate(Module *creator) : Command(creator, "nickserv/update", 0, 0)
{
this->SetDesc(_("Updates your current status, i.e. it checks for new memos"));
this->RequireUser(true);
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
User *u = source.GetUser();
NickAlias *na = NickAlias::Find(u->nick);
if (na && na->nc == source.GetAccount())
na->last_seen = Anope::CurTime;
FOREACH_MOD(OnNickUpdate, (u));
source.Reply(_("Status updated (memos, vhost, chmodes, flags)."));
}
bool OnHelp(CommandSource &source, const Anope::string &) override
{
this->SendSyntax(source);
source.Reply(" ");
source.Reply(_(
"Updates your current status, i.e. it checks for new memos, "
"sets needed channel modes and updates your vhost and "
"your userflags (lastseentime, etc)."
));
return true;
}
};
class NSUpdate final
: public Module
{
CommandNSUpdate commandnsupdate;
public:
NSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandnsupdate(this)
{
}
};
MODULE_INIT(NSUpdate)