* @param key The 'key' of the data, e.g. "swhois" for swhois desc on a user
* @param data The string representation of the data
*/
- virtual void SendMetaData(void* target, int type, const std::string &key, const std::string &data) { }
+ virtual void SendMetaData(void* target, TargetTypeFlags type, const std::string &key, const std::string &data) { }
/** Send a topic change for a channel
* @param channel The channel to change the topic for.
Utils->DoOneToMany(ServerInstance->Config->GetSID(), "ENCAP", encap);
}
-void SpanningTreeProtocolInterface::SendMetaData(void* target, int type, const std::string &key, const std::string &data)
+void SpanningTreeProtocolInterface::SendMetaData(void* target, TargetTypeFlags type, const std::string &key, const std::string &data)
{
parameterlist params;
{
case TYPE_USER:
params.push_back(((User*)target)->uuid);
- break;
+ break;
case TYPE_CHANNEL:
params.push_back(((Channel*)target)->name);
- break;
+ break;
case TYPE_SERVER:
params.push_back("*");
- break;
+ break;
+ default:
+ throw CoreException("I don't know how to handle TYPE_OTHER.");
+ break;
}
params.push_back(key);
params.push_back(":" + data);
virtual ~SpanningTreeProtocolInterface() { }
virtual void SendEncapsulatedData(parameterlist &encap);
- virtual void SendMetaData(void* target, int type, const std::string &key, const std::string &data);
+ virtual void SendMetaData(void* target, TargetTypeFlags type, const std::string &key, const std::string &data);
virtual void SendTopic(Channel* channel, std::string &topic);
virtual void SendMode(const std::string &target, parameterlist &modedata);
virtual void SendModeNotice(const std::string &modes, const std::string &text);