]> 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 7143d7ab394d2eccd4f64e1081570b9a71d78297..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);
@@ -78,11 +82,13 @@ typedef struct
        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;
 
@@ -101,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