Author: Ghostwolf <foxxe@wtfs.net>
[ircu2.10.12-pk.git] / ircd / m_away.c
index ebd3cf76a64f47dfd52ec4c8db54a5d0644a5cb6..a321f9bb21078513cf65f8e33bfdd47214d5bf6b 100644 (file)
  */
 #include "config.h"
 
-#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 "client.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "send.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
  * user_set_away - set user away state
@@ -131,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);