class HideOper : public ModeHandler
{
public:
- HideOper(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'H', 0, 0, false, MODETYPE_USER, true) { }
+ HideOper(InspIRCd* Instance, Module* Creator) : ModeHandler(Creator, 'H', PARAM_NONE, MODETYPE_USER)
+ {
+ oper = true;
+ }
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
return MOD_RES_PASSTHRU;
}
+
+ void OnSendWhoLine(User* source, User* user, Channel* channel, std::string& line)
+ {
+ if (user->IsModeSet('H') && !source->HasPrivPermission("users/auspex"))
+ {
+ // hide the "*" that marks the user as an oper from the /WHO line
+ std::string::size_type pos = line.find("* ");
+ if (pos != std::string::npos)
+ line.erase(pos);
+ }
+ }
};