X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showwhois.cpp;h=ffbc784a8c880222e7854c6dcbd8c55e8f4f5c84;hb=495ea4be05859f46cbf99c10541210fa3590f01a;hp=fac5d124e1bf5f02cb45cd3cd65acad8600c2ab3;hpb=b928aff22f8f9a458df9aa73a0c6b22b979101bc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index fac5d124e..ffbc784a8 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -47,7 +47,7 @@ class SeeWhois : public ModeHandler class ModuleShowwhois : public Module { - + bool ShowWhoisFromOpers; SeeWhois* sw; public: @@ -55,7 +55,8 @@ class ModuleShowwhois : public Module ModuleShowwhois(InspIRCd* Me) : Module(Me) { ConfigReader conf(ServerInstance); - bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", 0, true); + bool OpersOnly = conf.ReadFlag("showwhois", "opersonly", "yes", 0); + ShowWhoisFromOpers = conf.ReadFlag("showwhois", "showfromopers", "yes", 0); 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 + "@"; @@ -99,7 +103,7 @@ class ModuleShowwhois : public Module } else { - std::string msg = std::string(":") + dest->server + " NOTICE " + dest->nick + " :" + wmsg; + std::string msg = std::string("::") + dest->server + " NOTICE " + dest->nick + " :" + wmsg; ServerInstance->PI->PushToClient(dest, msg); } }