/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2013 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2018, 2020 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2013-2014, 2016, 2018 Attila Molnar <attilamolnar@hush.com>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
{
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(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))
{
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Provides support for showing text files to users", VF_VENDOR);
+ return Version("Adds support for showing the contents of files to users when they execute a command.", VF_VENDOR);
}
};