]> jfr.im git - solanum.git/blobdiff - include/hook.h
Complain to opers if a server that isn't a service tries to SU/RSFNC/NICKDELAY/SVSLOGIN.
[solanum.git] / include / hook.h
index 120fe7c26834913672a0b6d2ec48a8d60804a2fd..7ab954fd0dd9b839db39044706261aa674aeafe7 100644 (file)
@@ -30,6 +30,8 @@ extern int h_new_local_user;
 extern int h_new_remote_user;
 extern int h_introduce_client;
 extern int h_can_kick;
+extern int h_privmsg_channel;
+extern int h_privmsg_user;
 
 void init_hook(void);
 int register_hook(const char *name);
@@ -75,6 +77,7 @@ typedef struct
 {
        struct Client *client;
        struct Channel *chptr;
+       struct membership *msptr;
        struct Client *target;
        int approved;
 } hook_data_channel_approval;
@@ -100,4 +103,29 @@ typedef struct
        unsigned int oldsnomask;
 } hook_data_umode_changed;
 
+enum message_type {
+       MESSAGE_TYPE_NOTICE,
+       MESSAGE_TYPE_PRIVMSG,
+       MESSAGE_TYPE_PART,
+       MESSAGE_TYPE_COUNT
+};
+
+typedef struct
+{
+       enum message_type msgtype;
+       struct Client *source_p;
+       struct Channel *chptr;
+       const char *text;
+       int approved;
+} hook_data_privmsg_channel;
+
+typedef struct
+{
+       enum message_type msgtype;
+       struct Client *source_p;
+       struct Client *target_p;
+       const char *text;
+       int approved;
+} hook_data_privmsg_user;
+
 #endif