diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-05-16 16:01:51 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-05-18 21:24:22 +0200 |
commit | 3ce33ee0e6bc0b8fbe2a564a37e02d2e56510b06 (patch) | |
tree | 9274c8a44c0d57917bfe79366308fbd6d2e4b90e /src | |
parent | f3d134a5b642b83e865c03b45c313df7f829ba15 (diff) |
Change the signature of User::ForceNickChange() to accept const std::string& instead of const char*
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_nicklock.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/nickcollide.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/save.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/svsnick.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 2 | ||||
-rw-r--r-- | src/xline.cpp | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index d48687113..9da40ce78 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -66,7 +66,7 @@ class CommandNicklock : public Command locked.set(target, 1); std::string oldnick = target->nick; - if (target->ForceNickChange(parameters[1].c_str())) + if (target->ForceNickChange(parameters[1])) ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used NICKLOCK to change and hold "+oldnick+" to "+parameters[1]); else { 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<std::string>& 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 diff --git a/src/xline.cpp b/src/xline.cpp index ff86997bb..d347e3763 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -642,7 +642,7 @@ bool QLine::Matches(User *u) void QLine::Apply(User* u) { /* Force to uuid on apply of qline, no need to disconnect any more :) */ - u->ForceNickChange(u->uuid.c_str()); + u->ForceNickChange(u->uuid); } |