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 * ---------------------------------------------------
19 #include "inspircd_config.h"
21 #include "inspircd_io.h"
33 #include "inspstring.h"
35 #include "helperfuncs.h"
40 extern ServerConfig* Config;
41 extern InspIRCd* ServerInstance;
43 extern std::vector<Module*> modules;
44 extern std::vector<ircd_module*> factory;
47 void cmd_away::Handle (char **parameters, int pcnt, userrec *user)
51 strlcpy(user->awaymsg,parameters[0],MAXAWAY);
52 WriteServ(user->fd,"306 %s :You have been marked as being away",user->nick);
53 FOREACH_MOD(I_OnSetAway,OnSetAway(user));
58 WriteServ(user->fd,"305 %s :You are no longer marked as being away",user->nick);
59 FOREACH_MOD(I_OnCancelAway,OnCancelAway(user));