summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/utils.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 12:32:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-06-09 12:32:34 +0000
commit52acbb466b84a1cd161b1c111f855d6f0419fff3 (patch)
tree75c047fe70b522a23699f9b2d74c868822850f3f /src/modules/m_spanningtree/utils.cpp
parent0161215f42ccbfe45d1aef626f830d39486ef699 (diff)
A ton more clear() and empty() stuff thats been lingering on the long term todo for too long a term :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7264 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/utils.cpp')
-rw-r--r--src/modules/m_spanningtree/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 6c4001503..8b191fa03 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -409,7 +409,7 @@ void SpanningTreeUtilities::RefreshIPCache()
ValidIPs.clear();
for (std::vector<Link>::iterator L = LinkBlocks.begin(); L != LinkBlocks.end(); L++)
{
- if ((L->IPAddr != "") && (L->RecvPass != "") && (L->SendPass != "") && (L->Name != "") && (L->Port))
+ if ((!L->IPAddr.empty()) && (!L->RecvPass.empty()) && (!L->SendPass.empty()) && (!L->Name.empty()) && (L->Port))
{
ValidIPs.push_back(L->IPAddr);
@@ -468,7 +468,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
while ((portno = portrange.GetToken()))
{
if (IP == "*")
- IP = "";
+ IP.clear();
if ((!transport.empty()) && (hooks.find(transport.c_str()) == hooks.end()))
{
@@ -536,7 +536,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
/* Bugfix by brain, do not allow people to enter bad configurations */
if (L.Name != ServerInstance->Config->ServerName)
{
- if ((L.IPAddr != "") && (L.RecvPass != "") && (L.SendPass != "") && (L.Name != "") && (L.Port))
+ if ((!L.IPAddr.empty()) && (!L.RecvPass.empty()) && (!L.SendPass.empty()) && (!L.Name.empty()) && (L.Port))
{
ValidIPs.push_back(L.IPAddr);
@@ -583,19 +583,19 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind)
}
else
{
- if (L.IPAddr == "")
+ if (L.IPAddr.empty())
{
ServerInstance->Log(DEFAULT,"Invalid configuration for server '%s', IP address not defined!",L.Name.c_str());
}
- else if (L.RecvPass == "")
+ else if (L.RecvPass.empty())
{
ServerInstance->Log(DEFAULT,"Invalid configuration for server '%s', recvpass not defined!",L.Name.c_str());
}
- else if (L.SendPass == "")
+ else if (L.SendPass.empty())
{
ServerInstance->Log(DEFAULT,"Invalid configuration for server '%s', sendpass not defined!",L.Name.c_str());
}
- else if (L.Name == "")
+ else if (L.Name.empty())
{
ServerInstance->Log(DEFAULT,"Invalid configuration, link tag without a name!");
}