summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-11-17 02:36:29 +0100
committerattilamolnar <attilamolnar@hush.com>2012-11-19 18:32:41 +0100
commitba5c0db795824c3fc1ad48ce332d7bdc440cb77f (patch)
tree0ef76daaf8ad4cc68a2cca9c1c2446ae045278e2 /src/modules
parent2de13e15c26edf4f4a5c0280974b2dea052c1853 (diff)
Change empty string assignments to .clear() or remove them entirely
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_alltime.cpp2
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_jumpserver.cpp2
-rw-r--r--src/modules/m_nopartmsg.cpp2
-rw-r--r--src/modules/m_sapart.cpp2
-rw-r--r--src/modules/m_watch.cpp6
6 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp
index 7012fde7e..29a0ee42c 100644
--- a/src/modules/m_alltime.cpp
+++ b/src/modules/m_alltime.cpp
@@ -28,7 +28,7 @@ class CommandAlltime : public Command
public:
CommandAlltime(Module* Creator) : Command(Creator, "ALLTIME", 0)
{
- flags_needed = 'o'; syntax.clear();
+ flags_needed = 'o';
translation.push_back(TR_END);
}
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index e28a4084b..bb0514680 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -144,7 +144,7 @@ public:
{
if (index != 0)
return;
- std::string out = "";
+ std::string out;
irc::commasepstream nicks(parameter);
std::string tok;
while (nicks.GetToken(tok))
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 9a171a19a..209fe0b68 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -38,8 +38,6 @@ class CommandJumpserver : public Command
CommandJumpserver(Module* Creator) : Command(Creator, "JUMPSERVER", 0, 4)
{
flags_needed = 'o'; syntax = "[<server> <port> <+/-an> <reason>]";
- redirect_to.clear();
- reason.clear();
port = 0;
redirect_all_immediately = redirect_new_users = false;
}
diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp
index 0c5660571..a8c4a5e2b 100644
--- a/src/modules/m_nopartmsg.cpp
+++ b/src/modules/m_nopartmsg.cpp
@@ -47,7 +47,7 @@ class ModulePartMsgBan : public Module
return;
if (memb->chan->GetExtBanStatus(memb->user, 'p') == MOD_RES_DENY)
- partmessage = "";
+ partmessage.clear();
return;
}
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 8845cd58e..81ca709ef 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -38,7 +38,7 @@ class CommandSapart : public Command
{
User* dest = ServerInstance->FindNick(parameters[0]);
Channel* channel = ServerInstance->FindChan(parameters[1]);
- std::string reason = "";
+ std::string reason;
if (dest && channel)
{
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 3750fceac..4012f358c 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -249,7 +249,7 @@ class CommandWatch : public Command
}
else
{
- (*wl)[nick] = "";
+ (*wl)[nick].clear();
user->WriteNumeric(605, "%s %s * * 0 :is offline",user->nick.c_str(), nick);
}
}
@@ -435,7 +435,7 @@ class Modulewatch : public Module
watchlist* wl = cmdw.ext.get(*n);
if (wl)
/* We were on somebody's notify list, set ourselves offline */
- (*wl)[user->nick.c_str()] = "";
+ (*wl)[user->nick.c_str()].clear();
}
}
@@ -504,7 +504,7 @@ class Modulewatch : public Module
if (wl)
{
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick.c_str(), oldnick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) user->age);
- (*wl)[oldnick.c_str()] = "";
+ (*wl)[oldnick.c_str()].clear();
}
}
}