]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
Fix dccallow to work with files with spaces in their names
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index 39e23f22e7fc458b3ce25b7a0f9d95544d1c53fe..8bf4d30e7bf341d4d6ce773bc7c1734455bb586e 100644 (file)
@@ -30,10 +30,10 @@ class Shun : public XLine
 public:
        std::string matchtext;
 
-       Shun(time_t s_time, long d, std::string src, std::string re, std::string shunmask)
+       Shun(time_t s_time, long d, const std::string& src, const std::string& re, const std::string& shunmask)
                : XLine(s_time, d, src, re, "SHUN")
+               , matchtext(shunmask)
        {
-               this->matchtext = shunmask;
        }
 
        ~Shun()
@@ -108,8 +108,8 @@ class CommandShun : public Command
 
                std::string target = parameters[0];
                
-               User *find = ServerInstance->FindNick(target.c_str());
-               if (find)
+               User *find = ServerInstance->FindNick(target);
+               if ((find) && (find->registered == REG_ALL))
                        target = std::string("*!*@") + find->GetIPString();
 
                if (parameters.size() == 1)