* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
class ModuleHideOper : public Module
{
-
- HideOper* hm;
+ HideOper hm;
public:
ModuleHideOper(InspIRCd* Me)
- : Module(Me)
+ : Module(Me), hm(Me)
{
- hm = new HideOper(ServerInstance);
- if (!ServerInstance->Modes->AddMode(hm))
+ if (!ServerInstance->Modes->AddMode(&hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine };
ServerInstance->Modules->Attach(eventlist, this, 1);
virtual ~ModuleHideOper()
{
- ServerInstance->Modes->DelMode(hm);
- delete hm;
+ ServerInstance->Modes->DelMode(&hm);
}
virtual Version GetVersion()
if (!dest->IsModeSet('H'))
return 0;
- if (user->HasPrivPermission("users/auspex"))
+ if (!user->HasPrivPermission("users/auspex"))
return 1;
return 0;