summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/away.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/away.cpp')
-rw-r--r--src/modules/m_spanningtree/away.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/away.cpp b/src/modules/m_spanningtree/away.cpp
index 7b151dfef..9c4ec5783 100644
--- a/src/modules/m_spanningtree/away.cpp
+++ b/src/modules/m_spanningtree/away.cpp
@@ -43,3 +43,16 @@ CmdResult CommandAway::HandleRemote(RemoteUser* u, std::vector<std::string>& par
}
return CMD_SUCCESS;
}
+
+CommandAway::Builder::Builder(User* user)
+ : CmdBuilder(user, "AWAY")
+{
+ push_int(user->awaytime).push_last(user->awaymsg);
+}
+
+CommandAway::Builder::Builder(User* user, const std::string& msg)
+ : CmdBuilder(user, "AWAY")
+{
+ if (!msg.empty())
+ push_int(ServerInstance->Time()).push_last(msg);
+}