From e6a02003f55fa53cd3691eabfefba53dcf9443f1 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Wed, 22 Mar 2017 08:25:03 +0100 Subject: [PATCH] Delayjoin (chanmode +D): When people are de-oped we now part 'hidden' users. Prevents client desynch. --- src/modules/chanmodes/delayjoin.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/modules/chanmodes/delayjoin.c b/src/modules/chanmodes/delayjoin.c index b948cba68..9804b0c62 100644 --- a/src/modules/chanmodes/delayjoin.c +++ b/src/modules/chanmodes/delayjoin.c @@ -299,6 +299,28 @@ DLLFUNC int moded_chanmode(aClient *cptr, aClient *sptr, aChannel *chptr, } } + if (pm.what == MODE_DEL && (pm.modechar == 'o' || pm.modechar == 'h' || pm.modechar == 'a' || pm.modechar == 'q' || pm.modechar == 'v')) + { + Member* i; + aClient* user = find_client(pm.param,NULL); + if (!user) + continue; + + if (moded_user_invisible(user,chptr)) + clear_user_invisible_announce(chptr,user); + + if (pm.modechar == 'v' || !MyConnect(user)) + continue; + + for (i = chptr->members; i; i = i->next) + { + if (i->cptr == user) + continue; + if (moded_user_invisible(i->cptr,chptr)) + sendto_one(user,":%s!%s@%s PART :%s", i->cptr->name, i->cptr->user->username, GetHost(i->cptr), chptr->chname); + } + + } } }