summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules')
-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
4 files changed, 30 insertions, 33 deletions
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;
};