diff options
| author | 2014-04-02 12:44:12 +0200 | |
|---|---|---|
| committer | 2014-04-02 12:44:12 +0200 | |
| commit | a6e68c0d346395630dee9dc69211a284360b6c62 (patch) | |
| tree | 1d6c28eb611182fa38ac6061c886695bd1d5f6cd /src/users.cpp | |
| parent | Check if Membership::GetPrefixChar() returns 0 before appending it to a string (diff) | |
Remove User::WriteTo() functions; use User::WriteFrom() instead
The removed functions were rarely used and all they did was to call User::WriteFrom() with swapped arguments. On call sites, WriteTo() hardly offers any readability improvement over WriteFrom().
Diffstat (limited to 'src/users.cpp')
| -rw-r--r-- | src/users.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/users.cpp b/src/users.cpp index a52c392fc..40147b37d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -695,7 +695,7 @@ bool User::ChangeNick(const std::string& newnick, bool force, time_t newts) if (InUse->registered != REG_ALL) { /* force the camper to their UUID, and ask them to re-send a NICK. */ - InUse->WriteTo(InUse, "NICK %s", InUse->uuid.c_str()); + InUse->WriteFrom(InUse, "NICK %s", InUse->uuid.c_str()); InUse->WriteNumeric(ERR_NICKNAMEINUSE, "%s :Nickname overruled.", InUse->nick.c_str()); ServerInstance->Users->clientlist.erase(InUse->nick); @@ -908,21 +908,6 @@ void User::WriteFrom(User *user, const char* text, ...) this->WriteFrom(user, textbuffer); } - -/* write text to an destination user from a source user (e.g. user privmsg) */ - -void User::WriteTo(User *dest, const char *data, ...) -{ - std::string textbuffer; - VAFORMAT(textbuffer, data, data); - this->WriteTo(dest, textbuffer); -} - -void User::WriteTo(User *dest, const std::string &data) -{ - dest->WriteFrom(this, data); -} - void User::WriteCommon(const char* text, ...) { if (this->registered != REG_ALL || quitting) |
