1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 03:23:12 +02:00

Add "CAP chghost" support. Internal recode of userhost changes.

Fix force-rejoin not working if doing SVSMODE -x/+x (Koragg, #5015).

Note to module coders:
Please use the following procedure in case of an user/host change:
* userhost_save_current(acptr);
* << change username or hostname here (or both) >>
* userhost_changed(acptr);
This function will take care of notifying other clients about
the userhost change, such as doing PART+JOIN+MODE if force-rejoin
is enabled, and sending :xx CHGHOST user host messages to
"CAP chghost" capable clients.

Also, small note to everyone:
If force-rejoin is enabled we will not send the PART+JOIN+MODE to
"CAP chghost" capable clients. Doing so is just a hack to notify
people of a userhost change. "CAP chghost" users can thus benefit
from the reduced noise in this respect.
This commit is contained in:
Bram Matthys
2017-10-07 13:31:30 +02:00
parent 0fd265349a
commit 5124e60b7c
15 changed files with 251 additions and 153 deletions
+5 -1
View File
@@ -132,6 +132,8 @@ void (*send_moddata_channel)(aClient *srv, aChannel *chptr);
void (*send_moddata_members)(aClient *srv);
void (*broadcast_moddata_client)(aClient *acptr);
int (*match_user)(char *rmask, aClient *acptr, int options);
void (*userhost_changed)(aClient *sptr);
void (*userhost_save_current)(aClient *sptr);
static const EfunctionsList efunction_table[MAXEFUNCTIONS] = {
/* 00 */ {NULL, NULL},
@@ -188,7 +190,9 @@ static const EfunctionsList efunction_table[MAXEFUNCTIONS] = {
/* 51 */ {"send_moddata_members", (void *)&send_moddata_members},
/* 52 */ {"broadcast_moddata_client", (void *)&broadcast_moddata_client},
/* 53 */ {"match_user", (void *)&match_user},
/* 54 */ {NULL, NULL}
/* 54 */ {"userhost_save_current", (void *)&userhost_save_current},
/* 55 */ {"userhost_changed", (void *)&userhost_changed},
/* 56 */ {NULL, NULL}
};
#ifdef UNDERSCORE