summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-21 13:55:48 +0000
committerSadie Powell <sadie@witchery.services>2024-02-21 13:55:48 +0000
commit07373c8cf2325d6e3b6c9d91acbc8abbf51db51e (patch)
tree58f1b71e62e537559e41a0afe51b5c512b708020
parent89594d455718432a24930a7cf97c26daaaf49472 (diff)
Move IRCDProto member initializers to the header.
-rw-r--r--include/protocol.h51
-rw-r--r--src/protocol.cpp10
2 files changed, 37 insertions, 24 deletions
diff --git a/include/protocol.h b/include/protocol.h
index c21e4ae84..e33640e77 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -44,37 +44,54 @@ public:
virtual Anope::string Format(const Anope::string &source, const Anope::string &message);
/* Modes used by default by our clients */
- Anope::string DefaultPseudoclientModes;
+ Anope::string DefaultPseudoclientModes = "+io";
/* Can we force change a users's nick? */
- bool CanSVSNick;
+ bool CanSVSNick = false;
+
/* Can we force join or part users? */
- bool CanSVSJoin;
- /* Can we set vhosts/vidents on users? */
- bool CanSetVHost, CanSetVIdent;
+ bool CanSVSJoin = false;
+
+ /* Can we set vhosts on users? */
+ bool CanSetVHost = false;
+
+ /* Can we set vidents on users? */
+ bool CanSetVIdent = false;
+
/* Can we ban specific gecos from being used? */
- bool CanSNLine;
+ bool CanSNLine = false;
+
/* Can we ban specific nicknames from being used? */
- bool CanSQLine;
+ bool CanSQLine = false;
+
/* Can we ban specific channel names from being used? */
- bool CanSQLineChannel;
+ bool CanSQLineChannel = false;
+
/* Can we ban by IP? */
- bool CanSZLine;
+ bool CanSZLine = false;
+
/* Can we place temporary holds on specific nicknames? */
- bool CanSVSHold;
+ bool CanSVSHold = false;
+
/* See ns_cert */
- bool CanCertFP;
+ bool CanCertFP = false;
+
/* Can we send arbitrary message tags? */
- bool CanSendTags;
+ bool CanSendTags = false;
+
/* Can users log out before being fully connected? */
- bool CanSVSLogout;
+ bool CanSVSLogout = false;
+
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
- bool RequiresID;
+ bool RequiresID = false;
+
/* If this IRCd has unique ids, whether the IDs and nicknames are ambiguous */
- bool AmbiguousID;
+ bool AmbiguousID = false;
+
/* The maximum number of modes we are allowed to set with one MODE command */
- unsigned MaxModes;
+ unsigned MaxModes = 3;
+
/* The maximum number of bytes a line may have */
- unsigned MaxLine;
+ unsigned MaxLine = 512;
/* Retrieves the next free UID or SID */
virtual Anope::string UID_Retrieve();
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 37028ca39..87efc7894 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -21,14 +21,10 @@
IRCDProto *IRCD = NULL;
-IRCDProto::IRCDProto(Module *creator, const Anope::string &p) : Service(creator, "IRCDProto", creator->name), proto_name(p)
+IRCDProto::IRCDProto(Module *creator, const Anope::string &p)
+ : Service(creator, "IRCDProto", creator->name)
+ , proto_name(p)
{
- DefaultPseudoclientModes = "+io";
- CanSVSNick = CanSVSJoin = CanSetVHost = CanSetVIdent = CanSNLine = CanSQLine = CanSQLineChannel
- = CanSZLine = CanSVSHold = CanCertFP = CanSendTags = CanSVSLogout = RequiresID = AmbiguousID = false;
- MaxModes = 3;
- MaxLine = 512;
-
if (IRCD == NULL)
IRCD = this;
}