+ SeeWhois* sw;
+
+ public:
+
+ ModuleShowwhois(InspIRCd* Me) : Module(Me)
+ {
+ sw = NULL;
+ OnRehash(NULL, "");
+ Implementation eventlist[] = { I_OnWhois, I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
+ }
+
+ ~ModuleShowwhois()
+ {
+ ServerInstance->Modes->DelMode(sw);
+ delete sw;
+ }
+
+ virtual Version GetVersion()
+ {
+ return Version("$Id$",VF_COMMON|VF_VENDOR,API_VERSION);
+ }
+
+ virtual void OnRehash(User *user, const std::string ¶meter)
+ {
+ ConfigReader conf(ServerInstance);
+ bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", 0, true);
+
+ if (sw)