]> jfr.im git - solanum.git/blobdiff - include/hook.h
override: only engage override code if we're needing to authorize a WRITE to a channe...
[solanum.git] / include / hook.h
index 120fe7c26834913672a0b6d2ec48a8d60804a2fd..c2bf69e8992f5930f3a3403335c2b21000125e63 100644 (file)
@@ -30,6 +30,10 @@ 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;
+extern int h_conf_read_start;
+extern int h_conf_read_end;
 
 void init_hook(void);
 int register_hook(const char *name);
@@ -75,13 +79,16 @@ typedef struct
 {
        struct Client *client;
        struct Channel *chptr;
+       struct membership *msptr;
        struct Client *target;
        int approved;
+       int dir;
 } hook_data_channel_approval;
 
 typedef struct
 {
        struct Client *client;
+       struct Client *target;
        int approved;
 } hook_data_client_approval;
 
@@ -100,4 +107,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