summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/config.h2
-rw-r--r--include/defs.h1
-rw-r--r--include/modes.h2
-rw-r--r--include/modules/chanserv/chanaccess.h35
-rw-r--r--include/modules/chanserv/main/chanaccess.h2
-rw-r--r--include/modules/nickserv/account.h6
-rw-r--r--include/modules/protocol/plexus.h20
-rw-r--r--include/serialize.h2
8 files changed, 34 insertions, 36 deletions
diff --git a/include/config.h b/include/config.h
index b6b36b726..25c8f6166 100644
--- a/include/config.h
+++ b/include/config.h
@@ -26,7 +26,7 @@ namespace Configuration
{
class CoreExport Block
{
- friend struct Conf;
+ friend class Conf;
public:
typedef Anope::map<Anope::string> item_map;
diff --git a/include/defs.h b/include/defs.h
index 989ce3e5b..bd4f2871e 100644
--- a/include/defs.h
+++ b/include/defs.h
@@ -33,7 +33,6 @@ struct ChanUserContainer;
class ClientSocket;
class Command;
class CommandSource;
-namespace Configuration { struct Conf; }
class ConnectionSocket;
class Entry;
class ExtensibleBase;
diff --git a/include/modes.h b/include/modes.h
index 706b0b716..49e923cda 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -23,6 +23,8 @@
#include "anope.h"
#include "base.h"
+namespace Configuration { class Conf; }
+
/** The different types of modes
*/
enum ModeType
diff --git a/include/modules/chanserv/chanaccess.h b/include/modules/chanserv/chanaccess.h
index dff39c0f8..ec05a7ae5 100644
--- a/include/modules/chanserv/chanaccess.h
+++ b/include/modules/chanserv/chanaccess.h
@@ -83,40 +83,17 @@ class CoreExport ChanAccess : public Serialize::Object
*/
virtual void AccessUnserialize(const Anope::string &data) anope_abstract;
+ virtual int Compare(ChanAccess *other) anope_abstract;
+
/* Comparison operators to other Access entries */
- virtual bool operator>(ChanAccess &other)
+ bool operator>(ChanAccess &other)
{
-// const std::vector<Privilege> &privs = service->GetPrivileges();
-// for (unsigned i = privs.size(); i > 0; --i)
-// {
-// bool this_p = this->HasPriv(privs[i - 1].name),
-// other_p = other.HasPriv(privs[i - 1].name);
-//
-// if (!this_p && !other_p)
-// continue;
-//
-// return this_p && !other_p;
-// }
-
- return false;
+ return Compare(&other) > 0;
}
-#warning "move this out"
- virtual bool operator<(ChanAccess &other)
+ bool operator<(ChanAccess &other)
{
-// const std::vector<Privilege> &privs = service->GetPrivileges();
-// for (unsigned i = privs.size(); i > 0; --i)
-// {
-// bool this_p = this->HasPriv(privs[i - 1].name),
-// other_p = other.HasPriv(privs[i - 1].name);
-//
-// if (!this_p && !other_p)
-// continue;
-//
-// return !this_p && other_p;
-// }
-
- return false;
+ return Compare(&other) < 0;
}
bool operator>=(ChanAccess &other)
diff --git a/include/modules/chanserv/main/chanaccess.h b/include/modules/chanserv/main/chanaccess.h
index fb78056ea..ca6661a5b 100644
--- a/include/modules/chanserv/main/chanaccess.h
+++ b/include/modules/chanserv/main/chanaccess.h
@@ -45,4 +45,6 @@ class ChanAccessImpl : public ChanServ::ChanAccess
Anope::string Mask() override;
bool Matches(const User *u, NickServ::Account *acc) override;
+
+ int Compare(ChanAccess *other) override;
};
diff --git a/include/modules/nickserv/account.h b/include/modules/nickserv/account.h
index ebe1061b6..8dc5ad7c8 100644
--- a/include/modules/nickserv/account.h
+++ b/include/modules/nickserv/account.h
@@ -30,9 +30,6 @@ class CoreExport Account : public Serialize::Object
public:
static constexpr const char *const NAME = "account";
-#warning "move lastmail to a field"
- /* Last time an email was sent to this user */
- time_t lastmail = 0;
/* Users online now logged into this account */
std::vector<User *> users;
@@ -120,6 +117,9 @@ class CoreExport Account : public Serialize::Object
virtual MemoServ::MemoInfo *GetMemos() anope_abstract;
virtual unsigned int GetChannelCount() anope_abstract;
+
+ virtual time_t GetLastMail() anope_abstract;
+ virtual void SetLastMail(time_t) anope_abstract;
};
} // namespace NickServ
diff --git a/include/modules/protocol/plexus.h b/include/modules/protocol/plexus.h
index 4afbc391e..4d35cdd1f 100644
--- a/include/modules/protocol/plexus.h
+++ b/include/modules/protocol/plexus.h
@@ -53,6 +53,14 @@ class NOOP : public messages::NOOP
void Send(Server *s, bool mode) override;
};
+class SASL : public messages::SASL
+{
+ public:
+ using messages::SASL::SASL;
+
+ void Send(const ::SASL::Message &) override;
+};
+
class Topic : public messages::Topic
{
public:
@@ -69,6 +77,14 @@ class SVSJoin : public messages::SVSJoin
void Send(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &key) override;
};
+class SVSLogin : public messages::SVSLogin
+{
+ public:
+ using messages::SVSLogin::SVSLogin;
+
+ void Send(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) override;
+};
+
class SVSNick : public messages::SVSNick
{
public:
@@ -113,8 +129,10 @@ class Proto : public ts6::Proto
class Encap : public IRCDMessage
{
+ ServiceReference<SASL::Service> sasl;
+
public:
- Encap(Module *creator) : IRCDMessage(creator, "ENCAP", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); }
+ Encap(Module *creator) : IRCDMessage(creator, "ENCAP", 4) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params) override;
};
diff --git a/include/serialize.h b/include/serialize.h
index 8137e18e9..497e28866 100644
--- a/include/serialize.h
+++ b/include/serialize.h
@@ -718,7 +718,7 @@ class Serialize::ObjectField : public CommonFieldBase<TypeImpl, T>
this->is_object = true;
}
- T GetField(TypeImpl *s)
+ T GetField(TypeImpl *s) override
{
T *t = this->Get_(s);