1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
18 #include "inspircd_config.h"
19 #include "configreader.h"
23 #include "helperfuncs.h"
24 #include "commands/cmd_away.h"
26 extern ServerConfig* Config;
27 extern InspIRCd* ServerInstance;
29 extern std::vector<Module*> modules;
30 extern std::vector<ircd_module*> factory;
33 void cmd_away::Handle (char **parameters, int pcnt, userrec *user)
37 strlcpy(user->awaymsg,parameters[0],MAXAWAY);
38 WriteServ(user->fd,"306 %s :You have been marked as being away",user->nick);
39 FOREACH_MOD(I_OnSetAway,OnSetAway(user));
44 WriteServ(user->fd,"305 %s :You are no longer marked as being away",user->nick);
45 FOREACH_MOD(I_OnCancelAway,OnCancelAway(user));