X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmetadata.cpp;h=5dea7ffaed2de601db06543c09bd2385cdbddd38;hb=7432fea968127b606fc029ae462e91d3f30df8a4;hp=8ce41d87f1f5012ac12660bf42d091c5ea89ffe3;hpb=8710724b5518ae9858309e548514f76e620a8459;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/metadata.cpp b/src/modules/m_spanningtree/metadata.cpp index 8ce41d87f..5dea7ffae 100644 --- a/src/modules/m_spanningtree/metadata.cpp +++ b/src/modules/m_spanningtree/metadata.cpp @@ -21,7 +21,7 @@ #include "inspircd.h" #include "commands.h" -CmdResult CommandMetadata::Handle(const std::vector& params, User *srcuser) +CmdResult CommandMetadata::Handle(User* srcuser, std::vector& params) { if (params[0] == "*") { @@ -73,3 +73,27 @@ CmdResult CommandMetadata::Handle(const std::vector& params, User * return CMD_SUCCESS; } +CommandMetadata::Builder::Builder(User* user, const std::string& key, const std::string& val) + : CmdBuilder("METADATA") +{ + push(user->uuid); + push(key); + push_last(val); +} + +CommandMetadata::Builder::Builder(Channel* chan, const std::string& key, const std::string& val) + : CmdBuilder("METADATA") +{ + push(chan->name); + push_int(chan->age); + push(key); + push_last(val); +} + +CommandMetadata::Builder::Builder(const std::string& key, const std::string& val) + : CmdBuilder("METADATA") +{ + push("*"); + push(key); + push_last(val); +}