- Ptr->SetPrefix(user, status, mh->GetPrefixRank(), true);
- /* Make sure that the mode handler knows this mode was now set */
- mh->OnModeChange(dummyuser, dummyuser, Ptr, nick, true);
-
- switch (mh->GetPrefix())
- {
- /* These logic ops are SAFE IN THIS CASE
- * because if the entry doesnt exist,
- * addressing operator[] creates it.
- * If they do exist, it points to it.
- * At all other times where we dont want
- * to create an item if it doesnt exist, we
- * must stick to ::find().
- */
- case '@':
- user->chans[Ptr] |= UCMODE_OP;
- break;
- case '%':
- user->chans[Ptr] |= UCMODE_HOP;
- break;
- case '+':
- user->chans[Ptr] |= UCMODE_VOICE;
- break;
- }
+ /* Set, and make sure that the mode handler knows this mode was now set */
+ Ptr->SetPrefix(user, mh->GetModeChar(), true);
+ mh->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, Ptr, nick, true);