]> jfr.im git - solanum.git/blobdiff - modules/m_operspy.c
extensions/invite_notify: make the NOTICE optional, configurable
[solanum.git] / modules / m_operspy.c
index 3158ead878676e4915e1684252f72b242c3766c0..32a1a96d9daa39a1e1d86a5fe751633d05f1e980 100644 (file)
@@ -31,8 +31,7 @@
 #include "send.h"
 #include "channel.h"
 #include "client.h"
-#include "common.h"
-#include "config.h"
+#include "defaults.h"
 #include "ircd.h"
 #include "numeric.h"
 #include "s_serv.h"
 #include "modules.h"
 #include "logger.h"
 
-static int ms_operspy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
-                     int parc, const char *parv[]);
+static const char operspy_desc[] =
+       "Provides the operspy facility for viewing normally private data";
+
+static void ms_operspy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
+                      int parc, const char *parv[]);
 
 struct Message operspy_msgtab = {
        "OPERSPY", 0, 0, 0, 0,
@@ -52,9 +54,6 @@ struct Message operspy_msgtab = {
 
 mapi_clist_av1 operspy_clist[] = { &operspy_msgtab, NULL };
 
-static const char operspy_desc[] =
-       "Provides the operspy facility for viewing normally private data";
-
 DECLARE_MODULE_AV2(operspy, NULL, NULL, operspy_clist, NULL, NULL, NULL, NULL, operspy_desc);
 
 /* ms_operspy()
@@ -62,7 +61,7 @@ DECLARE_MODULE_AV2(operspy, NULL, NULL, operspy_clist, NULL, NULL, NULL, NULL, o
  * parv[1] - operspy command
  * parv[2] - optional params
  */
-static int
+static void
 ms_operspy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
           int parc, const char *parv[])
 {
@@ -87,7 +86,7 @@ ms_operspy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
                        len = strlen(parv[i]) + 1;
 
                        if((size_t)(cur_len + len) >= sizeof(buffer))
-                               return 0;
+                               return;
 
                        snprintf(ptr, sizeof(buffer) - cur_len, "%s ",
                                 parv[i]);
@@ -97,6 +96,4 @@ ms_operspy(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
 
                report_operspy(source_p, parv[1], buffer);
        }
-
-       return 0;
 }