]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix some incorrect conditions in the showfile module.
authorPeter Powell <petpow@saberuk.com>
Sat, 24 Nov 2018 19:03:55 +0000 (19:03 +0000)
committerPeter Powell <petpow@saberuk.com>
Sat, 24 Nov 2018 19:03:55 +0000 (19:03 +0000)
Thanks to @genius3000 for pointing this out.

src/modules/m_showfile.cpp

index 3c1c77f0b893584ee86a17015e7862e2b4248f8a..150b43ebcb9cf73d2900468a496313d20f021c89 100644 (file)
@@ -55,13 +55,13 @@ class CommandShowFile : public Command
        {
                if (method == SF_NUMERIC)
                {
-                       if (!introtext.empty() || !intronumeric)
+                       if (!introtext.empty() && intronumeric)
                                user->WriteRemoteNumeric(intronumeric, introtext);
 
                        for (file_cache::const_iterator i = contents.begin(); i != contents.end(); ++i)
                                user->WriteRemoteNumeric(textnumeric, InspIRCd::Format("- %s", i->c_str()));
 
-                       if (!endtext.empty() || !endnumeric)
+                       if (!endtext.empty() && endnumeric)
                                user->WriteRemoteNumeric(endnumeric, endtext.c_str());
                }
                else if (IS_LOCAL(user))