diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/account.h | 23 | ||||
| -rw-r--r-- | include/anope.h | 2 | ||||
| -rw-r--r-- | include/config.h | 6 | ||||
| -rw-r--r-- | include/extern.h | 4 | ||||
| -rw-r--r-- | include/language.h | 1 | ||||
| -rw-r--r-- | include/mail.h | 1 | ||||
| -rw-r--r-- | include/modules.h | 26 | ||||
| -rw-r--r-- | include/services.h | 2 |
8 files changed, 10 insertions, 55 deletions
diff --git a/include/account.h b/include/account.h index b4a792caf..8615083b9 100644 --- a/include/account.h +++ b/include/account.h @@ -5,15 +5,12 @@ class NickAlias; class NickCore; -class NickRequest; typedef unordered_map_namespace::unordered_map<Anope::string, NickAlias *, ci::hash, std::equal_to<ci::string> > nickalias_map; typedef unordered_map_namespace::unordered_map<Anope::string, NickCore *, ci::hash, std::equal_to<ci::string> > nickcore_map; -typedef unordered_map_namespace::unordered_map<Anope::string, NickRequest *, ci::hash, std::equal_to<ci::string> > nickrequest_map; extern CoreExport nickalias_map NickAliasList; extern CoreExport nickcore_map NickCoreList; -extern CoreExport nickrequest_map NickRequestList; /* NickServ nickname structures. */ @@ -85,6 +82,9 @@ enum NickCoreFlag NI_AUTOOP, /* This nickcore is forbidden, which means the nickalias for it is aswell */ NI_FORBIDDEN, + /* If set means the nick core does not have their email addrses confirmed. + */ + NI_UNCONFIRMED, NI_END }; @@ -92,22 +92,7 @@ enum NickCoreFlag const Anope::string NickCoreFlagStrings[] = { "BEGIN", "KILLPROTECT", "SECURE", "MSG", "MEMO_HARDMAX", "MEMO_SIGNON", "MEMO_RECEIVE", "PRIVATE", "HIDE_EMAIL", "HIDE_MASK", "HIDE_QUIT", "KILL_QUICK", "KILL_IMMED", - "MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "" -}; - -class CoreExport NickRequest : public Extensible -{ - public: - NickRequest(const Anope::string &nickname); - - ~NickRequest(); - - Anope::string nick; - Anope::string passcode; - Anope::string password; - Anope::string email; - time_t requested; - time_t lastmail; /* Unsaved */ + "MEMO_MAIL", "HIDE_STATUS", "SUSPENDED", "AUTOOP", "FORBIDDEN", "UNCONFIRMED", "" }; class NickCore; diff --git a/include/anope.h b/include/anope.h index ec1d083a5..8153c976f 100644 --- a/include/anope.h +++ b/include/anope.h @@ -336,7 +336,7 @@ namespace Anope * @param ... any number of parameters * @return a Anope::string */ - extern CoreExport string printf(const char *fmt, ...); + extern CoreExport string printf(const Anope::string &fmt, ...); /** Return the last error, uses errno/GetLastError() to determin this * @return An error message diff --git a/include/config.h b/include/config.h index ef71933ec..f4844ded3 100644 --- a/include/config.h +++ b/include/config.h @@ -601,10 +601,12 @@ class CoreExport ServerConfig time_t NSSuspendExpire; /* How long before forbidden nicks expire */ time_t NSForbidExpire; - /* Time before NickRequests expire */ - time_t NSRExpire; + /* Time before unconfirmed nicks expire */ + time_t NSUnconfirmedExpire; /* Force email when registering */ bool NSForceEmail; + /* Force users to validate new email addresses */ + bool NSConfirmEmailChanges; /* Max number of nicks in a group */ unsigned NSMaxAliases; /* Max number of allowed strings on the access list */ diff --git a/include/extern.h b/include/extern.h index 1e88fbbc7..d670ad331 100644 --- a/include/extern.h +++ b/include/extern.h @@ -232,8 +232,6 @@ E size_t strlcpy(char *, const char *, size_t); #ifndef HAVE_STRLCAT E size_t strlcat(char *, const char *, size_t); #endif -E const char *merge_args(int argc, char **argv); -E const char *merge_args(int argc, const char **argv); E time_t dotime(const Anope::string &s); E Anope::string duration(NickCore *nc, time_t seconds); @@ -277,7 +275,6 @@ E void SetDefaultMLock(ServerConfig *config); /**** nickserv.c ****/ -E NickRequest *findrequestnick(const Anope::string &nick); E void get_aliases_stats(long &count, long &mem); E void get_core_stats(long &count, long &mem); E void change_core_display(NickCore *nc); @@ -287,7 +284,6 @@ E int do_setmodes(User *u); E void ns_init(); E int validate_user(User *u); E void expire_nicks(); -E void expire_requests(); E NickAlias *findnick(const Anope::string &nick); E NickCore *findcore(const Anope::string &nick); E bool is_on_access(const User *u, const NickCore *nc); diff --git a/include/language.h b/include/language.h index c27c99087..5e2cdf9e8 100644 --- a/include/language.h +++ b/include/language.h @@ -61,7 +61,6 @@ #define NICK_RECOVERED "User claiming your nick has been killed.\n" \ "\002%R%s RELEASE %s\002 to get it back before %s timeout." #define NICK_REQUESTED "This nick has already been requested, please check your e-mail address for the pass code" -#define NICK_IS_PREREG "This nick is awaiting an e-mail verification code before completing registration." #define NICK_CONFIRM_INVALID "Invalid passcode has been entered, please check the e-mail again, and retry" #define CHAN_NOT_ALLOWED_TO_JOIN "You are not permitted to be on this channel." #define CHAN_X_INVALID "Channel %s is not a valid channel." diff --git a/include/mail.h b/include/mail.h index c62bfb3be..31f35d92d 100644 --- a/include/mail.h +++ b/include/mail.h @@ -3,7 +3,6 @@ #include "anope.h" -extern CoreExport bool Mail(User *u, NickRequest *nr, BotInfo *service, const Anope::string &subject, const Anope::string &message); extern CoreExport bool Mail(User *u, NickCore *nc, BotInfo *service, const Anope::string &subject, const Anope::string &message); extern CoreExport bool Mail(NickCore *nc, const Anope::string &subject, const Anope::string &message); extern CoreExport bool MailValidate(const Anope::string &email); diff --git a/include/modules.h b/include/modules.h index 5b78584d1..8367b084f 100644 --- a/include/modules.h +++ b/include/modules.h @@ -561,14 +561,6 @@ class CoreExport Module : public Extensible */ virtual EventReturn OnDatabaseReadMetadata(NickAlias *na, const Anope::string &key, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; } - /** Called when nickrequest metadata is read from the database - * @param nr The nickrequest - * @parm key The metadata key - * @param params The params from the database - * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to stop processing - */ - virtual EventReturn OnDatabaseReadMetadata(NickRequest *nr, const Anope::string &key, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; } - /** Called when botinfo metadata is read from the database * @param bi The botinfo * @param key The metadata key @@ -597,12 +589,6 @@ class CoreExport Module : public Extensible */ virtual void OnDatabaseWriteMetadata(void (*WriteMetadata)(const Anope::string &, const Anope::string &), NickAlias *na) { } - /** Called when we are wrting metadata for a nickrequest - * @param WriteMetata A callback function used to insert the metadata - * @param nr The nick request - */ - virtual void OnDatabaseWriteMetadata(void (*WriteMetadata)(const Anope::string &, const Anope::string &), NickRequest *nr) { } - /** Called when we are writing metadata for a botinfo * @param WriteMetata A callback function used to insert the metadata * @param bi The botinfo @@ -884,16 +870,6 @@ class CoreExport Module : public Extensible */ virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) { } - /** called from ns_register.c, after the NickRequest have been created - * @param nr pointer to the NickRequest - */ - virtual void OnMakeNickRequest(NickRequest *nr) { } - - /** called on delnickrequest() - * @param nr pointer to the NickRequest - */ - virtual void OnDelNickRequest(NickRequest *nr) { } - /** called from NickCore::ClearAccess() * @param nc pointer to the NickCore */ @@ -1082,7 +1058,7 @@ enum Implementation I_OnPreNickExpire, I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop, I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended, I_OnDelNick, I_OnDelCore, I_OnChangeCoreDisplay, - I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, + I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, I_OnNickInfo, I_OnFindNick, I_OnFindCore, /* ChanServ */ diff --git a/include/services.h b/include/services.h index 58c512d0b..cc2bdf331 100644 --- a/include/services.h +++ b/include/services.h @@ -448,7 +448,6 @@ template<typename T> inline T convertTo(const Anope::string &s, bool failIfLefto class User; class NickCore; class NickAlias; -class NickRequest; class BotInfo; class ChannelInfo; class Channel; @@ -879,7 +878,6 @@ struct MailInfo FILE *pipe; User *sender; NickCore *recipient; - NickRequest *recip; }; /*************************************************************************/ |
