X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fxline.cpp;h=d347e3763b4709116a64675f62797a4d5242a1f4;hb=4e40ee49bba3f7bab05a58516e2039351fb33069;hp=f50348c3cbaf832a233ab7befd72e605702c6e54;hpb=645f7e18c64a6628ede880dc69bf8825ba93b375;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/xline.cpp b/src/xline.cpp index f50348c3c..d347e3763 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -531,15 +531,15 @@ bool XLine::IsBurstable() void XLine::DefaultApply(User* u, const std::string &line, bool bancache) { - char sreason[MAXBUF]; - snprintf(sreason, MAXBUF, "%s-Lined: %s", line.c_str(), this->reason.c_str()); + const std::string banReason = line + "-Lined: " + reason; + if (!ServerInstance->Config->MoronBanner.empty()) - u->WriteServ("NOTICE %s :*** %s", u->nick.c_str(), ServerInstance->Config->MoronBanner.c_str()); + u->WriteNotice("*** " + ServerInstance->Config->MoronBanner); if (ServerInstance->Config->HideBans) - ServerInstance->Users->QuitUser(u, line + "-Lined", sreason); + ServerInstance->Users->QuitUser(u, line + "-Lined", banReason.c_str()); else - ServerInstance->Users->QuitUser(u, sreason); + ServerInstance->Users->QuitUser(u, banReason); if (bancache) @@ -642,7 +642,7 @@ bool QLine::Matches(User *u) void QLine::Apply(User* u) { /* Force to uuid on apply of qline, no need to disconnect any more :) */ - u->ForceNickChange(u->uuid.c_str()); + u->ForceNickChange(u->uuid); }