]> jfr.im git - solanum.git/blobdiff - include/msg.h
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
[solanum.git] / include / msg.h
index 1d04c0be1314fc9a502c90d8759f3270742f3959..24c25409fdf88199329d93ddeae8b6694484b754 100644 (file)
@@ -28,6 +28,7 @@
 #define INCLUDED_msg_h
 
 #include "config.h"
+#include "msgbuf.h"
 
 struct Client;
 
@@ -44,12 +45,13 @@ typedef enum HandlerType
 }
 HandlerType;
 
-/* struct Client* client_p   - connection message originated from
+/* struct MsgBuf* msgbuf_p   - message buffer (including tags)
+ * struct Client* client_p   - connection message originated from
  * struct Client* source_p   - source of message, may be different from client_p
- * int            parc   - parameter count
- * char*          parv[] - parameter vector
+ * int            parc   - parameter count (from msgbuf_p)
+ * char*          parv[] - parameter vector (from msgbuf_p)
  */
-typedef int (*MessageHandler) (struct Client *, struct Client *, int, const char *[]);
+typedef int (*MessageHandler) (struct MsgBuf *, struct Client *, struct Client *, int, const char *[]);
 
 struct MessageEntry
 {
@@ -64,26 +66,19 @@ struct Message
        unsigned int count;     /* number of times command used */
        unsigned int rcount;    /* number of times command used by server */
        unsigned long bytes;    /* bytes received for this message */
-       unsigned int flags;     /* bit 0 set means that this command is allowed
-                                * to be used only on the average of once per 2
-                                * seconds -SRB
-                                */
+       unsigned int flags;
+
        /* handlers:
         * UNREGISTERED, CLIENT, RCLIENT, SERVER, OPER, LAST
         */
        struct MessageEntry handlers[LAST_HANDLER_TYPE];
 };
 
-#define MFLG_SLOW      0x01    /* executed roughly once per 2s */
-#define MFLG_UNREG     0x02    /* available to unregistered clients */
-
-#define MAXPARA    15
-
 /* generic handlers */
-extern int m_ignore(struct Client *, struct Client *, int, const char **);
-extern int m_not_oper(struct Client *, struct Client *, int, const char **);
-extern int m_registered(struct Client *, struct Client *, int, const char **);
-extern int m_unregistered(struct Client *, struct Client *, int, const char **);
+extern int m_ignore(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+extern int m_not_oper(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+extern int m_registered(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+extern int m_unregistered(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 
 #define mg_ignore { m_ignore, 0 }
 #define mg_not_oper { m_not_oper, 0 }