summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2013-10-15 12:04:15 +0200
committerDukePyrolator <DukePyrolator@anope.org>2013-10-26 18:33:07 +0200
commit6cde65a57f60228d15a9d993a31ecf9bf624f592 (patch)
tree89e39eea3f5eadfaef7ce58fc864bd03b44095f1
parent7cb35eeedf5ef4f81492622ded48772b96131635 (diff)
new event OnSetDisplayedHost
-rw-r--r--include/modules.h7
-rw-r--r--src/users.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index f784c9cb8..77cae7aac 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -867,6 +867,11 @@ class CoreExport Module : public Extensible
*/
virtual void OnSetVhost(NickAlias *na) { throw NotImplementedException(); }
+ /** Called when a users host changes
+ * @param u The user
+ */
+ virtual void OnSetDisplayedHost(User *) { throw NotImplementedException(); }
+
/** Called when a memo is sent
* @param source The source of the memo
* @param target The target of the memo
@@ -1093,7 +1098,7 @@ enum Implementation
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, I_OnNickClearCert,
I_OnNickAddCert, I_OnNickEraseCert, I_OnNickInfo, I_OnBotInfo, I_OnCheckAuthentication, I_OnNickUpdate,
- I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnMemoSend, I_OnMemoDel,
+ I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd,
I_OnMLock, I_OnUnMLock, I_OnModuleLoad, I_OnModuleUnload, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, I_OnBotNotice,
I_OnPrivmsg, I_OnLog, I_OnLogMessage, I_OnDnsRequest, I_OnCheckModes, I_OnChannelSync, I_OnSetCorrectModes,
diff --git a/src/users.cpp b/src/users.cpp
index 07aa0fabe..35b3723de 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -136,6 +136,8 @@ void User::SetDisplayedHost(const Anope::string &shost)
Log(this, "host") << "changed vhost to " << shost;
+ FOREACH_MOD(OnSetDisplayedHost, (this));
+
this->UpdateHost();
}