1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
18 #include "treeserver.h"
19 #include "treesocket.h"
21 bool TreeSocket::Away(const std::string &prefix, parameterlist ¶ms)
23 User* u = ServerInstance->FindNick(prefix);
28 FOREACH_MOD(I_OnSetAway, OnSetAway(u, params[params.size() - 1]));
30 if (params.size() > 1)
31 u->awaytime = atoi(params[0].c_str());
33 u->awaytime = ServerInstance->Time();
35 u->awaymsg = params[params.size() - 1];
37 params[params.size() - 1] = ":" + params[params.size() - 1];
41 FOREACH_MOD(I_OnSetAway, OnSetAway(u, ""));
44 Utils->DoOneToAllButSender(prefix,"AWAY",params,u->server);