diff options
-rw-r--r-- | data/nickserv.example.conf | 2 | ||||
-rw-r--r-- | modules/commands/cs_akick.cpp | 6 | ||||
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf index e12d5ec2b..4b383f80e 100644 --- a/data/nickserv.example.conf +++ b/data/nickserv.example.conf @@ -79,7 +79,7 @@ module confirmemailchanges = no /* - * A message sent to users on connect if they use an unregistered nick. + * A message sent to users on connect if they use an unregistered nick. %n will be replaced with the user's nickname. * * This directive is optional. */ diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 03db4c623..327b98b09 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -554,7 +554,11 @@ class CSAKick : public Module mask = autokick->mask; reason = autokick->reason; if (reason.empty()) - reason = Language::Translate(u, Config->GetModule(this)->Get<const Anope::string>("autokickreason").c_str()); + { + reason = Language::Translate(u, Config->GetModule(this)->Get<const Anope::string>("autokickreason").c_str()) + .replace_all_cs("%n", u->nick) + .replace_all_cs("%c", c->name); + } if (reason.empty()) reason = Language::Translate(u, _("User has been banned from the channel")); return EVENT_STOP; diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index ee1049195..5d3579ced 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -400,7 +400,7 @@ class NickServCore : public Module, public NickServService const Anope::string &unregistered_notice = Config->GetModule(this)->Get<const Anope::string>("unregistered_notice"); if (!Config->GetModule("nickserv")->Get<bool>("nonicknameownership") && !unregistered_notice.empty() && !na && !u->Account()) - u->SendMessage(NickServ, unregistered_notice); + u->SendMessage(NickServ, unregistered_notice.replace_all_cs("%n", u->nick)); else if (na && !u->IsIdentified(true)) this->Validate(u); } |