mirror of
https://github.com/anope/anope.git
synced 2026-07-05 00:53:12 +02:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 15f5be76b9 | |||
| 12f1ebee1c | |||
| 8e691eac80 | |||
| 2327c6ac9a | |||
| e23ea8f8ea | |||
| 449cfa6503 | |||
| 01fc7421b6 | |||
| e6d7306202 | |||
| 2107d18d9e | |||
| acb9428635 | |||
| 27a19dcc52 | |||
| ba26d9a15c | |||
| 9834040948 | |||
| bc9e035038 | |||
| debfa59be6 |
@@ -24,3 +24,17 @@ I have tested this pull request on:
|
|||||||
|
|
||||||
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
|
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
|
||||||
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
|
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
|
||||||
|
|
||||||
|
## Checks
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Tick the boxes for the checks you have made.
|
||||||
|
-->
|
||||||
|
|
||||||
|
I have ensured that:
|
||||||
|
|
||||||
|
- [ ] The code I am submitting is my own work and/or I have permission from the author to share it.
|
||||||
|
- [ ] Generative AI (Copilot, ChatGPT, etc) was not used to create any part of this pull request.
|
||||||
|
- [ ] If the pull request contains a security fix I have followed the reporting rules mentioned in [the security policy](https://github.com/anope/anope/security/policy) (delete if not applicable).
|
||||||
|
- [ ] I have documented any features added by this pull request (delete if not applicable).
|
||||||
|
- [ ] This pull request does not introduce any incompatible API changes (stable branches only, delete if not applicable).
|
||||||
|
|||||||
@@ -12,39 +12,49 @@ Charles Kingsley <chaz@anope.org>
|
|||||||
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
|
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Cronus <cronus@nite-serv.com>
|
Cronus <cronus@nite-serv.com>
|
||||||
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
|
|
||||||
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
|
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Fabio Scotoni <cculex@gmail.com>
|
Fabio Scotoni <cculex@gmail.com>
|
||||||
|
Filippo Cortigiani <simos@simosnap.org> <devel@devel.crtnet.it>
|
||||||
|
Filippo Cortigiani <simos@simosnap.org> <simos@H7-25.fritz.box>
|
||||||
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Harakiri <harakiri@overstack.fr>
|
Harakiri <harakiri@overstack.fr>
|
||||||
|
Hendrik Jäger <gitcommit@henk.geekmail.org> <github@henk.geekmail.org>
|
||||||
Jan Milants <viper@anope.org>
|
Jan Milants <viper@anope.org>
|
||||||
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
|
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
|
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
|
||||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
|
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
|
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
|
||||||
Jens Voss <dukepyrolator@anope.org> Jens VoĂź <jens@pyrobook.(none)>
|
Jens Voss <dukepyrolator@anope.org> <jens@pyrobook.(none)>
|
||||||
|
k4be <k4be@pirc.pl> <34816207+k4bek4be@users.noreply.github.com>
|
||||||
Lee Holmes <lethality@anope.org>
|
Lee Holmes <lethality@anope.org>
|
||||||
Lee Holmes <lethality@anope.org> <lee@lethality.me.uk>
|
Lee Holmes <lethality@anope.org> <lee@lethality.me.uk>
|
||||||
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Matt Schatz <genius3000@g3k.solutions>
|
Matt Schatz <genius3000@g3k.solutions>
|
||||||
Matt Ullman <matt@airraidsirens.com> <blindsight@gamesurge.net>
|
Matt Ullman <matt@airraidsirens.com> <blindsight@gamesurge.net>
|
||||||
Michael Hazell <michaelhazell@hotmail.com> <Techman-@users.noreply.github.com>
|
Michael Hazell <michaelhazell@hotmail.com> <Techman-@users.noreply.github.com>
|
||||||
|
Michael Stapelberg <michael@robustirc.net> <stapelberg@users.noreply.github.com>
|
||||||
Michael Wobst <wobst.michael@web.de>
|
Michael Wobst <wobst.michael@web.de>
|
||||||
Michael Wobst <wobst.michael@web.de> <michael@static.163.129.251.148.clients.your-server.de>
|
Michael Wobst <wobst.michael@web.de> <michael@static.163.129.251.148.clients.your-server.de>
|
||||||
Michael Wobst <wobst.michael@web.de> <michael@wobst.at>
|
Michael Wobst <wobst.michael@web.de> <michael@wobst.at>
|
||||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
|
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
|
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
|
||||||
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
|
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
|
PeGaSuS <droider.pc@gmail.com>
|
||||||
|
PeGaSuS <droider.pc@gmail.com> <25697531+TehPeGaSuS@users.noreply.github.com>
|
||||||
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Robby <robby@chatbelgie.be> <robby@anope.org>
|
Robby <robby@chatbelgie.be> <robby@anope.org>
|
||||||
Robby <robby@chatbelgie.be> <robby@chat.be>
|
Robby <robby@chatbelgie.be> <robby@chat.be>
|
||||||
|
Robert Scheck <robert@fedoraproject.org> <robert-scheck@users.noreply.github.com>
|
||||||
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
|
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Sadie Powell <sadie@witchery.services> Peter Powell <petpow@saberuk.com>
|
Sadie Powell <sadie@sadiepowell.dev> <petpow@saberuk.com>
|
||||||
|
Sadie Powell <sadie@sadiepowell.dev> <sadie@witchery.services>
|
||||||
Sebastian Barfurth <github@afreshmelon.com>
|
Sebastian Barfurth <github@afreshmelon.com>
|
||||||
Sebastian V. <hal9000@denorastats.org>
|
Sebastian V. <hal9000@denorastats.org>
|
||||||
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
|
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||||
|
Val Lorentz <progval+git@progval.net> <progval+git@progval.net>
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
Anope Version 2.0.21-git
|
||||||
|
------------------------
|
||||||
|
No significant changes.
|
||||||
|
|
||||||
|
Anope Version 2.0.20
|
||||||
|
--------------------
|
||||||
|
Fixed an escaped value that wasn't escaped enough in chanstats.
|
||||||
|
Fixed not having a handler for the FNAME message on InspIRCd.
|
||||||
|
Fixed os_stats reporting the SGLine expiry time as the SQLine expiry time.
|
||||||
|
Fixed the DNs and search filters not being escaped correctly in the ldap_authentication and ldap_oper modules.
|
||||||
|
Modernised the advice in docs/LANGUAGE regarding the installation of language packs.
|
||||||
|
|
||||||
Anope Version 2.0.19
|
Anope Version 2.0.19
|
||||||
--------------------
|
--------------------
|
||||||
Added a Doxygen config file.
|
Added a Doxygen config file.
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
Anope Version 2.0.21-git
|
||||||
|
------------------------
|
||||||
|
No significant changes.
|
||||||
|
|
||||||
|
Anope Version 2.0.20
|
||||||
|
--------------------
|
||||||
|
No significant changes.
|
||||||
|
|
||||||
Anope Version 2.0.19
|
Anope Version 2.0.19
|
||||||
--------------------
|
--------------------
|
||||||
No significant changes.
|
No significant changes.
|
||||||
|
|||||||
+2
-2
@@ -61,12 +61,12 @@ TYPEDEF_HIDES_STRUCT = NO
|
|||||||
LOOKUP_CACHE_SIZE = 0
|
LOOKUP_CACHE_SIZE = 0
|
||||||
NUM_PROC_THREADS = 0
|
NUM_PROC_THREADS = 0
|
||||||
TIMESTAMP = NO
|
TIMESTAMP = NO
|
||||||
EXTRACT_ALL = NO
|
EXTRACT_ALL = YES
|
||||||
EXTRACT_PRIVATE = NO
|
EXTRACT_PRIVATE = NO
|
||||||
EXTRACT_PRIV_VIRTUAL = NO
|
EXTRACT_PRIV_VIRTUAL = NO
|
||||||
EXTRACT_PACKAGE = NO
|
EXTRACT_PACKAGE = NO
|
||||||
EXTRACT_STATIC = NO
|
EXTRACT_STATIC = NO
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
EXTRACT_LOCAL_CLASSES = NO
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
EXTRACT_LOCAL_METHODS = NO
|
||||||
EXTRACT_ANON_NSPACES = NO
|
EXTRACT_ANON_NSPACES = NO
|
||||||
RESOLVE_UNNAMED_PARAMS = YES
|
RESOLVE_UNNAMED_PARAMS = YES
|
||||||
|
|||||||
+3
-9
@@ -10,14 +10,9 @@ Anope Multi Language Support
|
|||||||
|
|
||||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||||
|
|
||||||
On Debian install the locales-all package.
|
On Debian-based systems install the locales-all package.
|
||||||
|
|
||||||
On Ubuntu run locale-gen for each language you want to enable.
|
On RHEL-based systems run `yum list glibc-langpack-*` and install the languages you want to enable.
|
||||||
For example:
|
|
||||||
locale-gen es_ES.UTF-8
|
|
||||||
|
|
||||||
Then execute:
|
|
||||||
dpkg-reconfigure locales
|
|
||||||
|
|
||||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||||
|
|
||||||
@@ -34,8 +29,7 @@ Anope Multi Language Support
|
|||||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||||
po files (especially on Windows).
|
po files (especially on Windows).
|
||||||
|
|
||||||
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub
|
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub.
|
||||||
or send it to team@anope.org (don't forget to mention clearly your (nick)name, your email and the language name).
|
|
||||||
You'll of course get full credit for it.
|
You'll of course get full credit for it.
|
||||||
|
|
||||||
3) Using languages with modules
|
3) Using languages with modules
|
||||||
|
|||||||
@@ -166,6 +166,16 @@ class LDAPProvider : public Service
|
|||||||
* @param attributes The attributes to modify
|
* @param attributes The attributes to modify
|
||||||
*/
|
*/
|
||||||
virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
|
virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
|
||||||
|
|
||||||
|
/** Escapes a LDAP string for use in a DN.
|
||||||
|
* @param str The string to escape.
|
||||||
|
*/
|
||||||
|
virtual Anope::string EscapeDN(const Anope::string &str) const = 0;
|
||||||
|
|
||||||
|
/** Escapes a LDAP string for use in a search filter.
|
||||||
|
* @param str The string to escape.
|
||||||
|
*/
|
||||||
|
virtual Anope::string EscapeSF(const Anope::string &str) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ANOPE_LDAP_H
|
#endif // ANOPE_LDAP_H
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ msgstr ""
|
|||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2023-12-17 19:24+0000\n"
|
"POT-Creation-Date: 2023-12-17 19:24+0000\n"
|
||||||
"PO-Revision-Date: 2023-12-17 19:27+0000\n"
|
"PO-Revision-Date: 2023-12-17 19:27+0000\n"
|
||||||
"Last-Translator: Sadie Powell <sadie@witchery.services>\n"
|
"Last-Translator: Sadie Powell <sadie@sadiepowell.dev>\n"
|
||||||
"Language-Team: English\n"
|
"Language-Team: English\n"
|
||||||
"Language: en_US\n"
|
"Language: en_US\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class CommandOSStats : public Command
|
|||||||
{
|
{
|
||||||
/* SQLINEs */
|
/* SQLINEs */
|
||||||
source.Reply(_("Current number of SQLINEs: \002%d\002"), sqlines->GetCount());
|
source.Reply(_("Current number of SQLINEs: \002%d\002"), sqlines->GetCount());
|
||||||
timeout = Config->GetModule("operserv")->Get<time_t>("sglineexpiry", "30d") + 59;
|
timeout = Config->GetModule("operserv")->Get<time_t>("sqlineexpiry", "30d") + 59;
|
||||||
if (timeout >= 172800)
|
if (timeout >= 172800)
|
||||||
source.Reply(_("Default SQLINE expiry time: \002%d days\002"), timeout / 86400);
|
source.Reply(_("Default SQLINE expiry time: \002%d days\002"), timeout / 86400);
|
||||||
else if (timeout >= 86400)
|
else if (timeout >= 86400)
|
||||||
|
|||||||
@@ -388,6 +388,80 @@ class LDAPService : public LDAPProvider, public Thread, public Condition
|
|||||||
QueueRequest(mod);
|
QueueRequest(mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Anope::string EscapeDN(const Anope::string &str) const anope_override
|
||||||
|
{
|
||||||
|
if (str.empty())
|
||||||
|
return str;
|
||||||
|
|
||||||
|
Anope::string newstr;
|
||||||
|
newstr.str().reserve(str.length());
|
||||||
|
for (size_t idx = 0; idx < str.length(); ++idx)
|
||||||
|
{
|
||||||
|
const char chr = str[idx];
|
||||||
|
if (chr == '\0')
|
||||||
|
{
|
||||||
|
newstr.append("\\00");
|
||||||
|
}
|
||||||
|
else if (chr == '"' || chr == '+' || chr == ',' || chr == ';' ||
|
||||||
|
chr == '<' || chr == '=' || chr == '>' || chr == '\\')
|
||||||
|
{
|
||||||
|
newstr.push_back('\\');
|
||||||
|
newstr.push_back(chr);
|
||||||
|
}
|
||||||
|
else if (idx == 0 && (chr == '#' || chr == ' '))
|
||||||
|
{
|
||||||
|
newstr.push_back('\\');
|
||||||
|
newstr.push_back(chr);
|
||||||
|
}
|
||||||
|
else if (idx == str.length() - 1 && chr == ' ')
|
||||||
|
{
|
||||||
|
newstr.push_back('\\');
|
||||||
|
newstr.push_back(chr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newstr.push_back(chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return newstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
Anope::string EscapeSF(const Anope::string &str) const anope_override
|
||||||
|
{
|
||||||
|
if (str.empty())
|
||||||
|
return str;
|
||||||
|
|
||||||
|
Anope::string newstr;
|
||||||
|
newstr.str().reserve(str.length());
|
||||||
|
for (size_t idx = 0; idx < str.length(); ++idx)
|
||||||
|
{
|
||||||
|
const char chr = str[idx];
|
||||||
|
switch (chr)
|
||||||
|
{
|
||||||
|
case '\0':
|
||||||
|
newstr.append("\\00");
|
||||||
|
break;
|
||||||
|
case '(':
|
||||||
|
newstr.append("\\28");
|
||||||
|
break;
|
||||||
|
case ')':
|
||||||
|
newstr.append("\\29");
|
||||||
|
break;
|
||||||
|
case '*':
|
||||||
|
newstr.append("\\2A");
|
||||||
|
break;
|
||||||
|
case '\\':
|
||||||
|
newstr.append("\\5C");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
newstr.push_back(chr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newstr;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void BuildReply(int res, LDAPRequest *req)
|
void BuildReply(int res, LDAPRequest *req)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ class IdentifyInterface : public LDAPInterface
|
|||||||
{
|
{
|
||||||
if (ii->admin_bind)
|
if (ii->admin_bind)
|
||||||
{
|
{
|
||||||
Anope::string sf = search_filter.replace_all_cs("%account", ii->req->GetAccount()).replace_all_cs("%object_class", object_class);
|
Anope::string sf = search_filter
|
||||||
|
.replace_all_cs("%account", ii->lprov->EscapeSF(ii->req->GetAccount()))
|
||||||
|
.replace_all_cs("%object_class", object_class);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log(LOG_DEBUG) << "m_ldap_authentication: searching for " << sf;
|
Log(LOG_DEBUG) << "m_ldap_authentication: searching for " << sf;
|
||||||
@@ -296,7 +298,7 @@ class ModuleLDAPAuthentication : public Module
|
|||||||
attributes[3].name = this->password_attribute;
|
attributes[3].name = this->password_attribute;
|
||||||
attributes[3].values.push_back(pass);
|
attributes[3].values.push_back(pass);
|
||||||
|
|
||||||
Anope::string new_dn = username_attribute + "=" + na->nick + "," + basedn;
|
Anope::string new_dn = username_attribute + "=" + this->ldap->EscapeDN(na->nick) + "," + basedn;
|
||||||
this->ldap->Add(&this->orinterface, new_dn, attributes);
|
this->ldap->Add(&this->orinterface, new_dn, attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,8 +115,12 @@ class LDAPOper : public Module
|
|||||||
throw LDAPException("Could not search LDAP for opertype settings, invalid configuration.");
|
throw LDAPException("Could not search LDAP for opertype settings, invalid configuration.");
|
||||||
|
|
||||||
if (!this->binddn.empty())
|
if (!this->binddn.empty())
|
||||||
this->ldap->Bind(NULL, this->binddn.replace_all_cs("%a", u->Account()->display), this->password.c_str());
|
{
|
||||||
this->ldap->Search(new IdentifyInterface(this, u), this->basedn, this->filter.replace_all_cs("%a", u->Account()->display));
|
Anope::string bdn = this->binddn.replace_all_cs("%a", this->ldap->EscapeDN(u->Account()->display));
|
||||||
|
this->ldap->Bind(NULL, bdn, this->password.c_str());
|
||||||
|
}
|
||||||
|
Anope::string af = this->filter.replace_all_cs("%a", this->ldap->EscapeSF(u->Account()->display));
|
||||||
|
this->ldap->Search(new IdentifyInterface(this, u), this->basedn, af);
|
||||||
}
|
}
|
||||||
catch (const LDAPException &ex)
|
catch (const LDAPException &ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -343,14 +343,16 @@ class MChanstats : public Module
|
|||||||
"(nick_, '', 'total'), (nick_, '', 'monthly'),"
|
"(nick_, '', 'total'), (nick_, '', 'monthly'),"
|
||||||
"(nick_, '', 'weekly'), (nick_, '', 'daily');"
|
"(nick_, '', 'weekly'), (nick_, '', 'daily');"
|
||||||
"END IF;"
|
"END IF;"
|
||||||
|
"SET @echan = chan_;"
|
||||||
|
"SET @enick = nick_;"
|
||||||
"SET @update_query = CONCAT('UPDATE `" + prefix + "chanstats` SET line=line+', line_, ',"
|
"SET @update_query = CONCAT('UPDATE `" + prefix + "chanstats` SET line=line+', line_, ',"
|
||||||
"letters=letters+', letters_, ' , words=words+', words_, ', actions=actions+', actions_, ', "
|
"letters=letters+', letters_, ' , words=words+', words_, ', actions=actions+', actions_, ', "
|
||||||
"smileys_happy=smileys_happy+', sm_h_, ', smileys_sad=smileys_sad+', sm_s_, ', "
|
"smileys_happy=smileys_happy+', sm_h_, ', smileys_sad=smileys_sad+', sm_s_, ', "
|
||||||
"smileys_other=smileys_other+', sm_o_, ', kicks=kicks+', kicks_, ', kicked=kicked+', kicked_, ', "
|
"smileys_other=smileys_other+', sm_o_, ', kicks=kicks+', kicks_, ', kicked=kicked+', kicked_, ', "
|
||||||
"modes=modes+', modes_, ', topics=topics+', topics_, ', ', time_ , '=', time_, '+', line_ ,' "
|
"modes=modes+', modes_, ', topics=topics+', topics_, ', ', time_ , '=', time_, '+', line_ ,' "
|
||||||
"WHERE (nick='''' OR nick=''', nick_, ''') AND (chan='''' OR chan=''', chan_, ''')');"
|
"WHERE (nick='''' OR nick=?) AND (chan='''' OR chan=?)');"
|
||||||
"PREPARE update_query FROM @update_query;"
|
"PREPARE update_query FROM @update_query;"
|
||||||
"EXECUTE update_query;"
|
"EXECUTE update_query using @enick, @echan;"
|
||||||
"DEALLOCATE PREPARE update_query;"
|
"DEALLOCATE PREPARE update_query;"
|
||||||
"END";
|
"END";
|
||||||
this->RunQuery(query);
|
this->RunQuery(query);
|
||||||
|
|||||||
@@ -1327,6 +1327,21 @@ struct IRCDMessageFIdent : IRCDMessage
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct IRCDMessageFName
|
||||||
|
: IRCDMessage
|
||||||
|
{
|
||||||
|
IRCDMessageFName(Module *creator)
|
||||||
|
: IRCDMessage(creator, "FNAME", 1)
|
||||||
|
{
|
||||||
|
SetFlag(IRCDMESSAGE_REQUIRE_USER);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||||
|
{
|
||||||
|
source.GetUser()->SetRealname(params[0]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct IRCDMessageKick : IRCDMessage
|
struct IRCDMessageKick : IRCDMessage
|
||||||
{
|
{
|
||||||
IRCDMessageKick(Module *creator) : IRCDMessage(creator, "KICK", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
|
IRCDMessageKick(Module *creator) : IRCDMessage(creator, "KICK", 3) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
|
||||||
@@ -1909,6 +1924,7 @@ class ProtoInspIRCd3 : public Module
|
|||||||
IRCDMessageEndburst message_endburst;
|
IRCDMessageEndburst message_endburst;
|
||||||
IRCDMessageFHost message_fhost;
|
IRCDMessageFHost message_fhost;
|
||||||
IRCDMessageFIdent message_fident;
|
IRCDMessageFIdent message_fident;
|
||||||
|
IRCDMessageFName message_fname;
|
||||||
IRCDMessageFJoin message_fjoin;
|
IRCDMessageFJoin message_fjoin;
|
||||||
IRCDMessageFMode message_fmode;
|
IRCDMessageFMode message_fmode;
|
||||||
IRCDMessageFTopic message_ftopic;
|
IRCDMessageFTopic message_ftopic;
|
||||||
@@ -1939,8 +1955,8 @@ class ProtoInspIRCd3 : public Module
|
|||||||
message_error(this), message_invite(this), message_kill(this), message_motd(this), message_notice(this),
|
message_error(this), message_invite(this), message_kill(this), message_motd(this), message_notice(this),
|
||||||
message_part(this), message_privmsg(this), message_quit(this), message_stats(this), message_time(this),
|
message_part(this), message_privmsg(this), message_quit(this), message_stats(this), message_time(this),
|
||||||
message_away(this), message_capab(this), message_encap(this), message_endburst(this), message_fhost(this),
|
message_away(this), message_capab(this), message_encap(this), message_endburst(this), message_fhost(this),
|
||||||
message_fident(this), message_fjoin(this), message_fmode(this), message_ftopic(this), message_idle(this),
|
message_fident(this), message_fname(this), message_fjoin(this), message_fmode(this), message_ftopic(this),
|
||||||
message_ijoin(this), message_kick(this), message_metadata(this, use_server_side_topiclock, use_server_side_mlock, ircd_proto.maxlist),
|
message_idle(this), message_ijoin(this), message_kick(this), message_metadata(this, use_server_side_topiclock, use_server_side_mlock, ircd_proto.maxlist),
|
||||||
message_mode(this), message_nick(this), message_opertype(this), message_ping(this), message_rsquit(this),
|
message_mode(this), message_nick(this), message_opertype(this), message_ping(this), message_rsquit(this),
|
||||||
message_save(this), message_server(this), message_squit(this), message_uid(this)
|
message_save(this), message_server(this), message_squit(this), message_uid(this)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
VERSION_MAJOR=2
|
VERSION_MAJOR=2
|
||||||
VERSION_MINOR=0
|
VERSION_MINOR=0
|
||||||
VERSION_PATCH=19
|
VERSION_PATCH=21
|
||||||
VERSION_EXTRA=""
|
VERSION_EXTRA="-git"
|
||||||
|
|||||||
Reference in New Issue
Block a user