aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-08-17 15:43:24 +0200
committerGravatar attilamolnar2013-08-19 19:54:54 +0200
commit5dcd385b772f2ce822cf0700912ced93bd06c914 (patch)
tree39339313e2dab18d8c16d34e263577fa8d389a83 /src/modules/m_spanningtree/main.cpp
parentm_spanningtree Move all server-to-server command handlers into handler classes (diff)
downloadinspircd++-5dcd385b772f2ce822cf0700912ced93bd06c914.tar.gz
inspircd++-5dcd385b772f2ce822cf0700912ced93bd06c914.tar.bz2
inspircd++-5dcd385b772f2ce822cf0700912ced93bd06c914.zip
m_spanningtree Minor cleanup of functions
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 8f17129a3..060dc01df 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -104,16 +104,10 @@ void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops)
Current->GetDesc().c_str());
}
-int ModuleSpanningTree::CountServs()
-{
- return Utils->serverlist.size();
-}
-
void ModuleSpanningTree::HandleLinks(const std::vector<std::string>& parameters, User* user)
{
ShowLinks(Utils->TreeRoot,user,0);
user->WriteNumeric(365, "%s * :End of /LINKS list.",user->nick.c_str());
- return;
}
std::string ModuleSpanningTree::TimeToStr(time_t secs)
@@ -432,12 +426,12 @@ void ModuleSpanningTree::OnPostTopicChange(User* user, Channel* chan, const std:
Utils->DoOneToMany(user->uuid,"TOPIC",params);
}
-void ModuleSpanningTree::LocalMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list, const char* message_type)
+void ModuleSpanningTree::OnUserMessage(User* user, void* dest, int target_type, const std::string& text, char status, const CUList& exempt_list, MessageType msgtype)
{
- /* Server or remote origin, dest should always be non-null */
- if ((!user) || (!IS_LOCAL(user)) || (!dest))
+ if (!IS_LOCAL(user))
return;
+ const char* message_type = (msgtype == MSG_PRIVMSG ? "PRIVMSG" : "NOTICE");
if (target_type == TYPE_USER)
{
User* d = (User*) dest;
@@ -463,11 +457,6 @@ void ModuleSpanningTree::LocalMessage(User* user, void* dest, int target_type, c
}
}
-void ModuleSpanningTree::OnUserMessage(User* user, void* dest, int target_type, const std::string& text, char status, const CUList& exempt_list, MessageType msgtype)
-{
- LocalMessage(user, dest, target_type, text, status, exempt_list, (msgtype == MSG_PRIVMSG ? "PRIVMSG" : "NOTICE"));
-}
-
void ModuleSpanningTree::OnBackgroundTimer(time_t curtime)
{
AutoConnectServers(curtime);