diff --git a/docs/Changes b/docs/Changes index 0e9cca93d..7f9d83ea6 100644 --- a/docs/Changes +++ b/docs/Changes @@ -1,5 +1,6 @@ Anope Version 1.9.3 -------------------- +A Tell users when their nicks expire in /ns glist and /ns info Anope Version 1.9.2 -------------------- diff --git a/lang/cat.l b/lang/cat.l index 6f2c72183..4e090e340 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -807,9 +807,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicknames en el grup. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/de.l b/lang/de.l index 4062e0069..1117a23e7 100644 --- a/lang/de.l +++ b/lang/de.l @@ -825,9 +825,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d Nicknamen in der Gruppe. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (wird in %s auslaufen) + %s (wird in %s auslaufen) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/en_us.l b/lang/en_us.l index 56fbb8d08..ae526f50a 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -790,9 +790,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicknames in the group. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/es.l b/lang/es.l index f5e0d874f..d9b7aa96d 100644 --- a/lang/es.l +++ b/lang/es.l @@ -810,9 +810,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicknames en el grupo. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/fr.l b/lang/fr.l index 2fe9bbf4f..135def102 100644 --- a/lang/fr.l +++ b/lang/fr.l @@ -817,9 +817,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d pseudos dans le groupe. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expire le %s) + %s (expire le %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/gr.l b/lang/gr.l index f262b7618..f2d53f83a 100644 --- a/lang/gr.l +++ b/lang/gr.l @@ -805,9 +805,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d øåõäþíõìá ìÝóá óôçí ïìÜäá. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/hun.l b/lang/hun.l index 2a2bf0ea8..70b8cc831 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -802,9 +802,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicknév van a csoportban. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER válaszok NICK_RECOVER_SYNTAX diff --git a/lang/it.l b/lang/it.l index f2d7335d1..38bb5edb0 100644 --- a/lang/it.l +++ b/lang/it.l @@ -792,9 +792,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nick nel gruppo. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (scade tra %s) + %s (scade tra %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/nl.l b/lang/nl.l index 38b42ffaa..f0824c95c 100644 --- a/lang/nl.l +++ b/lang/nl.l @@ -809,9 +809,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicks in de groep. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/pl.l b/lang/pl.l index 341f57a63..e14b387fd 100644 --- a/lang/pl.l +++ b/lang/pl.l @@ -1019,10 +1019,10 @@ NICK_GLIST_FOOTER %d nicków w grupie. NICK_GLIST_REPLY - %c%s + %s (wygasa za %s) -NICK_GLIST_REPLY_ADMIN - %c%s (wygasa za %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/pt.l b/lang/pt.l index 2142db2f6..44231b0c6 100644 --- a/lang/pt.l +++ b/lang/pt.l @@ -811,9 +811,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER %d nicks no grupo. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expira em %s) + %s (expira em %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/ru.l b/lang/ru.l index d469b112b..186970c09 100644 --- a/lang/ru.l +++ b/lang/ru.l @@ -792,9 +792,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER Êîëè÷åñòâî íèêîâ â ãðóïïå: %d NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (èñòåêàåò %s) + %s (èñòåêàåò %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/lang/tr.l b/lang/tr.l index d73525d08..f9bf95066 100644 --- a/lang/tr.l +++ b/lang/tr.l @@ -812,9 +812,9 @@ NICK_GLIST_HEADER_X NICK_GLIST_FOOTER Grupta %d nick var. NICK_GLIST_REPLY - %c%s -NICK_GLIST_REPLY_ADMIN - %c%s (expires in %s) + %s (expires in %s) +NICK_GLIST_REPLY_NOEXPIRE + %s (does not expire) # RECOVER responses NICK_RECOVER_SYNTAX diff --git a/src/core/ns_group.c b/src/core/ns_group.c index 2aa47ac1f..dab27af27 100644 --- a/src/core/ns_group.c +++ b/src/core/ns_group.c @@ -182,16 +182,14 @@ class CommandNSGList : public Command for (i = 0; i < nc->aliases.count; ++i) { NickAlias *na2 = static_cast(nc->aliases.list[i]); - if (na2->nc == nc) + + if (!(wont_expire = na2->HasFlag(NS_NO_EXPIRE))) { - if (!(wont_expire = na2->HasFlag(NS_NO_EXPIRE))) - { - expt = na2->last_seen + Config.NSExpire; - tm = localtime(&expt); - strftime_lang(buf, sizeof(buf), finduser(na2->nick), STRFTIME_DATE_TIME_FORMAT, tm); - } - notice_lang(Config.s_NickServ, u, u->Account()->IsServicesOper() && !wont_expire ? NICK_GLIST_REPLY_ADMIN : NICK_GLIST_REPLY, wont_expire ? '!' : ' ', na2->nick, buf); + expt = na2->last_seen + Config.NSExpire; + tm = localtime(&expt); + strftime_lang(buf, sizeof(buf), finduser(na2->nick), STRFTIME_DATE_TIME_FORMAT, tm); } + notice_lang(Config.s_NickServ, u, wont_expire ? NICK_GLIST_REPLY_NOEXPIRE : NICK_GLIST_REPLY, na2->nick, buf); } notice_lang(Config.s_NickServ, u, NICK_GLIST_FOOTER, nc->aliases.count); } diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 0635e52df..421d33f97 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -171,13 +171,10 @@ class CommandNSInfo : public Command notice_lang(Config.s_NickServ, u, NICK_INFO_NO_EXPIRE); else { - if (u->Account()->IsServicesOper()) - { - expt = na->last_seen + Config.NSExpire; - tm = localtime(&expt); - strftime_lang(buf, sizeof(buf), finduser(na->nick), STRFTIME_DATE_TIME_FORMAT, tm); - notice_lang(Config.s_NickServ, u, NICK_INFO_EXPIRE, buf); - } + expt = na->last_seen + Config.NSExpire; + tm = localtime(&expt); + strftime_lang(buf, sizeof(buf), finduser(na->nick), STRFTIME_DATE_TIME_FORMAT, tm); + notice_lang(Config.s_NickServ, u, NICK_INFO_EXPIRE, buf); } }