]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/nickserv.h
Added authserv advanced option also added autohide to the help file, seems someone...
[irc/evilnet/x3.git] / src / nickserv.h
index 93d66fb172efdab09bd880777fcb0f330fd5bbf8..68521e13808b18bb27541467ba364af4d24b870c 100644 (file)
@@ -3,7 +3,7 @@
  *
  * This file is part of x3.
  *
- * srvx is free software; you can redistribute it and/or modify
+ * x3 is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
@@ -39,15 +39,20 @@ struct svccmd;
 #define HI_FLAG_NETWORK_HELPER 0x00000100
 #define HI_FLAG_BOT            0x00000200
 #define HI_FLAG_AUTOHIDE       0x00000400
+#define HI_FLAG_ADVANCED       0x00000800
 /* Flag characters for the above.  First char is LSB, etc. */
 #define HANDLE_FLAGS "SphgscfnHbx"
 
 /* HI_STYLE_* go into handle_info.userlist_style */
-#define HI_STYLE_DEF          'd'
-#define HI_STYLE_ZOOT         'Z'
+#define HI_STYLE_NORMAL               'n'
+#define HI_STYLE_CLEAN        'c'
+#define HI_STYLE_ADVANCED      'a'
+#define HI_STYLE_CLASSIC       'k'
 
 #define HI_DEFAULT_FLAGS       (HI_FLAG_MIRC_COLOR)
-#define HI_DEFAULT_STYLE       HI_STYLE_DEF
+
+/* This is overridden by conf file */
+#define HI_DEFAULT_STYLE       HI_STYLE_NORMAL
 
 #define HANDLE_FLAGGED(hi, tok) ((hi)->flags & HI_FLAG_##tok)
 #define HANDLE_SET_FLAG(hi, tok) ((hi)->flags |= HI_FLAG_##tok)
@@ -76,12 +81,20 @@ struct handle_cookie {
     char cookie[COOKIELEN+1];
 };
 
+struct handle_note {
+    char            setter[NICKSERV_HANDLE_LEN+1];
+    time_t          date;
+    char            note[1];
+};
+
 struct handle_info {
     struct nick_info *nicks;
     struct string_list *masks;
+    struct string_list *ignores;
     struct userNode *users;
     struct userData *channels;
     struct handle_cookie *cookie;
+    struct handle_note *note;
     struct language *language;
     char *email_addr;
     char *epithet;
@@ -131,6 +144,11 @@ void nickserv_show_oper_accounts(struct userNode *user, struct svccmd *cmd);
 
 struct handle_info *loc_auth(char *handle, char *password);
 
+typedef void (*user_mode_func_t)(struct userNode *user, const char *mode_change);
+void reg_user_mode_func(user_mode_func_t func);
+typedef void (*channel_mode_func_t)(struct userNode *who, struct chanNode *channel, char **mode, unsigned int argc);
+void reg_channel_mode_func(channel_mode_func_t func);
+
 /* auth_funcs are called when a user gets a new handle_info.  They are
  * called *after* user->handle_info has been updated.  */
 typedef void (*auth_func_t)(struct userNode *user, struct handle_info *old_handle);