summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/idle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/idle.cpp')
-rw-r--r--src/modules/m_spanningtree/idle.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/modules/m_spanningtree/idle.cpp b/src/modules/m_spanningtree/idle.cpp
index 57692ddf5..679948a51 100644
--- a/src/modules/m_spanningtree/idle.cpp
+++ b/src/modules/m_spanningtree/idle.cpp
@@ -21,17 +21,19 @@
#include "utils.h"
#include "commands.h"
-CmdResult CommandIdle::Handle(User* issuer, std::vector<std::string>& params)
+CmdResult CommandIdle::HandleRemote(RemoteUser* issuer, std::vector<std::string>& params)
{
- /* If this is a request, this user did the /whois
- * If this is a reply, this user's information is in params[1] and params[2]
+ /**
+ * There are two forms of IDLE: request and reply. Requests have one parameter,
+ * replies have more than one.
+ *
+ * If this is a request, 'issuer' did a /whois and its server wants to learn the
+ * idle time of the user in params[0].
+ *
+ * If this is a reply, params[0] is the user who did the whois and params.back() is
+ * the number of seconds 'issuer' has been idle.
*/
- if (IS_SERVER(issuer))
- return CMD_FAILURE;
- /* If this is a request, this is the user whose idle information was requested
- * If this is a reply, this user did the /whois
- */
User* target = ServerInstance->FindUUID(params[0]);
if ((!target) || (IS_SERVER(target)))
return CMD_FAILURE;