diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-01 20:00:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-01 20:00:46 +0000 |
commit | 8a0a8ce160dbc623350b80f8f6e06afb9c7a1f86 (patch) | |
tree | da0382efb366949715bf7ee1e68da8b06e28eced | |
parent | 963af328e2d843c5a2c5196f38806f9189915485 (diff) |
Make sure that if an oper opers up and has an swhois in their opertype or oper tag, the swhois is sent out as metadata
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6206 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_swhois.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index f1a089dd0..50f6578db 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -125,7 +125,6 @@ class ModuleSWhois : public Module // it is ours. virtual void OnSyncUserMetaData(userrec* user, Module* proto, void* opaque, const std::string &extname) { - ServerInstance->Log(DEBUG,"Sync user metadata type '%s'", extname.c_str()); // check if the linking module wants to know about OUR metadata if (extname == "swhois") { @@ -138,10 +137,6 @@ class ModuleSWhois : public Module // sees fit, and send it on its way. We dont need or want to know how. proto->ProtoSendMetaData(opaque,TYPE_USER,user,extname,*swhois); } - else - { - ServerInstance->Log(DEBUG,"User has a null swhois string!"); - } } } @@ -185,7 +180,6 @@ class ModuleSWhois : public Module // check if its our metadata key, and its associated with a user if ((target_type == TYPE_USER) && (extname == "swhois")) { - ServerInstance->Log(DEBUG,"Extend with swhois"); userrec* dest = (userrec*)target; // if they dont already have an swhois field, accept the remote server's std::string* text; @@ -193,7 +187,6 @@ class ModuleSWhois : public Module { std::string* text = new std::string(extdata); dest->Extend("swhois",text); - ServerInstance->Log(DEBUG,"extended: %s %s", dest->nick, text->c_str()); } } } @@ -242,8 +235,15 @@ class ModuleSWhois : public Module std::string *text = new std::string(swhois); user->Extend("swhois", text); + std::deque<std::string>* metadata = new std::deque<std::string>; + 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; } - + virtual ~ModuleSWhois() { DELETE(Conf); |