]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/nickserv.h
Fix for "whats the color" 8ball question formats
[irc/evilnet/x3.git] / src / nickserv.h
index 490382af4a3eb6df6690f9c8a31ee1504b01e234..206ad0e5d49612dfede145fb6aa89af58cc41d81 100644 (file)
@@ -41,9 +41,10 @@ struct svccmd;
 #define HI_FLAG_NETWORK_HELPER 0x00000100
 #define HI_FLAG_BOT            0x00000200
 #define HI_FLAG_AUTOHIDE       0x00000400
-#define HI_FLAG_ADVANCED       0x00000800
+#define HI_FLAG_IMPERSONATE    0x00000800
+#define HI_FLAG_ADVANCED       0x00001000
 /* Flag characters for the above.  First char is LSB, etc. */
-#define HANDLE_FLAGS "SphgscfnHbx"
+#define HANDLE_FLAGS "SphgscfnHbxI"
 
 /* HI_STYLE_* go into handle_info.userlist_style */
 #define HI_STYLE_NORMAL               'n'
@@ -122,6 +123,8 @@ struct nick_info {
     struct handle_info *owner;
     struct nick_info *next; /* next nick owned by same handle */
     char nick[NICKLEN+1];
+    time_t registered;
+    time_t lastseen;
 };
 
 struct handle_info_list {
@@ -151,6 +154,7 @@ struct nickserv_config {
     unsigned int warn_nick_owned : 1;
     unsigned int warn_clone_auth : 1;
     unsigned int sync_log : 1;
+    unsigned int expire_nicks : 1;
     unsigned long nicks_per_handle;
     unsigned long password_min_length;
     unsigned long password_min_digits;
@@ -169,6 +173,8 @@ struct nickserv_config {
     unsigned long set_fakehost_level;
     unsigned long handles_per_email;
     unsigned long email_search_level;
+    unsigned long nick_expire_frequency;
+    unsigned long nick_expire_delay;
     const char *network_name;
     const char *titlehost_suffix;
     regex_t valid_handle_regex;
@@ -223,6 +229,8 @@ int nickserv_modify_handle_flags(struct userNode *user, struct userNode *bot, co
 int oper_has_access(struct userNode *user, struct userNode *bot, unsigned int min_level, unsigned int quiet);
 void nickserv_show_oper_accounts(struct userNode *user, struct svccmd *cmd);
 
+void nickserv_do_autoauth(struct userNode *user);
+
 struct handle_info *get_victim_oper(struct userNode *user, const char *target);
 struct handle_info *loc_auth(char *sslfp, char *handle, char *password, char *userhost);