From ff85a1f7b4190963db638e8ccd445debfa6365db Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 25 Oct 2003 18:51:49 +0000 Subject: [PATCH] - Added HOOKTYPE_REMOTE_NICKCHANGE (called like: cptr, sptr, newnick). --- Changes | 1 + include/modules.h | 1 + src/s_user.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/Changes b/Changes index e1f6eb999..62f14cfe8 100644 --- a/Changes +++ b/Changes @@ -2499,3 +2499,4 @@ seen. gmtime warning still there - Module coders: changed 'allowed' callback function for umodes&snomasks, from 'aClient *sptr' to 'aClient *sptr, int what'. 'what' will be MODE_ADD if trying to add and MODE_DEL if trying to remove. +- Added HOOKTYPE_REMOTE_NICKCHANGE (called like: cptr, sptr, newnick). diff --git a/include/modules.h b/include/modules.h index 91510c2f4..1a85cc2ec 100644 --- a/include/modules.h +++ b/include/modules.h @@ -463,6 +463,7 @@ int CallCmdoverride(Cmdoverride *ovr, aClient *cptr, aClient *sptr, int parc, ch #define HOOKTYPE_PRE_LOCAL_JOIN 28 #define HOOKTYPE_PRE_LOCAL_KICK 29 #define HOOKTYPE_PRE_LOCAL_TOPIC 30 +#define HOOKTYPE_REMOTE_NICKCHANGE 31 /* Module flags */ #define MODFLAG_NONE 0x0000 diff --git a/src/s_user.c b/src/s_user.c index c31e7872c..abf2b1d87 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1706,6 +1706,8 @@ CMD_FUNC(m_nick) sendto_snomask(SNO_NICKCHANGE, "*** Notice -- %s (%s@%s) has changed his/her nickname to %s", sptr->name, sptr->user->username, sptr->user->realhost, nick); RunHook2(HOOKTYPE_LOCAL_NICKCHANGE, sptr, nick); + } else { + RunHook3(HOOKTYPE_REMOTE_NICKCHANGE, cptr, sptr, nick); } /* * Client just changing his/her nick. If he/she is