summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h5
-rw-r--r--modules/core/ns_drop.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/include/modules.h b/include/modules.h
index fd032fe87..4532549f1 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -827,9 +827,10 @@ class CoreExport Module : public Extensible
virtual void OnFindChan(const Anope::string &chname) { }
/** Called when a nick is dropped
- * @param nick The nick
+ * @param u The user dropping the nick
+ * @param na The nick
*/
- virtual void OnNickDrop(const Anope::string &nick) { }
+ virtual void OnNickDrop(User *u, NickAlias *na) { }
/** Called when a nick is forbidden
* @param na The nick alias of the forbidden nick
diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp
index 83981fe0e..ae731e255 100644
--- a/modules/core/ns_drop.cpp
+++ b/modules/core/ns_drop.cpp
@@ -89,11 +89,11 @@ class CommandNSDrop : public Command
ircdproto->SendSQLineDel(&x);
}
+ FOREACH_MOD(I_OnNickDrop, OnNickDrop(u, na));
+
Log(!is_mine ? LOG_OVERRIDE : LOG_COMMAND, u, this) << "to drop nickname " << na->nick << " (group: " << na->nc->display << ") (email: " << (!na->nc->email.empty() ? na->nc->email : "none") << ")";
delete na;
- FOREACH_MOD(I_OnNickDrop, OnNickDrop(!my_nick.empty() ? my_nick : nick));
-
if (!is_mine)
{
source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str());