+
+CommandNum::Builder::Builder(SpanningTree::RemoteUser* target, const Numeric::Numeric& numeric)
+ : CmdBuilder("NUM")
+{
+ TreeServer* const server = (numeric.GetServer() ? (static_cast<TreeServer*>(numeric.GetServer())) : Utils->TreeRoot);
+ push(server->GetId()).push(target->uuid).push(InspIRCd::Format("%03u", numeric.GetNumeric()));
+ const CommandBase::Params& params = numeric.GetParams();
+ if (!params.empty())
+ {
+ for (CommandBase::Params::const_iterator i = params.begin(); i != params.end()-1; ++i)
+ push(*i);
+ push_last(params.back());
+ }
+}