From d3d32dcf6ddb15d8ca9089de63a51b45b437a063 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Apr 2008 13:21:12 +0000 Subject: A convenience function for ProtocolInterface::SendMode that just takes a string, then splits it internally to deque for sending to the other function of the same name git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9303 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/protocol.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include') diff --git a/include/protocol.h b/include/protocol.h index 21e6b5396..85490c1d0 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -14,6 +14,8 @@ #ifndef __PROTOCOL_H__ #define __PROTOCOL_H__ +#include "hashcomp.h" + class InspIRCd; typedef std::deque parameterlist; @@ -27,12 +29,30 @@ class ProtocolInterface : public Extensible virtual ~ProtocolInterface() { } virtual void SendEncapsulatedData(parameterlist &encap) { } + virtual void SendMetaData(void* target, int 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 SendMode(const std::string &target, const std::string &modeline) + { + /* Convenience function */ + irc::spacesepstream x(modeline); + parameterlist n; + std::string v; + while (x.GetToken(v)) + n.push_back(v); + SendMode(target, n); + } + virtual void SendOperNotice(const std::string &text) { } + virtual void SendModeNotice(const std::string &modes, const std::string &text) { } + virtual void SendSNONotice(const std::string &snomask, const std::string &text) { } + virtual void PushToClient(User* target, const std::string &rawline) { } }; -- cgit v1.2.3