Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / m_away.c
index 79127a30c8b9fba17d69fb975ca2759e8f9f73bd..a321f9bb21078513cf65f8e33bfdd47214d5bf6b 100644 (file)
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
+#include "config.h"
+
 #include "client.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
@@ -99,6 +93,7 @@
 #include "send.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
  * user_set_away - set user away state
@@ -129,9 +124,9 @@ static int user_set_away(struct User* user, char* message)
      */
     unsigned int len = strlen(message);
 
-    if (len > TOPICLEN) {
-      message[TOPICLEN] = '\0';
-      len = TOPICLEN;
+    if (len > AWAYLEN) {
+      message[AWAYLEN] = '\0';
+      len = AWAYLEN;
     }
     if (away)
       away = (char*) MyRealloc(away, len + 1);