m_maphide Ignore unregistered users

Fixes #400 reported by @SaberUK
This commit is contained in:
attilamolnar 2013-01-13 23:33:20 +01:00
parent fd4b74357b
commit 61dcf0d999

View File

@ -39,7 +39,7 @@ class ModuleMapHide : public Module
ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, LocalUser *user, bool validated, const std::string &original_line)
{
if (!IS_OPER(user) && !url.empty() && (command == "MAP" || command == "LINKS"))
if (validated && !IS_OPER(user) && !url.empty() && (command == "MAP" || command == "LINKS"))
{
user->WriteServ("NOTICE %s :/%s has been disabled; visit %s", user->nick.c_str(), command.c_str(), url.c_str());
return MOD_RES_DENY;