summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAdam <Adam@Anope.org>2010-05-26 02:53:08 -0500
committerAdam <Adam@anope.org>2010-06-18 21:04:08 -0400
commit1394c96173cec02d148dfece563bb186cf2f33b6 (patch)
tree19afb8a2fde62477701c1d21510bc3c6fe4fd7ae /src/modules
parentf0a44ba89471e006ab10e398e9635adbc73eb674 (diff)
Removed a lot of unnecessary .c_str() calls in the find* functions
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/cs_tban.cpp2
-rw-r--r--src/modules/mysql/db_mysql_execute.cpp1
-rw-r--r--src/modules/mysql/db_mysql_write.cpp10
3 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/cs_tban.cpp b/src/modules/cs_tban.cpp
index 710840d52..483f5f2d6 100644
--- a/src/modules/cs_tban.cpp
+++ b/src/modules/cs_tban.cpp
@@ -181,7 +181,7 @@ class TempBan : public CallBack
{
Channel *c;
- if ((c = findchan(chan.c_str())) && c->ci)
+ if ((c = findchan(chan)) && c->ci)
{
c->RemoveMode(NULL, CMODE_BAN, mask);
}
diff --git a/src/modules/mysql/db_mysql_execute.cpp b/src/modules/mysql/db_mysql_execute.cpp
index 356f7c0f2..4e4e859cb 100644
--- a/src/modules/mysql/db_mysql_execute.cpp
+++ b/src/modules/mysql/db_mysql_execute.cpp
@@ -1,7 +1,6 @@
/* RequiredLibraries: mysqlpp */
#include "db_mysql.h"
-#define HASH(nick) (((nick)[0]&31)<<5 | ((nick)[1]&31))
class FakeNickCore : public NickCore
{
diff --git a/src/modules/mysql/db_mysql_write.cpp b/src/modules/mysql/db_mysql_write.cpp
index 427be43bd..4c9772eef 100644
--- a/src/modules/mysql/db_mysql_write.cpp
+++ b/src/modules/mysql/db_mysql_write.cpp
@@ -499,7 +499,7 @@ class DBMySQLWrite : public DBMySQL
if (u->Account() && ((command == "SET" && !params.empty()) || (command == "SASET" && u->Account()->HasCommand("nickserv/saset") && params.size() > 1)))
{
ci::string cmd = (command == "SET" ? params[0] : params[1]);
- NickCore *nc = (command == "SET" ? u->Account() : findcore(params[0].c_str()));
+ NickCore *nc = (command == "SET" ? u->Account() : findcore(params[0]));
if (!nc)
return;
if (cmd == "PASSWORD" && params.size() > 1)
@@ -543,7 +543,7 @@ class DBMySQLWrite : public DBMySQL
{
if (command == "SET" && u->Account() && params.size() > 1)
{
- ChannelInfo *ci = cs_findchan(params[0].c_str());
+ ChannelInfo *ci = cs_findchan(params[0]);
if (!ci)
return;
if (!u->Account()->HasPriv("chanserv/set") && check_access(u, ci, CA_SET))
@@ -603,7 +603,7 @@ class DBMySQLWrite : public DBMySQL
{
if (command == "KICK" && params.size() > 2)
{
- ChannelInfo *ci = cs_findchan(params[0].c_str());
+ ChannelInfo *ci = cs_findchan(params[0]);
if (!ci)
return;
if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
@@ -641,12 +641,12 @@ class DBMySQLWrite : public DBMySQL
}
else if (command == "SET" && params.size() > 2)
{
- ChannelInfo *ci = cs_findchan(params[0].c_str());
+ ChannelInfo *ci = cs_findchan(params[0]);
if (ci && !check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
return;
BotInfo *bi = NULL;
if (!ci)
- bi = findbot(params[0].c_str());
+ bi = findbot(params[0]);
if (bi && params[1] == "PRIVATE" && u->Account()->HasPriv("botserv/set/private"))
{
query << "UPDATE `anope_bs_core` SET `flags` = '" << GetBotServFlags(bi) << "' WHERE `nick` = " << mysqlpp::quote << bi->nick;