diff options
| author | 2013-08-19 20:22:15 +0200 | |
|---|---|---|
| committer | 2013-08-27 15:33:05 +0200 | |
| commit | 7e7e773d4d43e68c18c19e2ec712f4250e5f756d (patch) | |
| tree | a446c63b439f3854ad2da6d8bd8d4dce9715b38a /src/modules/m_spanningtree/away.cpp | |
| parent | m_spanningtree Changes to TreeSocket::WriteLine() to avoid string copies (diff) | |
m_spanningtree Introduce command builders
Diffstat (limited to 'src/modules/m_spanningtree/away.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/away.cpp | 13 |
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); +} |
