From 8f6f2a2c479d7f13a59e283e8566c6779dc99112 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 2 Jan 2016 17:15:26 -0500 Subject: Add sasl log category for auth log messages --- include/modules/sasl.h | 4 ++-- modules/m_sasl.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/modules/sasl.h b/include/modules/sasl.h index ec6d741ca..eca31d4af 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -92,7 +92,7 @@ namespace SASL Session *s = sasl->GetSession(uid); if (s) { - Log(Config->GetClient("NickServ")) << "A user identified to account " << this->GetAccount() << " using SASL"; + Log(Config->GetClient("NickServ"), "sasl") << "A user identified to account " << this->GetAccount() << " using SASL"; sasl->Succeed(s, na->nc); delete s; } @@ -117,7 +117,7 @@ namespace SASL else if (na->nc->HasExt("NS_SUSPENDED")) accountstatus = "suspended "; - Log(Config->GetClient("NickServ")) << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL"; + Log(Config->GetClient("NickServ"), "sasl") << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL"; } }; } diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index ddfd84cbf..1891f8367 100644 --- a/modules/m_sasl.cpp +++ b/modules/m_sasl.cpp @@ -107,12 +107,13 @@ class External : public Mechanism NickCore *nc = certs->FindAccountFromCert(mysess->cert); if (!nc || nc->HasExt("NS_SUSPENDED")) { + Log(Config->GetClient("NickServ"), "sasl") << "A user failed to identify to account " << nc->display << " using SASL EXTERNAL"; sasl->Fail(sess); delete sess; return; } - Log(Config->GetClient("NickServ")) << "A user identified to account " << nc->display << " using SASL EXTERNAL"; + Log(Config->GetClient("NickServ"), "sasl") << "A user identified to account " << nc->display << " using SASL EXTERNAL"; sasl->Succeed(sess, nc); delete sess; } -- cgit From 0a3757627039a321922c07e540590d8cb7e60b90 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 2 Jan 2016 17:19:08 -0500 Subject: Actually there is no account here --- modules/m_sasl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/m_sasl.cpp b/modules/m_sasl.cpp index 1891f8367..71b16bb70 100644 --- a/modules/m_sasl.cpp +++ b/modules/m_sasl.cpp @@ -107,7 +107,7 @@ class External : public Mechanism NickCore *nc = certs->FindAccountFromCert(mysess->cert); if (!nc || nc->HasExt("NS_SUSPENDED")) { - Log(Config->GetClient("NickServ"), "sasl") << "A user failed to identify to account " << nc->display << " using SASL EXTERNAL"; + Log(Config->GetClient("NickServ"), "sasl") << "A user failed to identify using certificate " << mysess->cert << " using SASL EXTERNAL"; sasl->Fail(sess); delete sess; return; -- cgit From 4e675c50e59a64c1dabad101c798daca182cec57 Mon Sep 17 00:00:00 2001 From: Zoddo Date: Sun, 3 Jan 2016 16:31:45 +0100 Subject: [Unreal4] Use UID/SID instead of nick/servername when possible --- modules/protocol/unreal4.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index 52241a59b..3ba1de6fd 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -38,7 +38,7 @@ class UnrealIRCdProto : public IRCDProto /* SVSNOOP */ void SendSVSNOOP(const Server *server, bool set) anope_override { - UplinkSocket::Message() << "SVSNOOP " << server->GetName() << " " << (set ? "+" : "-"); + UplinkSocket::Message() << "SVSNOOP " << server->GetSID() << " " << (set ? "+" : "-"); } void SendAkillDel(const XLine *x) anope_override @@ -130,13 +130,13 @@ class UnrealIRCdProto : public IRCDProto void SendSVSKillInternal(const MessageSource &source, User *user, const Anope::string &buf) anope_override { - UplinkSocket::Message(source) << "SVSKILL " << user->nick << " :" << buf; + UplinkSocket::Message(source) << "SVSKILL " << user->GetUID() << " :" << buf; user->KillInternal(source, buf); } void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) anope_override { - UplinkSocket::Message(source) << "SVS2MODE " << u->nick <<" " << buf; + UplinkSocket::Message(source) << "SVS2MODE " << u->GetUID() <<" " << buf; } void SendClientIntroduction(User *u) anope_override @@ -158,7 +158,7 @@ class UnrealIRCdProto : public IRCDProto /* JOIN */ void SendJoin(User *user, Channel *c, const ChannelStatus *status) anope_override { - UplinkSocket::Message(Me) << "SJOIN " << c->creation_time << " " << c->name << " :" << user->nick; + UplinkSocket::Message(Me) << "SJOIN " << c->creation_time << " " << c->name << " :" << user->GetUID(); if (status) { /* First save the channel status incase uc->Status == status */ @@ -201,9 +201,9 @@ class UnrealIRCdProto : public IRCDProto void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override { if (!vIdent.empty()) - UplinkSocket::Message(Me) << "CHGIDENT " << u->nick << " " << vIdent; + UplinkSocket::Message(Me) << "CHGIDENT " << u->GetUID() << " " << vIdent; if (!vhost.empty()) - UplinkSocket::Message(Me) << "CHGHOST " << u->nick << " " << vhost; + UplinkSocket::Message(Me) << "CHGHOST " << u->GetUID() << " " << vhost; } void SendConnect() anope_override -- cgit From 2e370f6ed5d8ecb7a649c02fb083d3c6c80d5c48 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 19 Jan 2016 21:02:57 +0000 Subject: Error out if any 1.8 modules are in the the module directory. --- modules/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 26af2745e..02139a0e5 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -12,6 +12,10 @@ macro(build_modules SRC) if(IS_DIRECTORY "${MODULE_SRC}") build_modules("${MODULE_SRC}") else(IS_DIRECTORY "${MODULE_SRC}") + string(REGEX MATCH "\\.c$" ANOPE18MODULE ${MODULE_SRC}) + if(ANOPE18MODULE) + message(FATAL_ERROR "Anope 1 modules are not compatible with Anope 2!\nOffending module: ${MODULE_SRC}") + endif(ANOPE18MODULE) string(REGEX MATCH "\\.cpp$" CPP ${MODULE_SRC}) if(CPP) set_source_files_properties(${MODULE_SRC} PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}") -- cgit