mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-04 14:13:13 +02:00
HOOKTYPE_*_CHANGED -> HOOKTYPE_*_CHANGE to be a bit more consistent with
the rest of the hooks, most of which do not use the past tense. Only affects HOOKTYPE_USERHOST_CHANGE / HOOKTYPE_REALNAME_CHANGE. This does, however, make it inconsistent with the userhost_changed() call, though :D.
This commit is contained in:
+8
-8
@@ -1151,10 +1151,10 @@ extern void SavePersistentLongX(ModuleInfo *modinfo, const char *varshortname, l
|
||||
#define HOOKTYPE_POST_LOCAL_NICKCHANGE 106
|
||||
/** See hooktype_post_remote_nickchange() */
|
||||
#define HOOKTYPE_POST_REMOTE_NICKCHANGE 107
|
||||
/** See hooktype_userhost_changed() */
|
||||
#define HOOKTYPE_USERHOST_CHANGED 108
|
||||
/** See hooktype_realname_changed() */
|
||||
#define HOOKTYPE_REALNAME_CHANGED 109
|
||||
/** See hooktype_userhost_change() */
|
||||
#define HOOKTYPE_USERHOST_CHANGE 108
|
||||
/** See hooktype_realname_change() */
|
||||
#define HOOKTYPE_REALNAME_CHANGE 109
|
||||
/** See hooktype_can_set_topic() */
|
||||
#define HOOKTYPE_CAN_SET_TOPIC 110
|
||||
/** See hooktype_ip_change() */
|
||||
@@ -2129,14 +2129,14 @@ int hooktype_post_remote_nickchange(Client *client, MessageTag *mtags, const cha
|
||||
* @param oldhost Old hostname of the client
|
||||
* @return The return value is ignored (use return 0)
|
||||
*/
|
||||
int hooktype_userhost_changed(Client *client, const char *olduser, const char *oldhost);
|
||||
int hooktype_userhost_change(Client *client, const char *olduser, const char *oldhost);
|
||||
|
||||
/** Called when user realname has changed.
|
||||
* @param client The client whose realname has changed
|
||||
* @param oldinfo Old realname of the client
|
||||
* @return The return value is ignored (use return 0)
|
||||
*/
|
||||
int hooktype_realname_changed(Client *client, const char *oldinfo);
|
||||
int hooktype_realname_change(Client *client, const char *oldinfo);
|
||||
|
||||
/** Called when changing IP (eg due to PROXY/WEBIRC/etc).
|
||||
* @param client The client whose IP has changed
|
||||
@@ -2257,8 +2257,8 @@ _UNREAL_ERROR(_hook_error_incompatible, "Incompatible hook function. Check argum
|
||||
((hooktype == HOOKTYPE_IS_INVITED) && !ValidateHook(hooktype_is_invited, func)) || \
|
||||
((hooktype == HOOKTYPE_POST_LOCAL_NICKCHANGE) && !ValidateHook(hooktype_post_local_nickchange, func)) || \
|
||||
((hooktype == HOOKTYPE_POST_REMOTE_NICKCHANGE) && !ValidateHook(hooktype_post_remote_nickchange, func)) || \
|
||||
((hooktype == HOOKTYPE_USERHOST_CHANGED) && !ValidateHook(hooktype_userhost_changed, func)) || \
|
||||
((hooktype == HOOKTYPE_REALNAME_CHANGED) && !ValidateHook(hooktype_realname_changed, func)) || \
|
||||
((hooktype == HOOKTYPE_USERHOST_CHANGE) && !ValidateHook(hooktype_userhost_change, func)) || \
|
||||
((hooktype == HOOKTYPE_REALNAME_CHANGE) && !ValidateHook(hooktype_realname_change, func)) || \
|
||||
((hooktype == HOOKTYPE_IP_CHANGE) && !ValidateHook(hooktype_ip_change, func)) ) \
|
||||
_hook_error_incompatible();
|
||||
#endif /* GCC_TYPECHECKING */
|
||||
|
||||
@@ -219,7 +219,7 @@ void _userhost_changed(Client *client)
|
||||
}
|
||||
}
|
||||
|
||||
RunHook(HOOKTYPE_USERHOST_CHANGED, client, remember_user, remember_host);
|
||||
RunHook(HOOKTYPE_USERHOST_CHANGE, client, remember_user, remember_host);
|
||||
|
||||
if (MyUser(client))
|
||||
{
|
||||
|
||||
@@ -26,8 +26,8 @@ long CAP_EXTENDED_MONITOR = 0L;
|
||||
|
||||
int extended_monitor_away(Client *client, MessageTag *mtags, const char *reason, int already_as_away);
|
||||
int extended_monitor_account_login(Client *client, MessageTag *mtags);
|
||||
int extended_monitor_userhost_changed(Client *client, const char *olduser, const char *oldhost);
|
||||
int extended_monitor_realname_changed(Client *client, const char *oldinfo);
|
||||
int extended_monitor_userhost_change(Client *client, const char *olduser, const char *oldhost);
|
||||
int extended_monitor_realname_change(Client *client, const char *oldinfo);
|
||||
int extended_monitor_notification(Client *client, Watch *watch, Link *lp, int event);
|
||||
|
||||
ModuleHeader MOD_HEADER
|
||||
@@ -59,8 +59,8 @@ MOD_INIT()
|
||||
|
||||
HookAdd(modinfo->handle, HOOKTYPE_AWAY, 0, extended_monitor_away);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_ACCOUNT_LOGIN, 0, extended_monitor_account_login);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_USERHOST_CHANGED, 0, extended_monitor_userhost_changed);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_REALNAME_CHANGED, 0, extended_monitor_realname_changed);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_USERHOST_CHANGE, 0, extended_monitor_userhost_change);
|
||||
HookAdd(modinfo->handle, HOOKTYPE_REALNAME_CHANGE, 0, extended_monitor_realname_change);
|
||||
|
||||
return MOD_SUCCESS;
|
||||
}
|
||||
@@ -95,13 +95,13 @@ int extended_monitor_account_login(Client *client, MessageTag *mtags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extended_monitor_userhost_changed(Client *client, const char *olduser, const char *oldhost)
|
||||
int extended_monitor_userhost_change(Client *client, const char *olduser, const char *oldhost)
|
||||
{
|
||||
watch_check(client, WATCH_EVENT_USERHOST, extended_monitor_notification);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int extended_monitor_realname_changed(Client *client, const char *oldinfo)
|
||||
int extended_monitor_realname_change(Client *client, const char *oldinfo)
|
||||
{
|
||||
watch_check(client, WATCH_EVENT_REALNAME, extended_monitor_notification);
|
||||
return 0;
|
||||
|
||||
@@ -158,5 +158,5 @@ CMD_FUNC(cmd_setname)
|
||||
}
|
||||
free_message_tags(mtags);
|
||||
|
||||
RunHook(HOOKTYPE_REALNAME_CHANGED, client, oldinfo);
|
||||
RunHook(HOOKTYPE_REALNAME_CHANGE, client, oldinfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user