From 2d043de488ea65807b51b35a4436bbbf570ca29c Mon Sep 17 00:00:00 2001 From: peavey Date: Tue, 13 Oct 2009 14:16:16 +0000 Subject: removes unnecessary checks in modules, removes a superfluous else statement, fixes some formatting. Patch by dKingston. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11867 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chghost.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/modules/m_chghost.cpp') diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index fdec5d6d0..7901fad7f 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -24,13 +24,14 @@ class CommandChghost : public Command public: CommandChghost(Module* Creator, char* hmap) : Command(Creator,"CHGHOST", 2), hostmap(hmap) { - flags_needed = 'o'; syntax = " "; + flags_needed = 'o'; + syntax = " "; TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } CmdResult Handle(const std::vector ¶meters, User *user) { - const char * x = parameters[1].c_str(); + const char* x = parameters[1].c_str(); for (; *x; x++) { @@ -40,11 +41,6 @@ class CommandChghost : public Command return CMD_FAILURE; } } - if (parameters[1].empty()) - { - user->WriteServ("NOTICE %s :*** CHGHOST: Host must be specified", user->nick.c_str()); - return CMD_FAILURE; - } if ((parameters[1].c_str() - x) > 63) { -- cgit v1.3.1-10-gc9f91