diff options
| author | Adam <Adam@anope.org> | 2015-10-27 18:57:37 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2015-10-27 18:58:48 -0400 |
| commit | 64dac60071fab652745a6e7a06cf6b7bdbbd3625 (patch) | |
| tree | f8f30161150451672b381f6370a8fdcab654bbb8 /include/modules | |
| parent | 162fdbe5815bbdf187f549fefac94ff476d72e62 (diff) | |
| parent | 830361e97d03c74e54cb1cf1bbf329dffdeb66f7 (diff) | |
Merge branch '2.0' into 2.1
Diffstat (limited to 'include/modules')
| -rw-r--r-- | include/modules/chanserv.h | 4 | ||||
| -rw-r--r-- | include/modules/cs_mode.h | 2 | ||||
| -rw-r--r-- | include/modules/ldap.h | 42 |
3 files changed, 19 insertions, 29 deletions
diff --git a/include/modules/chanserv.h b/include/modules/chanserv.h index f0c396d39..35fc3c332 100644 --- a/include/modules/chanserv.h +++ b/include/modules/chanserv.h @@ -266,8 +266,8 @@ namespace ChanServ /** Retrieve the access for a user or group in the form of a vector of access entries * (as multiple entries can affect a single user). */ - virtual AccessGroup AccessFor(const User *u) anope_abstract; - virtual AccessGroup AccessFor(NickServ::Account *nc) anope_abstract; + virtual AccessGroup AccessFor(const User *u, bool updateLastUsed = true) anope_abstract; + virtual AccessGroup AccessFor(NickServ::Account *nc, bool updateLastUsed = true) anope_abstract; /** Get the size of the accss vector for this channel * @return The access vector size diff --git a/include/modules/cs_mode.h b/include/modules/cs_mode.h index 4d5f9dd2f..4c7965e2a 100644 --- a/include/modules/cs_mode.h +++ b/include/modules/cs_mode.h @@ -92,7 +92,7 @@ class ModeLocks : public Service virtual ModeLock *GetMLock(ChanServ::Channel *, const Anope::string &mname, const Anope::string ¶m = "") anope_abstract; /** Get the current mode locks as a string - * @param complete True to show mlock parameters aswell + * @param complete True to show mlock parameters as well * @return A string of mode locks, eg: +nrt */ virtual Anope::string GetMLockAsString(ChanServ::Channel *, bool complete) const anope_abstract; diff --git a/include/modules/ldap.h b/include/modules/ldap.h index e3897b8cc..51ef842c8 100644 --- a/include/modules/ldap.h +++ b/include/modules/ldap.h @@ -1,8 +1,6 @@ #ifndef ANOPE_LDAP_H #define ANOPE_LDAP_H -typedef int LDAPQuery; - class LDAPException : public ModuleException { public: @@ -59,28 +57,26 @@ struct LDAPAttributes : public std::map<Anope::string, std::vector<Anope::string } }; +enum QueryType +{ + QUERY_UNKNOWN, + QUERY_BIND, + QUERY_SEARCH, + QUERY_ADD, + QUERY_DELETE, + QUERY_MODIFY +}; + struct LDAPResult { std::vector<LDAPAttributes> messages; Anope::string error; - enum QueryType - { - QUERY_UNKNOWN, - QUERY_BIND, - QUERY_SEARCH, - QUERY_ADD, - QUERY_DELETE, - QUERY_MODIFY - }; - QueryType type; - LDAPQuery id; LDAPResult() { this->type = QUERY_UNKNOWN; - this->id = -1; } size_t size() const @@ -126,48 +122,42 @@ class LDAPProvider : public Service /** Attempt to bind to the LDAP server as an admin * @param i The LDAPInterface the result is sent to - * @return The query ID */ - virtual LDAPQuery BindAsAdmin(LDAPInterface *i) anope_abstract; + virtual void BindAsAdmin(LDAPInterface *i) anope_abstract; /** Bind to LDAP * @param i The LDAPInterface the result is sent to * @param who The binddn * @param pass The password - * @return The query ID */ - virtual LDAPQuery Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) anope_abstract; + virtual void Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) anope_abstract; /** Search ldap for the specified filter * @param i The LDAPInterface the result is sent to * @param base The base DN to search * @param filter The filter to apply - * @return The query ID */ - virtual LDAPQuery Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) anope_abstract; + virtual void Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) anope_abstract; /** Add an entry to LDAP * @param i The LDAPInterface the result is sent to * @param dn The dn of the entry to add * @param attributes The attributes - * @return The query ID */ - virtual LDAPQuery Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) anope_abstract; + virtual void Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) anope_abstract; /** Delete an entry from LDAP * @param i The LDAPInterface the result is sent to * @param dn The dn of the entry to delete - * @return The query ID */ - virtual LDAPQuery Del(LDAPInterface *i, const Anope::string &dn) anope_abstract; + virtual void Del(LDAPInterface *i, const Anope::string &dn) anope_abstract; /** Modify an existing entry in LDAP * @param i The LDAPInterface the result is sent to * @param base The base DN to modify * @param attributes The attributes to modify - * @return The query ID */ - virtual LDAPQuery Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) anope_abstract; + virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) anope_abstract; }; #endif // ANOPE_LDAP_H |
