X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Faddline.cpp;h=dbf0003bf6fa5f8f373c551005bbcb026b68a3bb;hb=ee4262d276606649489db02007c7a34e8ac75bc4;hp=2ee8401fa36c4126f9a7ec2face773bdb5b000e9;hpb=b14ebbccf08ec34a73e1ba271e67da80d9fe805c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/addline.cpp b/src/modules/m_spanningtree/addline.cpp index 2ee8401fa..dbf0003bf 100644 --- a/src/modules/m_spanningtree/addline.cpp +++ b/src/modules/m_spanningtree/addline.cpp @@ -42,7 +42,7 @@ CmdResult CommandAddLine::Handle(User* usr, std::vector& params) } catch (ModuleException &e) { - ServerInstance->SNO->WriteToSnoMask('d',"Unable to ADDLINE type %s from %s: %s", params[0].c_str(), setter.c_str(), e.GetReason()); + ServerInstance->SNO->WriteToSnoMask('d',"Unable to ADDLINE type %s from %s: %s", params[0].c_str(), setter.c_str(), e.GetReason().c_str()); return CMD_FAILURE; } xl->SetCreateTime(ConvToInt(params[3])); @@ -50,7 +50,7 @@ CmdResult CommandAddLine::Handle(User* usr, std::vector& params) { if (xl->duration) { - std::string timestr = ServerInstance->TimeString(xl->expiry); + std::string timestr = InspIRCd::TimeString(xl->expiry); ServerInstance->SNO->WriteToSnoMask('X',"%s added %s%s on %s to expire on %s: %s",setter.c_str(),params[0].c_str(),params[0].length() == 1 ? "-line" : "", params[1].c_str(), timestr.c_str(), params[5].c_str()); } @@ -60,7 +60,7 @@ CmdResult CommandAddLine::Handle(User* usr, std::vector& params) params[1].c_str(),params[5].c_str()); } - TreeServer* remoteserver = Utils->FindServer(usr->server); + TreeServer* remoteserver = TreeServer::Get(usr); if (!remoteserver->bursting) { @@ -75,3 +75,13 @@ CmdResult CommandAddLine::Handle(User* usr, std::vector& params) } } +CommandAddLine::Builder::Builder(XLine* xline, User* user) + : CmdBuilder(user, "ADDLINE") +{ + push(xline->type); + push(xline->Displayable()); + push(xline->source); + push_int(xline->set_time); + push_int(xline->duration); + push_last(xline->reason); +}