]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/main.cpp
Get rid of CommandBuilder::push_back.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / main.cpp
index f8531cb014128a1a3ff1afc6a83d6dd6772d2244..561eed2fb47caf7396dca88eaf9efec944e1b04b 100644 (file)
@@ -359,10 +359,10 @@ void ModuleSpanningTree::OnUserInvite(User* source, User* dest, Channel* channel
        if (IS_LOCAL(source))
        {
                CmdBuilder params(source, "INVITE");
-               params.push_back(dest->uuid);
-               params.push_back(channel->name);
+               params.push(dest->uuid);
+               params.push(channel->name);
                params.push_int(channel->age);
-               params.push_back(ConvToStr(expiry));
+               params.push(ConvToStr(expiry));
                params.Broadcast();
        }
 }
@@ -403,7 +403,7 @@ void ModuleSpanningTree::OnUserPostMessage(User* user, const MessageTarget& targ
                        {
                                CmdBuilder params(user, message_type);
                                params.push_tags(details.tags_out);
-                               params.push_back(d->uuid);
+                               params.push(d->uuid);
                                params.push_last(details.text);
                                params.Unicast(d);
                        }
@@ -411,7 +411,7 @@ void ModuleSpanningTree::OnUserPostMessage(User* user, const MessageTarget& targ
                }
                case MessageTarget::TYPE_CHANNEL:
                {
-                       Utils->SendChannelMessage(user->uuid, target.Get<Channel>(), details.text, target.status, details.tags_out, details.exemptions, message_type);
+                       Utils->SendChannelMessage(user, target.Get<Channel>(), details.text, target.status, details.tags_out, details.exemptions, message_type);
                        break;
                }
                case MessageTarget::TYPE_SERVER:
@@ -419,7 +419,7 @@ void ModuleSpanningTree::OnUserPostMessage(User* user, const MessageTarget& targ
                        const std::string* serverglob = target.Get<std::string>();
                        CmdBuilder par(user, message_type);
                        par.push_tags(details.tags_out);
-                       par.push_back(*serverglob);
+                       par.push(*serverglob);
                        par.push_last(details.text);
                        par.Broadcast();
                        break;
@@ -441,14 +441,14 @@ void ModuleSpanningTree::OnUserPostTagMessage(User* user, const MessageTarget& t
                        {
                                CmdBuilder params(user, "TAGMSG");
                                params.push_tags(details.tags_out);
-                               params.push_back(d->uuid);
+                               params.push(d->uuid);
                                params.Unicast(d);
                        }
                        break;
                }
                case MessageTarget::TYPE_CHANNEL:
                {
-                       Utils->SendChannelMessage(user->uuid, target.Get<Channel>(), "", target.status, details.tags_out, details.exemptions, "TAGMSG");
+                       Utils->SendChannelMessage(user, target.Get<Channel>(), "", target.status, details.tags_out, details.exemptions, "TAGMSG");
                        break;
                }
                case MessageTarget::TYPE_SERVER:
@@ -456,7 +456,7 @@ void ModuleSpanningTree::OnUserPostTagMessage(User* user, const MessageTarget& t
                        const std::string* serverglob = target.Get<std::string>();
                        CmdBuilder par(user, "TAGMSG");
                        par.push_tags(details.tags_out);
-                       par.push_back(*serverglob);
+                       par.push(*serverglob);
                        par.Broadcast();
                        break;
                }
@@ -513,12 +513,12 @@ void ModuleSpanningTree::OnUserJoin(Membership* memb, bool sync, bool created_by
        else
        {
                CmdBuilder params(memb->user, "IJOIN");
-               params.push_back(memb->chan->name);
+               params.push(memb->chan->name);
                params.push_int(memb->id);
                if (!memb->modes.empty())
                {
-                       params.push_back(ConvToStr(memb->chan->age));
-                       params.push_back(memb->modes);
+                       params.push(ConvToStr(memb->chan->age));
+                       params.push(memb->modes);
                }
                params.Broadcast();
        }
@@ -553,7 +553,7 @@ void ModuleSpanningTree::OnUserPart(Membership* memb, std::string &partmessage,
        if (IS_LOCAL(memb->user))
        {
                CmdBuilder params(memb->user, "PART");
-               params.push_back(memb->chan->name);
+               params.push(memb->chan->name);
                if (!partmessage.empty())
                        params.push_last(partmessage);
                params.Broadcast();
@@ -593,8 +593,8 @@ void ModuleSpanningTree::OnUserPostNick(User* user, const std::string &oldnick)
        {
                // The nick TS is updated by the core, we don't do it
                CmdBuilder params(user, "NICK");
-               params.push_back(user->nick);
-               params.push_back(ConvToStr(user->age));
+               params.push(user->nick);
+               params.push(ConvToStr(user->age));
                params.Broadcast();
        }
        else if (!loopCall)
@@ -609,8 +609,8 @@ void ModuleSpanningTree::OnUserKick(User* source, Membership* memb, const std::s
                return;
 
        CmdBuilder params(source, "KICK");
-       params.push_back(memb->chan->name);
-       params.push_back(memb->user->uuid);
+       params.push(memb->chan->name);
+       params.push(memb->user->uuid);
        // If a remote user is being kicked by us then send the membership id in the kick too
        if (!IS_LOCAL(memb->user))
                params.push_int(memb->id);
@@ -625,8 +625,8 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
        // Send out to other servers
        if (!parameter.empty() && parameter[0] != '-')
        {
-               CmdBuilder params((user ? user->uuid : ServerInstance->Config->GetSID()), "REHASH");
-               params.push_back(parameter);
+               CmdBuilder params(user ? user : ServerInstance->FakeClient, "REHASH");
+               params.push(parameter);
                params.Forward(user ? TreeServer::Get(user)->GetRoute() : NULL);
        }
 }
@@ -749,8 +749,8 @@ void ModuleSpanningTree::OnDelLine(User* user, XLine *x)
                user = ServerInstance->FakeClient;
 
        CmdBuilder params(user, "DELLINE");
-       params.push_back(x->type);
-       params.push_back(x->Displayable());
+       params.push(x->type);
+       params.push(x->Displayable());
        params.Broadcast();
 }