summaryrefslogtreecommitdiff
path: root/src/modules/m_swhois.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_swhois.cpp')
-rw-r--r--src/modules/m_swhois.cpp16
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);