]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Replace most usages of "GECOS" with "real" or "real name".
[user/henk/code/inspircd.git] / src / users.cpp
index 442770aca3513118291fbbb64300fb46e106d6ba..20480da07a2545deaffdf162439ec3eef32ba1a7 100644 (file)
@@ -561,7 +561,7 @@ void LocalUser::FullConnect()
        /* 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);
@@ -825,7 +825,7 @@ void User::WriteCommand(const char* command, const std::string& text)
 
 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);
@@ -995,20 +995,20 @@ bool User::SharesChannelWith(User *other)
        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;
 }