- /* Now it's the same idea, except for the target */
- if (target->GetExt("cm_protect_"+std::string(channel->name)))
- targetprivs = std::string("&");
- if (target->GetExt("cm_founder_"+std::string(channel->name)))
- targetprivs = std::string("~");
+ /* This is adding support for the +q and +a channel modes, basically if they are enabled, and the remover has them set. */
+ /* Then we change the @|%|+ to & if they are +a, or ~ if they are +q */
+ if (user->GetExt("cm_protect_"+std::string(channel->name)))
+ privs = std::string("&");
+ if (user->GetExt("cm_founder_"+std::string(channel->name)))
+ privs = std::string("~");
+
+ /* Now it's the same idea, except for the target */
+ if (target->GetExt("cm_protect_"+std::string(channel->name)))
+ targetprivs = std::string("&");
+ if (target->GetExt("cm_founder_"+std::string(channel->name)))
+ targetprivs = std::string("~");
+
+ tlevel = chartolevel(targetprivs);
+ ulevel = chartolevel(privs);