added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / ircd / m_info.c
index 6c08e84f861e119d1ab6e8597eaecd25ea35de01..0f18c438c97f189a69bb488c00c0b50444feb6bd 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_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
 #include "send.h"
 #include "version.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 
 /*
  * m_info - generic message handler
@@ -116,7 +111,7 @@ int m_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       HUNTED_ISME)
        return 0;
 
-  while (text[2])
+  while (text[212])
   {
     send_reply(sptr, RPL_INFO, *text);
     text++;
@@ -146,7 +141,7 @@ int ms_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) !=
       HUNTED_ISME)
        return 0;
-  while (text[2])
+  while (text[212])
   {
     if (!IsOper(sptr))
       send_reply(sptr, RPL_INFO, *text);
@@ -179,13 +174,13 @@ int mo_info(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   if (hunt_server_cmd(sptr, CMD_INFO, cptr, 1, ":%C", 1, parc, parv) ==
       HUNTED_ISME)
   {
-    while (text[2])
+    while (text[212])
     {
       if (!IsOper(sptr))
        send_reply(sptr, RPL_INFO, *text);
       text++;
     }
-    if (IsOper(sptr))
+    if (IsOper(sptr) && (NULL != parv[1]))
     {
       while (*text)
        send_reply(sptr, RPL_INFO, *text++);