]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_away.cpp
Remove/Add cmode h according to <option:allowhalfop>. Fixes bug #715 reported by...
[user/henk/code/inspircd.git] / src / commands / cmd_away.cpp
index 7fac7ae6d382792f05e9e07b3e8846924ae40fc7..787a0e8b1e6cbc97bce276a6d805bd51aff11cfb 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -33,9 +33,9 @@ CmdResult CommandAway::Handle (const std::vector<std::string>& parameters, User
                        return CMD_FAILURE;
 
                user->awaytime = ServerInstance->Time();
-               user->awaymsg.assign(parameters[0], 0, MAXAWAY);
+               user->awaymsg.assign(parameters[0], 0, ServerInstance->Config->Limits.MaxAway);
 
-               user->WriteNumeric(306, "%s :You have been marked as being away",user->nick.c_str());
+               user->WriteNumeric(RPL_NOWAWAY, "%s :You have been marked as being away",user->nick.c_str());
        }
        else
        {
@@ -44,8 +44,8 @@ CmdResult CommandAway::Handle (const std::vector<std::string>& parameters, User
                if (MOD_RESULT != 0 && !IS_LOCAL(user))
                        return CMD_FAILURE;
 
-               user->awaymsg.empty();
-               user->WriteNumeric(305, "%s :You are no longer marked as being away",user->nick.c_str());
+               user->awaymsg.clear();
+               user->WriteNumeric(RPL_UNAWAY, "%s :You are no longer marked as being away",user->nick.c_str());
        }
 
        return CMD_SUCCESS;