]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands.cpp
Merge pull request #16 from Adam-/insp20
[user/henk/code/inspircd.git] / src / commands.cpp
index 1aeba2d800f22e0409b83272326aa64e0def7419..c68c63cc51a426c62cecf67bcefa5cf415454307 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -25,7 +25,7 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user)
 
        ConfigTag* insane = Config->ConfValue("insane");
 
-       if (!insane || !insane->getBool("hostmasks"))
+       if (insane->getBool("hostmasks"))
                return false;
 
        float itrigger = insane->getFloat("trigger", 95.5);
@@ -57,7 +57,7 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user)
 
        ConfigTag* insane = Config->ConfValue("insane");
 
-       if (!insane || !insane->getBool("ipmasks"))
+       if (insane->getBool("ipmasks"))
                return false;
 
        float itrigger = insane->getFloat("trigger", 95.5);
@@ -86,7 +86,7 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user)
 
        ConfigTag* insane = Config->ConfValue("insane");
 
-       if (!insane || !insane->getBool("nickmasks"))
+       if (insane->getBool("nickmasks"))
                return false;
 
        float itrigger = insane->getFloat("trigger", 95.5);
@@ -108,3 +108,31 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user)
        }
        return false;
 }
+
+CmdResult SplitCommand::Handle(const std::vector<std::string>& parms, User* u)
+{
+       if (IS_LOCAL(u))
+               return HandleLocal(parms, IS_LOCAL(u));
+       if (IS_REMOTE(u))
+               return HandleRemote(parms, IS_REMOTE(u));
+       if (IS_SERVER(u))
+               return HandleServer(parms, IS_SERVER(u));
+       ServerInstance->Logs->Log("COMMAND", DEFAULT, "Unknown user type in command (uuid=%s)!", u->uuid.c_str());
+       return CMD_INVALID;
+}
+
+CmdResult SplitCommand::HandleLocal(const std::vector<std::string>&, LocalUser*)
+{
+       return CMD_INVALID;
+}
+
+CmdResult SplitCommand::HandleRemote(const std::vector<std::string>&, RemoteUser*)
+{
+       return CMD_INVALID;
+}
+
+CmdResult SplitCommand::HandleServer(const std::vector<std::string>&, FakeUser*)
+{
+       return CMD_INVALID;
+}
+