- virtual ModResult OnUserPreNick(User* user, const std::string &newnick);
-
- /** Called after any PRIVMSG sent from a user.
- * The dest variable contains a User* if target_type is TYPE_USER and a Channel*
- * if target_type is TYPE_CHANNEL.
- * @param user The user sending the message
- * @param dest The target of the message
- * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
- * @param text the text being sent by the user
- * @param status The status being used, e.g. PRIVMSG @#chan has status== '@', 0 to send to everyone.
- * @param exempt_list A list of users to not send to.
- * @param msgtype The message type, MSG_PRIVMSG for PRIVMSGs, MSG_NOTICE for NOTICEs
- */
- virtual void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list, MessageType msgtype);
-
- /** Called immediately before any NOTICE or PRIVMSG sent from a user, local or remote.
- * The dest variable contains a User* if target_type is TYPE_USER and a Channel*
- * if target_type is TYPE_CHANNEL.
- * The difference between this event and OnUserPreMessage is that delivery is gauranteed,
- * the message has already been vetted. In the case of the other two methods, a later module may stop your
- * message. This also differs from OnUserMessage which occurs AFTER the message has been sent.
- * @param user The user sending the message
- * @param dest The target of the message
- * @param target_type The type of target (TYPE_USER or TYPE_CHANNEL)
- * @param text the text being sent by the user
- * @param status The status being used, e.g. NOTICE @#chan has status== '@', 0 to send to everyone.
- * @param exempt_list A list of users not to send to. For channel messages, this will usually contain just the sender.
- */
- virtual void OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list);
+ virtual ModResult OnUserPreNick(LocalUser* user, const std::string& newnick);
+
+ /** Called immediately after a user sends a message to a channel, a user, or a server glob mask.
+ * @param user The user sending the message.
+ * @param target The target of the message. This can either be a channel, a user, or a server
+ * glob mask.
+ * @param details Details about the message such as the message text and type. See the
+ * MessageDetails class for more information.
+ */
+ virtual void OnUserPostMessage(User* user, const MessageTarget& target, const MessageDetails& details);
+
+ /** Called immediately before a user sends a message to a channel, a user, or a server glob mask.
+ * @param user The user sending the message.
+ * @param target The target of the message. This can either be a channel, a user, or a server
+ * glob mask.
+ * @param details Details about the message such as the message text and type. See the
+ * MessageDetails class for more information.
+ */
+ virtual void OnUserMessage(User* user, const MessageTarget& target, const MessageDetails& details);
+
+ /** Called when a message sent by a user to a channel, a user, or a server glob mask is blocked.
+ * @param user The user sending the message.
+ * @param target The target of the message. This can either be a channel, a user, or a server
+ * glob mask.
+ * @param details Details about the message such as the message text and type. See the
+ * MessageDetails class for more information.
+ */
+ virtual void OnUserMessageBlocked(User* user, const MessageTarget& target, const MessageDetails& details);