X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_swhois.cpp;h=c6f26384a6b797626bc7aae116b0edfe6c2db001;hb=89fc6ca9c66198fe54cce19d59279cd454fc1bd0;hp=db5d60cd722046aa0fc84b6a3f79e6a7e2387f7d;hpb=34f7d0bc1b9bcd8f358a8abb4f798358d14b58cb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index db5d60cd7..c6f26384a 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -75,13 +75,7 @@ class CommandSwhois : public Command * Sorry w00t i know this was your fix, but i got bored and wanted to clear down the tracker :) * -- Brain */ - std::deque* metadata = new std::deque; - metadata->push_back(dest->nick); - metadata->push_back("swhois"); // The metadata id - metadata->push_back(*text); // The value to send - Event event((char*)metadata,(Module*)this,"send_metadata"); - event.Send(ServerInstance); - delete metadata; + ServerInstance->PI->SendMetaData(dest, TYPE_USER, "swhois", *text); // If it's an empty swhois, unset it (not ideal, but ok) if (text->empty()) @@ -206,14 +200,14 @@ class ModuleSWhois : public Module std::string* text; if (dest->GetExt("swhois", text)) { - user->Shrink("swhois"); + dest->Shrink("swhois"); delete text; - - if (extdata.empty()) - return; // XXX does the command parser even allow sending blank mdata? it needs to here! -- w00t } - text2 = new std::string(extdata); + if (extdata.empty()) + return; // XXX does the command parser even allow sending blank mdata? it needs to here! -- w00t + + text = new std::string(extdata); dest->Extend("swhois", text); } } @@ -262,13 +256,7 @@ class ModuleSWhois : public Module std::string *text = new std::string(swhois); user->Extend("swhois", text); - std::deque* metadata = new std::deque; - metadata->push_back(user->nick); - metadata->push_back("swhois"); // The metadata id - metadata->push_back(*text); // The value to send - Event event((char*)metadata,(Module*)this,"send_metadata"); - event.Send(ServerInstance); - delete metadata; + ServerInstance->PI->SendMetaData(user, TYPE_USER, "swhois", *text); } virtual ~ModuleSWhois()