diff options
| author | Adam <Adam@anope.org> | 2011-03-05 17:23:22 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-03-05 17:23:22 -0500 |
| commit | 6fe2d8af973dfb0c81f513e56488e39a4eea2fbf (patch) | |
| tree | 432b93053ef56d1ff98b3193d5768a4ca16d3785 | |
| parent | 90e5d0feaa1646c28cfce45dbde1a914a6f1d62c (diff) | |
Removed nickrequests, instead have unconfirmed registrations. Also made ns_resetpass allow remote-id to get past things such as kill immed.
41 files changed, 365 insertions, 618 deletions
diff --git a/data/example.conf b/data/example.conf index 243dcb725..c797a2f84 100644 --- a/data/example.conf +++ b/data/example.conf @@ -940,6 +940,12 @@ nickserv forceemail = yes /* + * Require users who change their email address to confirm they + * own it. + */ + confirmemailchanges = no + + /* * Require an e-mail to be sent to the user before they can register their nick. */ #emailregistration = yes @@ -1018,12 +1024,12 @@ nickserv #forbidexpire = 90d /* - * The length of time a user gets to enter the confirmation code which has been e-mailed - * to them before the nick will be released for general use again. + * The length of time a user using an unconfirmed account has + * before the account will be released for general use again. * * This directive is only required if the e-mail registration option is enabled. */ - #preregexpire = 1d + #unconfirmedexpire = 1d /* * The maximum number of nicks allowed in a group. diff --git a/data/mysql/tables.sql b/data/mysql/tables.sql index 2cda6384e..b3cf06a00 100644 --- a/data/mysql/tables.sql +++ b/data/mysql/tables.sql @@ -291,21 +291,6 @@ CREATE TABLE IF NOT EXISTS `anope_ns_core_metadata` ( -- -------------------------------------------------------- -- --- Table structure for table `anope_ns_request` --- - -CREATE TABLE IF NOT EXISTS `anope_ns_request` ( - `nick` varchar(255) NOT NULL DEFAULT '', - `passcode` text NOT NULL, - `password` text NOT NULL, - `email` text NOT NULL, - `requested` int(10) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`nick`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- -- Table structure for table `anope_os_akills` -- diff --git a/docs/Changes b/docs/Changes index d23343937..9125a6258 100644 --- a/docs/Changes +++ b/docs/Changes @@ -2,11 +2,17 @@ Anope Version 1.9.4 -------------------- A Automatically set channel founder to the user with the highest access if there is no successor A /chanserv clone command to copy settings from one channel to another. +A /chanserv mode command A Ability for users to delete their own access in channels -A Ability for users with registrations pending to drop their registrations with /nickserv drop A Added support for Plexus 3 A Readded in support for /cs op/deop/etc to op/deop you in all channels A Added support for ngIRCd +A Added LDAP support +A Added live SQL support +A Added support for learning tracking/storing/locking all modes at runtime +A Added m_alias +A Added support for XMLRPC queries +A Added /botserv set msg F Changed the GHOST command to not allow ghosting unidentified users if the RECOVER command exists F Some failed logic in /operserv exception that prevents proper exceptions from being added F Fixed the anope_os_sxlines MySQL table and code to work after restarting diff --git a/docs/Changes.conf b/docs/Changes.conf index c8c9c9719..70e97bb46 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,5 +1,6 @@ Anope Version 1.9.4 ------------------- +** ADDED CONFIGURATION DIRECTIVES ** memoserv:modules added ms_ignore chanserv:modules added cs_clone and cs_mode nickserv:suspendexpire and nickserv:forbidexpire added @@ -7,10 +8,16 @@ chanserv:suspendexpire and chanserv:forbidexpire added module added cs_entrymsg nickserv:modules added ns_ajoin options:nomlock added +log:target added globops +nickserv:confirmemailchanges added + +** MODIFIED CONFIGURATION DIRECTIVES ** +operserv:notifications removed osglobal, osmode, oskick, osakill, ossnline, ossqline, osszline, osnoop, osjupe, getpass, setpass, forbid, drop +renamed nickserv:preregexpire to nickserv:unconfirmedexpire + +** DELETED CONFIGURATION DIRECTIVES ** opertype:commands removed operserv/umode operserv:modules removed os_umode -operserv:notifications removed osglobal, osmode, oskick, osakill, ossnline, ossqline, osszline, osnoop, osjupe, getpass, setpass, forbid, drop -log:target added globops Anope Version 1.9.3 ------------------ 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; }; /*************************************************************************/ diff --git a/modules/core/cs_register.cpp b/modules/core/cs_register.cpp index 34cdc50df..1f1c6e9b2 100644 --- a/modules/core/cs_register.cpp +++ b/modules/core/cs_register.cpp @@ -32,12 +32,10 @@ class CommandCSRegister : public Command Channel *c = findchan(chan); if (readonly) - { source.Reply(_("Sorry, channel registration is temporarily disabled.")); - return MOD_CONT; - } - - if (chan[0] == '&') + else if (u->Account()->HasFlag(NI_UNCONFIRMED)) + source.Reply(_("You must confirm your account before you can register a channel.")); + else if (chan[0] == '&') source.Reply(_("Local channels cannot be registered.")); else if (chan[0] != '#') source.Reply(_(CHAN_SYMBOL_REQUIRED)); diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp index f47f3156a..4dbf864de 100644 --- a/modules/core/db_plain.cpp +++ b/modules/core/db_plain.cpp @@ -22,7 +22,6 @@ enum MDType MD_NONE, MD_NC, MD_NA, - MD_NR, MD_BI, MD_CH }; @@ -52,7 +51,6 @@ static void ReadDatabase(Module *m = NULL) NickCore *nc = NULL; NickAlias *na = NULL; - NickRequest *nr = NULL; BotInfo *bi = NULL; ChannelInfo *ci = NULL; @@ -100,11 +98,6 @@ static void ReadDatabase(Module *m = NULL) na = findnick(params[2]); Type = MD_NA; } - else if (params[0].equals_ci("NR")) - { - nr = findrequestnick(params[1]); - Type = MD_NR; - } else if (params[0].equals_ci("BI")) { bi = findbot(params[1]); @@ -149,20 +142,6 @@ static void ReadDatabase(Module *m = NULL) Log() << "[db_plain]: " << ex.GetReason(); } } - else if (Type == MD_NR && nr) - { - try - { - if (m) - m->OnDatabaseReadMetadata(nr, key, params); - else - FOREACH_RESULT(I_OnDatabaseReadMetadata, OnDatabaseReadMetadata(nr, key, params)); - } - catch (const DatabaseException &ex) - { - Log() << "[db_plain]: " << ex.GetReason(); - } - } else if (Type == MD_BI && bi) { try @@ -292,17 +271,6 @@ static void LoadNickAlias(const std::vector<Anope::string> ¶ms) Log(LOG_DEBUG_2) << "[db_plain}: Loaded nickalias for " << na->nick; } -static void LoadNickRequest(const std::vector<Anope::string> ¶ms) -{ - NickRequest *nr = new NickRequest(params[0]); - nr->passcode = params[1]; - nr->password = params[2]; - nr->email = params[3]; - nr->requested = params[4].is_pos_number_only() ? convertTo<time_t>(params[4]) : 0; - - Log(LOG_DEBUG_2) << "[db_plain]: Loaded nickrequest for " << nr->nick; -} - static void LoadBotInfo(const std::vector<Anope::string> ¶ms) { BotInfo *bi = findbot(params[0]); @@ -480,8 +448,6 @@ class DBPlain : public Module LoadNickCore(otherparams); else if (key.equals_ci("NA")) LoadNickAlias(otherparams); - else if (key.equals_ci("NR")) - LoadNickRequest(otherparams); else if (key.equals_ci("BI")) LoadBotInfo(otherparams); else if (key.equals_ci("CH")) @@ -765,15 +731,6 @@ class DBPlain : public Module db_buffer << "VER 2" << endl; - for (nickrequest_map::const_iterator it = NickRequestList.begin(), it_end = NickRequestList.end(); it != it_end; ++it) - { - NickRequest *nr = it->second; - - db_buffer << "NR " << nr->nick << " " << nr->passcode << " " << nr->password << " " << nr->email << " " << nr->requested << endl; - - FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, nr)); - } - for (nickcore_map::const_iterator nit = NickCoreList.begin(), nit_end = NickCoreList.end(); nit != nit_end; ++nit) { NickCore *nc = nit->second; diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp index e7edcd79a..33a18009d 100644 --- a/modules/core/ns_drop.cpp +++ b/modules/core/ns_drop.cpp @@ -36,30 +36,7 @@ class CommandNSDrop : public Command NickAlias *na = findnick((u->Account() && !nick.empty() ? nick : u->nick)); if (!na) { - NickRequest *nr = findrequestnick(u->Account() && !nick.empty() ? nick : u->nick); - if (nr && u->Account() && u->Account()->IsServicesOper()) - { - Log(LOG_ADMIN, u, this) << "to drop nickname " << nr->nick << " (email: " << nr->email << ")"; - delete nr; - source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str()); - } - else if (nr && !nick.empty()) - { - int res = enc_check_password(nick, nr->password); - if (res) - { - Log(LOG_COMMAND, u, this) << "to drop nick request " << nr->nick; - source.Reply(_("Nickname \002%s\002 has been dropped."), nr->nick.c_str()); - delete nr; - } - else if (bad_password(u)) - return MOD_STOP; - else - source.Reply(_(PASSWORD_INCORRECT)); - } - else - source.Reply(_(NICK_NOT_REGISTERED)); - + source.Reply(_(NICK_NOT_REGISTERED)); return MOD_CONT; } diff --git a/modules/core/ns_getpass.cpp b/modules/core/ns_getpass.cpp index fdd5f2cd0..b034e2ba4 100644 --- a/modules/core/ns_getpass.cpp +++ b/modules/core/ns_getpass.cpp @@ -27,18 +27,9 @@ class CommandNSGetPass : public Command const Anope::string &nick = params[0]; Anope::string tmp_pass; NickAlias *na; - NickRequest *nr = NULL; if (!(na = findnick(nick))) - { - if ((nr = findrequestnick(nick))) - { - Log(LOG_ADMIN, u, this) << "for " << nr->nick; - source.Reply(_("Passcode for %s is \002%s\002."), nick.c_str(), nr->passcode.c_str()); - } - else - source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str()); - } + source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str()); else if (na->HasFlag(NS_FORBIDDEN)) source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); else if (Config->NSSecureAdmins && na->nc->IsServicesOper()) diff --git a/modules/core/ns_group.cpp b/modules/core/ns_group.cpp index 4ab1d112c..e09a4325a 100644 --- a/modules/core/ns_group.cpp +++ b/modules/core/ns_group.cpp @@ -29,12 +29,6 @@ class CommandNSGroup : public Command const Anope::string &nick = params[0]; Anope::string pass = params[1]; - if (Config->NSEmailReg && findrequestnick(u->nick)) - { - source.Reply(_(NICK_REQUESTED)); - return MOD_CONT; - } - if (readonly) { source.Reply(_("Sorry, nickname grouping is temporarily disabled.")); @@ -121,7 +115,8 @@ class CommandNSGroup : public Command u->Login(na->nc); FOREACH_MOD(I_OnNickGroup, OnNickGroup(u, target)); ircdproto->SetAutoIdentificationToken(u); - u->SetMode(NickServ, UMODE_REGISTERED); + if (target->nc->HasFlag(NI_UNCONFIRMED) == false) + u->SetMode(NickServ, UMODE_REGISTERED); Log(LOG_COMMAND, u, this) << "makes " << u->nick << " join group of " << target->nick << " (" << target->nc->display << ") (email: " << (!target->nc->email.empty() ? target->nc->email : "none") << ")"; source.Reply(_("You are now in the group of \002%s\002."), target->nick.c_str()); diff --git a/modules/core/ns_identify.cpp b/modules/core/ns_identify.cpp index 45b189ca6..074adbb76 100644 --- a/modules/core/ns_identify.cpp +++ b/modules/core/ns_identify.cpp @@ -31,13 +31,7 @@ class CommandNSIdentify : public Command NickAlias *na = findnick(nick), *this_na = findnick(u->nick); if (!na) - { - NickRequest *nr = findrequestnick(nick); - if (nr) - source.Reply(_(NICK_IS_PREREG)); - else - source.Reply(_(NICK_NOT_REGISTERED)); - } + source.Reply(_(NICK_NOT_REGISTERED)); else if (na->HasFlag(NS_FORBIDDEN)) source.Reply(_(NICK_X_FORBIDDEN), na->nick.c_str()); else if (na->nc->HasFlag(NI_SUSPENDED)) @@ -72,7 +66,7 @@ class CommandNSIdentify : public Command ircdproto->SendAccountLogin(u, u->Account()); ircdproto->SetAutoIdentificationToken(u); - if (this_na && this_na->nc == na->nc) + if (this_na && this_na->nc == na->nc && this_na->nc->HasFlag(NI_UNCONFIRMED) == false) u->SetMode(NickServ, UMODE_REGISTERED); u->UpdateHost(); @@ -86,7 +80,7 @@ class CommandNSIdentify : public Command FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u)); - if (Config->NSForceEmail && u->Account() && u->Account()->email.empty()) + if (Config->NSForceEmail && u->Account()->email.empty()) { source.Reply(_("You must now supply an e-mail for your nick.\n" "This e-mail will allow you to retrieve your password in\n" @@ -96,6 +90,14 @@ class CommandNSIdentify : public Command "any third-party person."), NickServ->nick.c_str()); } + if (u->Account()->HasFlag(NI_UNCONFIRMED)) + { + source.Reply(_("Your email address is not confirmed. To confirm it, follow the instructions that were emailed to you when you registered.")); + time_t time_registered = Anope::CurTime - na->time_registered; + if (Config->NSUnconfirmedExpire > time_registered) + source.Reply(_("Your account will expire, if not confirmed, in %s"), duration(u->Account(), Config->NSUnconfirmedExpire - time_registered).c_str()); + } + check_memos(u); } } diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp index 52326ddb6..0ac50d471 100644 --- a/modules/core/ns_info.cpp +++ b/modules/core/ns_info.cpp @@ -44,14 +44,7 @@ class CommandNSInfo : public Command if (!na) { - NickRequest *nr = findrequestnick(nick); - if (nr) - { - source.Reply(_(NICK_IS_PREREG)); - if (has_auspex) - source.Reply(_(" E-mail address: %s"), nr->email.c_str()); - } - else if (nickIsServices(nick, true)) + if (nickIsServices(nick, true)) source.Reply(_("Nick \002%s\002 is part of this Network's Services."), nick.c_str()); else source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str()); @@ -120,11 +113,11 @@ class CommandNSInfo : public Command Anope::string optbuf; - CheckOptStr(optbuf, NI_KILLPROTECT, GetString(u->Account(), _("Protection")).c_str(), na->nc); - CheckOptStr(optbuf, NI_SECURE, GetString(u->Account(), _("Security")).c_str(), na->nc); - CheckOptStr(optbuf, NI_PRIVATE, GetString(u->Account(), _("Private")).c_str(), na->nc); - CheckOptStr(optbuf, NI_MSG, GetString(u->Account(), _("Message mode")).c_str(), na->nc); - CheckOptStr(optbuf, NI_AUTOOP, GetString(u->Account(), _("Auto-op")).c_str(), na->nc); + CheckOptStr(optbuf, NI_KILLPROTECT, _("Protection"), na->nc); + CheckOptStr(optbuf, NI_SECURE, _("Security"), na->nc); + CheckOptStr(optbuf, NI_PRIVATE, _("Private"), na->nc); + CheckOptStr(optbuf, NI_MSG, _("Message mode"), na->nc); + CheckOptStr(optbuf, NI_AUTOOP, _("Auto-op"), na->nc); source.Reply(_(NICK_INFO_OPTIONS), optbuf.empty() ? _("None") : optbuf.c_str()); @@ -136,13 +129,21 @@ class CommandNSInfo : public Command source.Reply(_("This nickname is currently suspended")); } - if (na->HasFlag(NS_NO_EXPIRE)) - source.Reply(_("This nickname will not expire.")); + if (na->nc->HasFlag(NI_UNCONFIRMED) == false) + { + if (na->HasFlag(NS_NO_EXPIRE)) + source.Reply(_("This nickname will not expire.")); + else + source.Reply(_("Expires on: %s"), do_strftime(na->last_seen + Config->NSExpire).c_str()); + } else - source.Reply(_("Expires on: %s"), do_strftime(na->last_seen + Config->NSExpi |
