]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket2.cpp
Windows support. Tested and working to compile on freebsd and linux. Next step is...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket2.cpp
index afba5b96a7c71188694506e2233760a5e9cfb8ea..da4dd5d4c4afc8f905e3ad7c0f02ae3620a93eab 100644 (file)
@@ -1496,19 +1496,13 @@ bool TreeSocket::ProcessLine(std::string &line)
                                        {
                                                strparams[q] = params[q].c_str();
                                        }
-                                       switch (this->Instance->CallCommandHandler(command.c_str(), strparams, params.size(), who))
+                                       if(!this->Instance->CallCommandHandler(command.c_str(), strparams, params.size(), who))
                                        {
-                                               case CMD_INVALID:
-                                                       this->SendError("Unrecognised command '"+std::string(command.c_str())+"' -- possibly loaded mismatched modules");
-                                                       return false;
-                                               break;
-                                               case CMD_FAILURE:
-                                                       return true;
-                                               break;
-                                               default:
-                                                       /* CMD_SUCCESS and CMD_USER_DELETED fall through here */
-                                               break;
+                                               this->SendError("Unrecognised command '"+std::string(command.c_str())+"' -- possibly loaded mismatched modules");
+                                               return false;
                                        }
+                                       else
+                                               return true;
                                }
                                else
                                {