X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_shun.cpp;h=8bf4d30e7bf341d4d6ce773bc7c1734455bb586e;hb=e2f1a61fc67500c4c101ff8a3f7847914298375e;hp=39e23f22e7fc458b3ce25b7a0f9d95544d1c53fe;hpb=a969c1e440cb3f77e81ba5da3f4b3bf09bb5190a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 39e23f22e..8bf4d30e7 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -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)