]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Patch: /rehash (not /rehash ssl) will now rebind SSL ports, but not dh params etc...
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 5492e26b5d54717ca44799b40f4cb2d389ab47cd..23fa6a6e389fd66d4ccadc7501f998b19cddcb10 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
 #include <dlfcn.h>
 #endif
 
-int InspIRCd::OperPassCompare(const char* data,const char* input, int tagnumber)
+int InspIRCd::PassCompare(Extensible* ex, const char* data,const char* input, const char* hashtype)
 {
        int MOD_RESULT = 0;
-       FOREACH_RESULT_I(this,I_OnOperCompare,OnOperCompare(data, input, tagnumber))
+       FOREACH_RESULT_I(this,I_OnPassCompare,OnPassCompare(ex, data, input, hashtype))
        if (MOD_RESULT == 1)
                return 0;
        if (MOD_RESULT == -1)
@@ -292,8 +292,11 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
        
        if (cm == cmdlist.end())
        {
+               if (user->registered == REG_ALL)
+               {
+                       user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
+               }
                ServerInstance->stats->statsUnknown++;
-               user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
                return true;
        }
 
@@ -410,12 +413,10 @@ bool CommandParser::ProcessBuffer(std::string &buffer,User *user)
 
        if (buffer.length())
        {
-               if (!user->muted)
-               {
-                       ServerInstance->Log(DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str());
-                       return this->ProcessCommand(user,buffer);
-               }
+               ServerInstance->Log(DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str());
+               return this->ProcessCommand(user,buffer);
        }
+
        return true;
 }
 
@@ -505,7 +506,7 @@ CmdResult cmd_reload::Handle(const char** parameters, int /* pcnt */, User *user
        if (ServerInstance->Parser->ReloadCommand(parameters[0], user))
        {
                user->WriteServ("NOTICE %s :*** Successfully reloaded command '%s'", user->nick, parameters[0]);
-               ServerInstance->WriteOpers("*** RELOAD: %s reloaded the '%s' command.", user->nick, parameters[0]);
+               ServerInstance->SNO->WriteToSnoMask('A', "RELOAD: %s reloaded the '%s' command.", user->nick, parameters[0]);
                return CMD_SUCCESS;
        }
        else