- void CleanUser(User* user, bool quitting)
- {
-
- std::set<std::string>* ext;
- if (user->GetExt("m_operprefix",ext))
- {
- // Don't want to announce -mode when they're quitting anyway..
- if (!quitting)
- {
- for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
- {
- ModePair ms = opm->ModeSet(NULL, NULL , v->first, user->nick);
- if (ms.first)
- {
- PushChanMode(v->first, user, true);
- }
- }
- }
- ext->clear();
- delete ext;
- user->Shrink("m_operprefix");
- }
- }
-
- virtual void OnCleanup(int target_type, void* item)
- {
- if (target_type == TYPE_USER)
- {
- User* user = (User*)item;
- CleanUser(user, false);
- }
+ // The user was force joined and OnUserPreJoin() did not run. Set the operprefix now.
+ Modes::ChangeList changelist;
+ changelist.push_add(&opm, memb->user->nick);
+ ServerInstance->Modes.Process(ServerInstance->FakeClient, memb->chan, NULL, changelist);