/* Trigger MOTD and LUSERS output, give modules a chance too */
ModResult MOD_RESULT;
std::string command("LUSERS");
- std::vector<std::string> parameters;
+ CommandBase::Params parameters;
FIRST_MOD_RESULT(OnPreCommand, MOD_RESULT, (command, parameters, this, true, command));
if (!MOD_RESULT)
ServerInstance->Parser.CallHandler(command, parameters, this);
namespace
{
- std::string BuildNumeric(const std::string& source, User* targetuser, unsigned int num, const std::vector<std::string>& params)
+ std::string BuildNumeric(const std::string& source, User* targetuser, unsigned int num, const Command::Params& params)
{
const char* const target = (targetuser->registered & REG_NICK ? targetuser->nick.c_str() : "*");
std::string raw = InspIRCd::Format(":%s %03u %s", source.c_str(), num, target);
return false;
}
-bool User::ChangeName(const std::string& gecos)
+bool User::ChangeName(const std::string& real)
{
- if (!this->fullname.compare(gecos))
+ if (!this->fullname.compare(real))
return true;
if (IS_LOCAL(this))
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnChangeLocalUserGECOS, MOD_RESULT, (IS_LOCAL(this),gecos));
+ FIRST_MOD_RESULT(OnPreChangeRealName, MOD_RESULT, (IS_LOCAL(this), real));
if (MOD_RESULT == MOD_RES_DENY)
return false;
- FOREACH_MOD(OnChangeName, (this,gecos));
+ FOREACH_MOD(OnChangeName, (this, real));
}
- this->fullname.assign(gecos, 0, ServerInstance->Config->Limits.MaxGecos);
+ this->fullname.assign(real, 0, ServerInstance->Config->Limits.MaxReal);
return true;
}