]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/privmsg.cpp
fix some unitialised vectors and tidy up a bit.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / privmsg.cpp
index 3e27258151ff56bf060f79fa651bfbd85637d53f..316ad2e5cd996997d5560876b9521f95f009476f 100644 (file)
@@ -32,7 +32,7 @@ bool TreeSocket::ServerMessage(const std::string &messagetype, const std::string
                const char* target = params[0].c_str();
                std::string text = params[1].c_str();
 
-               if ((*target == '@') || (*target == '%') || (*target == '+'))
+               if (Instance->Modes->FindPrefix(*target))
                {
                        status = *target;
                        target++;
@@ -40,7 +40,7 @@ bool TreeSocket::ServerMessage(const std::string &messagetype, const std::string
 
                Channel* channel = Instance->FindChan(target);
                
-               if (target)
+               if (channel)
                {
                        if (messagetype == "PRIVMSG")
                        {