summaryrefslogtreecommitdiff
path: root/include/protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/protocol.h')
-rw-r--r--include/protocol.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/include/protocol.h b/include/protocol.h
index 874a5ff34..4f7990b51 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -9,8 +9,7 @@
* Based on the original code of Services by Andy Church.
*/
-#ifndef PROTOCOL_H
-#define PROTOCOL_H
+#pragma once
#include "services.h"
#include "anope.h"
@@ -61,10 +60,10 @@ class CoreExport IRCDProto : public Service
bool CanSZLine;
/* Can we place temporary holds on specific nicknames? */
bool CanSVSHold;
- /* See os_oline */
- bool CanSVSO;
/* See ns_cert */
bool CanCertFP;
+ /* Can we send arbitrary message tags? */
+ bool CanSendTags;
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
bool RequiresID;
/* If this IRCd has unique ids, whether the IDs and nicknames are ambiguous */
@@ -180,10 +179,6 @@ class CoreExport IRCDProto : public Service
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u);
virtual void SendGlobops(const MessageSource &source, const char *fmt, ...);
- /** Sets oper flags on a user, currently only supported by Unreal
- */
- virtual void SendSVSO(BotInfo *, const Anope::string &, const Anope::string &) { }
-
/** Sends a nick change of one of our clients.
*/
virtual void SendNickChange(User *u, const Anope::string &newnick);
@@ -230,7 +225,7 @@ class CoreExport IRCDProto : public Service
virtual void SendSASLMechanisms(std::vector<Anope::string> &) { }
virtual void SendSASLMessage(const SASL::Message &) { }
- virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) { }
+ virtual void SendSVSLogin(const Anope::string &uid, NickAlias *na) { }
virtual bool IsNickValid(const Anope::string &);
virtual bool IsChannelValid(const Anope::string &);
@@ -250,8 +245,8 @@ class CoreExport IRCDProto : public Service
class CoreExport MessageSource
{
Anope::string source;
- User *u;
- Server *s;
+ User *u = nullptr;
+ Server *s = nullptr;
public:
MessageSource(const Anope::string &);
@@ -279,8 +274,7 @@ class CoreExport IRCDMessage : public Service
public:
IRCDMessage(Module *owner, const Anope::string &n, unsigned p = 0);
unsigned GetParamCount() const;
- virtual void Run(MessageSource &, const std::vector<Anope::string> &params) = 0;
- virtual void Run(MessageSource &, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags);
+ virtual void Run(MessageSource &, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) = 0;
void SetFlag(IRCDMessageFlag f) { flags.insert(f); }
bool HasFlag(IRCDMessageFlag f) const { return flags.count(f); }
@@ -294,7 +288,7 @@ private:
Anope::string message;
/** The current position within the message. */
- Anope::string::size_type position;
+ Anope::string::size_type position = 0;
public:
/** Create a tokenstream and fill it with the provided data. */
@@ -314,5 +308,3 @@ private:
};
extern CoreExport IRCDProto *IRCD;
-
-#endif // PROTOCOL_H