]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_customtitle.cpp
Remove unneeded headers from spanningtree. This was done to the rest of the source...
[user/henk/code/inspircd.git] / src / modules / m_customtitle.cpp
index d00bdf9752fc43d19c76d49e4530c527183c85de..df142a0891884b06d9d430e8cddc0e3950657bad 100644 (file)
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 #include "wildcard.h"
 
 /* $ModDesc: Provides the TITLE command which allows setting of CUSTOM WHOIS TITLE line */
@@ -29,6 +26,7 @@ class cmd_title : public command_t
        {
                this->source = "m_customtitle.so";
                syntax = "<user> <password>";
+               TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
 
 bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
@@ -79,6 +77,14 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
                                text = new std::string(title);
                                user->Extend("ctitle", text);
 
+                               std::deque<std::string>* metadata = new std::deque<std::string>;
+                               metadata->push_back(user->nick);
+                               metadata->push_back("ctitle");      // The metadata id
+                               metadata->push_back(*text);     // The value to send
+                               Event event((char*)metadata,(Module*)this,"send_metadata");
+                               event.Send(ServerInstance);
+                               delete metadata;
+                                                                                       
                                if (!vhost.empty())
                                        user->ChangeDisplayedHost(vhost.c_str());
 
@@ -216,7 +222,7 @@ class ModuleCustomTitle : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_VENDOR,API_VERSION);
+               return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
        }
 };