X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showfile.cpp;h=150b43ebcb9cf73d2900468a496313d20f021c89;hb=8ec9a73a91ad1c7009fd3055fbad7c980b5e1732;hp=99c54514007fcd615d1c39556e3e2d38b741d5a7;hpb=b2ac8cc0a6405946a388b80df3be21bc276a61f3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 99c545140..150b43ebc 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -55,13 +55,14 @@ class CommandShowFile : public Command { if (method == SF_NUMERIC) { - if (!introtext.empty()) + 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())); - user->WriteRemoteNumeric(endnumeric, endtext.c_str()); + if (!endtext.empty() && endnumeric) + user->WriteRemoteNumeric(endnumeric, endtext.c_str()); } else if (IS_LOCAL(user)) {