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 * ---------------------------------------------------
17 #include "configreader.h"
20 #include "commands/cmd_away.h"
24 extern "C" command_t* init_command(InspIRCd* Instance)
26 return new cmd_away(Instance);
29 void cmd_away::Handle (const char** parameters, int pcnt, userrec *user)
31 if ((pcnt) && (*parameters[0]))
33 strlcpy(user->awaymsg,parameters[0],MAXAWAY);
34 user->WriteServ("306 %s :You have been marked as being away",user->nick);
35 FOREACH_MOD(I_OnSetAway,OnSetAway(user));
40 user->WriteServ("305 %s :You are no longer marked as being away",user->nick);
41 FOREACH_MOD(I_OnCancelAway,OnCancelAway(user));