git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10710
e03df62e-2008-0410-955e-
edbf42e46eb7
* @param key The 'key' of the data, e.g. "swhois" for swhois desc on a user
* @param data The string representation of the data
*/
* @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.
/** Send a topic change for a channel
* @param channel The channel to change the topic for.
Utils->DoOneToMany(ServerInstance->Config->GetSID(), "ENCAP", encap);
}
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)
{
case TYPE_USER:
params.push_back(((User*)target)->uuid);
{
case TYPE_USER:
params.push_back(((User*)target)->uuid);
case TYPE_CHANNEL:
params.push_back(((Channel*)target)->name);
case TYPE_CHANNEL:
params.push_back(((Channel*)target)->name);
case TYPE_SERVER:
params.push_back("*");
case TYPE_SERVER:
params.push_back("*");
+ break;
+ default:
+ throw CoreException("I don't know how to handle TYPE_OTHER.");
+ break;
}
params.push_back(key);
params.push_back(":" + data);
}
params.push_back(key);
params.push_back(":" + data);
virtual ~SpanningTreeProtocolInterface() { }
virtual void SendEncapsulatedData(parameterlist &encap);
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);
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);