diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-31 14:35:13 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-31 14:35:13 +0100 |
commit | 3fc88ba7c97a5db3bfbb0c422afd4e180271b348 (patch) | |
tree | 68cea48581acd1e2cba232cedeb7242b05d05af7 /src | |
parent | 98ef89c392a63bb7a78df5e8d8283c848f9dd2af (diff) |
Remove a few unnecessary .c_str() calls
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/cmd_die.cpp | 2 | ||||
-rw-r--r-- | src/commands/cmd_restart.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_customtitle.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_hostchange.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_ldapauth.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_vhost.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp index 105f40d46..13fa6c47e 100644 --- a/src/commands/cmd_die.cpp +++ b/src/commands/cmd_die.cpp @@ -46,7 +46,7 @@ class CommandDie : public Command */ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *user) { - if (ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0].c_str(), ServerInstance->Config->powerhash)) + if (ServerInstance->PassCompare(user, ServerInstance->Config->diepass, parameters[0], ServerInstance->Config->powerhash)) { { std::string diebuf = "*** DIE command from " + user->GetFullHost() + ". Terminating."; diff --git a/src/commands/cmd_restart.cpp b/src/commands/cmd_restart.cpp index be711e069..92a243eab 100644 --- a/src/commands/cmd_restart.cpp +++ b/src/commands/cmd_restart.cpp @@ -40,7 +40,7 @@ class CommandRestart : public Command CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, User *user) { ServerInstance->Logs->Log("COMMAND", LOG_DEFAULT, "Restart: %s",user->nick.c_str()); - if (ServerInstance->PassCompare(user, ServerInstance->Config->restartpass, parameters[0].c_str(), ServerInstance->Config->powerhash)) + if (ServerInstance->PassCompare(user, ServerInstance->Config->restartpass, parameters[0], ServerInstance->Config->powerhash)) { ServerInstance->SNO->WriteGlobalSno('a', "RESTART command from %s, restarting server.", user->GetFullRealHost().c_str()); diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 4c2c56318..d83786a20 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -99,7 +99,7 @@ class CloakUser : public ModeHandler } if (cloak) { - user->ChangeDisplayedHost(cloak->c_str()); + user->ChangeDisplayedHost(*cloak); user->SetMode(this, true); return MODEACTION_ALLOW; } diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index b0c9fad21..3386e8cd7 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -56,7 +56,7 @@ class CommandTitle : public Command ServerInstance->PI->SendMetaData(user, "ctitle", title); if (!vhost.empty()) - user->ChangeDisplayedHost(vhost.c_str()); + user->ChangeDisplayedHost(vhost); user->WriteNotice("Custom title set to '" + title + "'"); diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index d0e44b394..6d5896ef5 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -151,7 +151,7 @@ class ModuleHostChange : public Module if (!newhost.empty()) { user->WriteNotice("Setting your virtual host: " + newhost); - if (!user->ChangeDisplayedHost(newhost.c_str())) + if (!user->ChangeDisplayedHost(newhost)) user->WriteNotice("Could not set your virtual host: " + newhost); return; } diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index 9356b2dd1..6b7c9d219 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -323,7 +323,7 @@ public: std::string* cc = ldapVhost.get(user); if (cc) { - user->ChangeDisplayedHost(cc->c_str()); + user->ChangeDisplayedHost(*cc); ldapVhost.unset(user); } } diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 227d9426e..53910fdbe 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -48,7 +48,7 @@ class CommandVhost : public Command if (!mask.empty()) { user->WriteNotice("Setting your VHost: " + mask); - user->ChangeDisplayedHost(mask.c_str()); + user->ChangeDisplayedHost(mask); return CMD_SUCCESS; } } |