From 3ce33ee0e6bc0b8fbe2a564a37e02d2e56510b06 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 16 May 2013 16:01:51 +0200 Subject: Change the signature of User::ForceNickChange() to accept const std::string& instead of const char* --- src/modules/m_spanningtree/nickcollide.cpp | 4 ++-- src/modules/m_spanningtree/save.cpp | 2 +- src/modules/m_spanningtree/svsnick.cpp | 4 ++-- src/modules/m_spanningtree/treesocket2.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp index 6d9aa0ee9..2acce9fdc 100644 --- a/src/modules/m_spanningtree/nickcollide.cpp +++ b/src/modules/m_spanningtree/nickcollide.cpp @@ -112,7 +112,7 @@ int TreeSocket::DoCollision(User *u, time_t remotets, const std::string &remotei params.push_back(ConvToStr(u->age)); Utils->DoOneToMany(ServerInstance->Config->GetSID(),"SAVE",params); - u->ForceNickChange(u->uuid.c_str()); + u->ForceNickChange(u->uuid); if (!bChangeRemote) return 1; @@ -130,7 +130,7 @@ int TreeSocket::DoCollision(User *u, time_t remotets, const std::string &remotei if (remote) { /* nick change collide. Force change their nick. */ - remote->ForceNickChange(remoteuid.c_str()); + remote->ForceNickChange(remoteuid); } if (!bChangeLocal) diff --git a/src/modules/m_spanningtree/save.cpp b/src/modules/m_spanningtree/save.cpp index 9e2ade8c4..216a7e5f1 100644 --- a/src/modules/m_spanningtree/save.cpp +++ b/src/modules/m_spanningtree/save.cpp @@ -39,7 +39,7 @@ bool TreeSocket::ForceNick(const std::string &prefix, parameterlist ¶ms) { Utils->DoOneToAllButSender(prefix,"SAVE",params,prefix); - if (!u->ForceNickChange(u->uuid.c_str())) + if (!u->ForceNickChange(u->uuid)) { ServerInstance->Users->QuitUser(u, "Nickname collision"); } diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index 916dae0a7..6490626af 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -32,10 +32,10 @@ CmdResult CommandSVSNick::Handle(const std::vector& parameters, Use if (isdigit(nick[0])) nick = u->uuid; - if (!u->ForceNickChange(nick.c_str())) + if (!u->ForceNickChange(nick)) { /* buh. UID them */ - if (!u->ForceNickChange(u->uuid.c_str())) + if (!u->ForceNickChange(u->uuid)) { ServerInstance->Users->QuitUser(u, "Nickname collision"); return CMD_SUCCESS; diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index fdd28a734..d1015ec86 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -463,7 +463,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, return; } } - who->ForceNickChange(params[0].c_str()); + who->ForceNickChange(params[0]); Utils->RouteCommand(route_back_again, command, params, who); } else -- cgit v1.2.3