X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fxline.cpp;h=19a15decf27b6e632a5637712759b58ceac9ff50;hb=9a2481ebf1109adc4b626414108d92674793cd5d;hp=268804f9dce804981a14f4f9e700e6746ffef23b;hpb=dd98d56cabcd08a3d5207454e002b187af98d28a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/xline.cpp b/src/xline.cpp index 268804f9d..19a15decf 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -139,6 +139,7 @@ IdentHostPair XLineManager::IdentSplit(const std::string &ident_and_host) } else { + n.first = ""; n.second = ident_and_host; } @@ -390,21 +391,26 @@ void XLine::Apply(User* u) { } +bool XLine::IsBurstable() +{ + return true; +} + void XLine::DefaultApply(User* u, const std::string &line, bool bancache) { - char reason[MAXBUF]; - snprintf(reason, MAXBUF, "%s-Lined: %s", line.c_str(), this->reason); + char sreason[MAXBUF]; + snprintf(sreason, MAXBUF, "%s-Lined: %s", line.c_str(), this->reason); if (*ServerInstance->Config->MoronBanner) u->WriteServ("NOTICE %s :*** %s", u->nick, ServerInstance->Config->MoronBanner); if (ServerInstance->Config->HideBans) - User::QuitUser(ServerInstance, u, line + "-Lined", reason); + User::QuitUser(ServerInstance, u, line + "-Lined", sreason); else - User::QuitUser(ServerInstance, u, reason); + User::QuitUser(ServerInstance, u, sreason); if (bancache) { - ServerInstance->Log(DEBUG, std::string("BanCache: Adding positive hit (") + line + ") for " + u->GetIPString()); + ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Adding positive hit (") + line + ") for " + u->GetIPString()); ServerInstance->BanCache->AddHit(u->GetIPString(), this->type, line + "-Lined: " + this->reason); } } @@ -594,6 +600,11 @@ const char* QLine::Displayable() return nick; } +bool KLine::IsBurstable() +{ + return false; +} + bool XLineManager::RegisterFactory(XLineFactory* xlf) { XLineFactMap::iterator n = line_factory.find(xlf->GetType());