1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef __PROTOCOL_H__
15 #define __PROTOCOL_H__
21 typedef std::deque<std::string> parameterlist;
26 std::string servername;
27 std::string parentname;
28 unsigned int usercount;
29 unsigned int opercount;
30 unsigned int latencyms;
33 typedef std::list<ProtoServer> ProtoServerList;
35 class ProtocolInterface : public Extensible
38 InspIRCd* ServerInstance;
40 ProtocolInterface(InspIRCd* Instance) : ServerInstance(Instance) { }
41 virtual ~ProtocolInterface() { }
43 virtual void SendEncapsulatedData(parameterlist &encap) { }
45 virtual void SendMetaData(void* target, int type, const std::string &key, const std::string &data) { }
47 virtual void SendTopic(Channel* channel, std::string &topic) { }
49 virtual void SendMode(const std::string &target, parameterlist &modedata) { }
51 virtual void SendModeStr(const std::string &target, const std::string &modeline)
53 /* Convenience function */
54 irc::spacesepstream x(modeline);
62 virtual void SendModeNotice(const std::string &modes, const std::string &text) { }
64 virtual void SendSNONotice(const std::string &snomask, const std::string &text) { }
66 virtual void PushToClient(User* target, const std::string &rawline) { }
68 virtual void SendChannelPrivmsg(Channel* target, char status, const std::string &text) { }
70 virtual void SendChannelNotice(Channel* target, char status, const std::string &text) { }
72 virtual void SendUserPrivmsg(User* target, const std::string &text) { }
74 virtual void SendUserNotice(User* target, const std::string &text) { }
76 virtual void GetServerList(ProtoServerList &sl) { }