From 3617d7978899f830d952d9bac70ed14bb0cc0fd6 Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Sat, 2 Jan 2010 04:55:43 +0000 Subject: Convert 'const char *' and 'char *' function arguments to 'const std::string &' instead, done in actions.c along with chain reactions in other files. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2723 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/cs_forbid.c | 4 ++-- src/core/db_plain.cpp | 10 +++++----- src/core/os_staff.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c index 9c1690fe2..ae298d8d3 100644 --- a/src/core/cs_forbid.c +++ b/src/core/cs_forbid.c @@ -70,7 +70,7 @@ class CommandCSForbid : public Command struct c_userlist *cu, *nextu; const char *av[3]; - /* Before banning everyone, it might be prudent to clear +e and +I lists.. + /* Before banning everyone, it might be prudent to clear +e and +I lists.. * to prevent ppl from rejoining.. ~ Viper */ c->ClearExcepts(); c->ClearInvites(); @@ -95,7 +95,7 @@ class CommandCSForbid : public Command if (ircd->chansqline) { - ircdproto->SendSQLine(ci->name, ((reason) ? reason : "Forbidden")); + ircdproto->SendSQLine(ci->name, reason ? reason : "Forbidden"); } alog("%s: %s set FORBID for channel %s", Config.s_ChanServ, u->nick, ci->name); diff --git a/src/core/db_plain.cpp b/src/core/db_plain.cpp index b551d0b5c..4648378a8 100644 --- a/src/core/db_plain.cpp +++ b/src/core/db_plain.cpp @@ -78,7 +78,7 @@ static void ReadDatabase(Module *m = NULL) } if (MOD_RESULT == EVENT_STOP) continue; - + std::string mdbuf; NickCore *nc; NickAlias *na; @@ -98,7 +98,7 @@ static void ReadDatabase(Module *m = NULL) } else if (params[0] == "BI") { - bi = findbot(params[1].c_str()); + bi = findbot(params[1]); Type = MD_BI; } else if (params[0] == "CH") @@ -731,7 +731,7 @@ class DBPlain : public Module ak->SetFlag(AK_STUCK); if (Nick) ak->SetFlag(AK_ISNICK); - + } else if (key == "MLOCK_ON" || buf == "MLOCK_OFF") { @@ -773,7 +773,7 @@ class DBPlain : public Module else if (key == "BI") { if (params[0] == "NAME") - ci->bi = findbot(params[1].c_str()); + ci->bi = findbot(params[1]); else if (params[0] == "FLAGS") { for (unsigned j = 1; j < params.size(); ++j) @@ -1082,7 +1082,7 @@ class DBPlain : public Module FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, ci)); } } - + HostCore *hc; for (hc = hostCoreListHead(); hc; hc = hc->next) { diff --git a/src/core/os_staff.c b/src/core/os_staff.c index 4a06fe098..161022490 100644 --- a/src/core/os_staff.c +++ b/src/core/os_staff.c @@ -41,7 +41,7 @@ class CommandOSStaff : public Command found = 0; std::string nick = it->first, type = it->second; - if ((au = finduser(nick.c_str()))) + if ((au = finduser(nick))) { found = 1; notice_lang(Config.s_OperServ, u, OPER_STAFF_FORMAT, '*', type.c_str(), nick.c_str()); -- cgit