summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_mysql.cpp6
-rw-r--r--src/modules/m_silence.cpp10
-rw-r--r--src/modules/m_xline_db.cpp2
-rw-r--r--src/usermanager.cpp2
-rw-r--r--src/xline.cpp2
5 files changed, 18 insertions, 4 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index 1cb3635bb..d8dda27a4 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -255,6 +255,12 @@ class SQLConnection : public SQLProvider
bool rv = mysql_real_connect(connection, host.c_str(), user.c_str(), pass.c_str(), dbname.c_str(), port, NULL, 0);
if (!rv)
return rv;
+
+ // Enable character set settings
+ std::string charset = config->getString("charset");
+ if ((!charset.empty()) && (mysql_set_character_set(connection, charset.c_str())))
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "WARNING: Could not set character set to \"%s\"", charset.c_str());
+
std::string initquery;
if (config->readString("initialquery", initquery))
{
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 91822b4e4..502f947f4 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -291,6 +291,7 @@ class CommandSilence : public Command
class ModuleSilence : public Module
{
unsigned int maxsilence;
+ bool ExemptULine;
CommandSilence cmdsilence;
CommandSVSSilence cmdsvssilence;
public:
@@ -302,9 +303,13 @@ class ModuleSilence : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
- maxsilence = ServerInstance->Config->ConfValue("silence")->getInt("maxentries", 32);
+ ConfigTag* tag = ServerInstance->Config->ConfValue("silence");
+
+ maxsilence = tag->getInt("maxentries", 32);
if (!maxsilence)
maxsilence = 32;
+
+ ExemptULine = tag->getBool("exemptuline", true);
}
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
@@ -351,6 +356,9 @@ class ModuleSilence : public Module
ModResult MatchPattern(User* dest, User* source, int pattern)
{
+ if (ExemptULine && source->server->IsULine())
+ return MOD_RES_PASSTHRU;
+
silencelist* sl = cmdsilence.ext.get(dest);
if (sl)
{
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp
index ae8b209e3..c514ffb76 100644
--- a/src/modules/m_xline_db.cpp
+++ b/src/modules/m_xline_db.cpp
@@ -120,7 +120,7 @@ class ModuleXLineDB : public Module
XLine* line = i->second;
stream << "LINE " << line->type << " " << line->Displayable() << " "
<< ServerInstance->Config->ServerName << " " << line->set_time << " "
- << line->duration << " " << line->reason << std::endl;
+ << line->duration << " :" << line->reason << std::endl;
}
}
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 5d07c4d79..1966c9b47 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -136,7 +136,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
/* user banned */
ServerInstance->Logs->Log("BANCACHE", LOG_DEBUG, "BanCache: Positive hit for " + New->GetIPString());
if (!ServerInstance->Config->XLineMessage.empty())
- New->WriteNotice("*** " + ServerInstance->Config->XLineMessage);
+ New->WriteNumeric(ERR_YOUREBANNEDCREEP, ":" + ServerInstance->Config->XLineMessage);
this->QuitUser(New, b->Reason);
return;
}
diff --git a/src/xline.cpp b/src/xline.cpp
index 13124a392..dedf8c7a9 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -531,7 +531,7 @@ void XLine::DefaultApply(User* u, const std::string &line, bool bancache)
const std::string banReason = line + "-Lined: " + reason;
if (!ServerInstance->Config->XLineMessage.empty())
- u->WriteNotice("*** " + ServerInstance->Config->XLineMessage);
+ u->WriteNumeric(ERR_YOUREBANNEDCREEP, ":" + ServerInstance->Config->XLineMessage);
if (ServerInstance->Config->HideBans)
ServerInstance->Users->QuitUser(u, line + "-Lined", &banReason);