diff options
Diffstat (limited to 'src/modules/m_operprefix.cpp')
-rw-r--r-- | src/modules/m_operprefix.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp index 4c63e53d1..51281a528 100644 --- a/src/modules/m_operprefix.cpp +++ b/src/modules/m_operprefix.cpp @@ -72,6 +72,20 @@ class ModuleOperPrefixMode : public Module return MOD_RES_PASSTHRU; } + void OnPostJoin(Membership* memb) + { + if ((!IS_LOCAL(memb->user)) || (!memb->user->IsOper()) || (memb->user->IsModeSet(hideopermode))) + return; + + if (memb->hasMode(opm.GetModeChar())) + return; + + // 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); + } + void SetOperPrefix(User* user, bool add) { Modes::ChangeList changelist; |