summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_httpd_stats.cpp3
-rw-r--r--src/modules/m_nonicks.cpp13
-rw-r--r--src/server.cpp24
3 files changed, 19 insertions, 21 deletions
diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp
index 8899a363e..7e478ade4 100644
--- a/src/modules/m_httpd_stats.cpp
+++ b/src/modules/m_httpd_stats.cpp
@@ -96,8 +96,7 @@ class ModuleHttpStats : public Module
data << "<server><name>" << ServerInstance->Config->ServerName << "</name><gecos>"
<< Sanitize(ServerInstance->Config->ServerDesc) << "</gecos><version>"
- << Sanitize(ServerInstance->GetVersionString()) << "</version><revision>"
- << Sanitize(ServerInstance->GetRevision()) << "</revision></server>";
+ << Sanitize(ServerInstance->GetVersionString()) << "</version></server>";
data << "<general>";
data << "<usercount>" << ServerInstance->Users->clientlist->size() << "</usercount>";
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 368eaa343..e7903acc4 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -46,11 +46,13 @@ class NoNicks : public ModeHandler
class ModuleNoNickChange : public Module
{
NoNicks nn;
+ bool override;
public:
ModuleNoNickChange() : nn(this)
{
+ OnRehash(NULL);
ServerInstance->Modes->AddMode(&nn);
- Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric };
+ Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash };
ServerInstance->Modules->Attach(eventlist, this, 2);
}
@@ -91,6 +93,9 @@ class ModuleNoNickChange : public Module
if (res == MOD_RES_ALLOW)
continue;
+ if (override && IS_OPER(user))
+ continue;
+
if (!curr->GetExtBanStatus(user, 'N').check(!curr->IsModeSet('N')))
{
user->WriteNumeric(ERR_CANTCHANGENICK, "%s :Can't change nickname while on %s (+N is set)",
@@ -101,6 +106,12 @@ class ModuleNoNickChange : public Module
return MOD_RES_PASSTHRU;
}
+
+ virtual void OnRehash(User* user)
+ {
+ ConfigReader Conf;
+ override = Conf.ReadFlag("nonicks", "operoverride", "no", 0);
+ }
};
MODULE_INIT(ModuleNoNickChange)
diff --git a/src/server.cpp b/src/server.cpp
index 8b2c9a672..57b853ebb 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -18,17 +18,15 @@
#include "inspircd.h"
#include "inspircd_version.h"
-
void InspIRCd::SignalHandler(int signal)
{
- switch (signal)
+ if (signal == SIGHUP)
+ {
+ Rehash("Caught SIGHUP");
+ }
+ else if (signal == SIGTERM)
{
- case SIGHUP:
- Rehash("due to SIGHUP");
- break;
- case SIGTERM:
- Exit(signal);
- break;
+ Exit(signal);
}
}
@@ -61,11 +59,6 @@ void RehashHandler::Call(const std::string &reason)
}
}
-void InspIRCd::RehashServer()
-{
- this->Rehash("");
-}
-
std::string InspIRCd::GetVersionString()
{
char versiondata[MAXBUF];
@@ -92,11 +85,6 @@ void InspIRCd::BuildISupport()
Config->Update005();
}
-std::string InspIRCd::GetRevision()
-{
- return REVISION;
-}
-
void InspIRCd::IncrementUID(int pos)
{
/*