summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-28 14:43:35 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-28 14:43:35 +0200
commit1f4cc842a7b45c0d89f21da47b963c34c7329bd7 (patch)
treee5201a25e207fb4785d26df7c1a321ad174c1bc8 /src/modules/m_spanningtree
parent2a18ae111e7c1e0d0d26c54e8bd00a1a0affcf75 (diff)
m_spanningtree Change type of num_lost_* to be unsigned
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treeserver.cpp10
-rw-r--r--src/modules/m_spanningtree/treeserver.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp
index 99c9ed751..0acffbb70 100644
--- a/src/modules/m_spanningtree/treeserver.cpp
+++ b/src/modules/m_spanningtree/treeserver.cpp
@@ -181,17 +181,17 @@ void TreeServer::SQuitChild(TreeServer* server, const std::string& reason)
ServerInstance->SNO->WriteToSnoMask('L', "Server \002" + server->GetName() + "\002 split from server \002" + GetName() + "\002 with reason: " + reason);
}
- int num_lost_servers = 0;
+ unsigned int num_lost_servers = 0;
server->SQuitInternal(num_lost_servers);
const std::string quitreason = GetName() + " " + server->GetName();
ModuleSpanningTree* st = Utils->Creator;
st->SplitInProgress = true;
- int num_lost_users = QuitUsers(quitreason);
+ unsigned int num_lost_users = QuitUsers(quitreason);
st->SplitInProgress = false;
- ServerInstance->SNO->WriteToSnoMask(IsRoot() ? 'l' : 'L', "Netsplit complete, lost \002%d\002 user%s on \002%d\002 server%s.",
+ ServerInstance->SNO->WriteToSnoMask(IsRoot() ? 'l' : 'L', "Netsplit complete, lost \002%u\002 user%s on \002%u\002 server%s.",
num_lost_users, num_lost_users != 1 ? "s" : "", num_lost_servers, num_lost_servers != 1 ? "s" : "");
// No-op if the socket is already closed (i.e. it called us)
@@ -202,7 +202,7 @@ void TreeServer::SQuitChild(TreeServer* server, const std::string& reason)
ServerInstance->GlobalCulls.AddItem(server);
}
-void TreeServer::SQuitInternal(int& num_lost_servers)
+void TreeServer::SQuitInternal(unsigned int& num_lost_servers)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Server %s lost in split", GetName().c_str());
@@ -218,7 +218,7 @@ void TreeServer::SQuitInternal(int& num_lost_servers)
RemoveHash();
}
-int TreeServer::QuitUsers(const std::string &reason)
+unsigned int TreeServer::QuitUsers(const std::string& reason)
{
std::string publicreason = ServerInstance->Config->HideSplits ? "*.net *.split" : reason;
diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h
index 35af65107..f06e0bafa 100644
--- a/src/modules/m_spanningtree/treeserver.h
+++ b/src/modules/m_spanningtree/treeserver.h
@@ -71,7 +71,7 @@ class TreeServer : public Server
/** Used by SQuit logic to recursively remove servers
*/
- void SQuitInternal(int& num_lost_servers);
+ void SQuitInternal(unsigned int& num_lost_servers);
/** Remove the reference to this server from the hash maps
*/
@@ -113,7 +113,7 @@ class TreeServer : public Server
GetParent()->SQuitChild(this, reason);
}
- static int QuitUsers(const std::string& reason);
+ static unsigned int QuitUsers(const std::string& reason);
/** Get route.
* The 'route' is defined as the locally-