From: w00t Date: Thu, 23 Oct 2008 21:48:13 +0000 (+0000) Subject: Add setting, requested by MacGyver. Can be useful if you... X-Git-Tag: v2.0.23~2412 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0f41486ecf373cdba78fe170faf48161e92a9b1b;p=user%2Fhenk%2Fcode%2Finspircd.git Add setting, requested by MacGyver. Can be useful if you don't want suspicious people to know you're watching them. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10696 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/conf/modules.conf.example b/conf/modules.conf.example index 67d17fbfc..4a7e05096 100644 --- a/conf/modules.conf.example +++ b/conf/modules.conf.example @@ -1376,7 +1376,11 @@ # users/auspex priv will see real hosts of people, though. This setting # is not reloadable via /rehash, and will require /reloadmodule, as # it directly affects the mode object itself. -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Shun module: Provides the /shun command, which stops a user executing diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index fac5d124e..f4b7cec46 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -47,7 +47,7 @@ class SeeWhois : public ModeHandler class ModuleShowwhois : public Module { - + bool ShowWhoisFromOpers; SeeWhois* sw; public: @@ -56,6 +56,7 @@ class ModuleShowwhois : public Module { ConfigReader conf(ServerInstance); bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", 0, true); + ShowWhoisFromOpers = conf.ReadFlag("showwhois", "showfromopers", 0, true); sw = new SeeWhois(ServerInstance, OpersOnly); if (!ServerInstance->Modes->AddMode(sw)) @@ -79,6 +80,9 @@ class ModuleShowwhois : public Module { if ((dest->IsModeSet('W')) && (source != dest)) { + if (!ShowWhoisFromOpers && IS_OPER(source)) + return; + std::string wmsg = "*** "; wmsg += source->nick + "(" + source->ident + "@";