*/
bool SilentULine(const std::string& server);
- /** Returns the subversion revision ID of this ircd
- * @return The revision ID or an empty string
- */
- std::string GetRevision();
-
/** Returns the full version string of this ircd
* @return The version string
*/
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>";
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);
}
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)",
return MOD_RES_PASSTHRU;
}
+
+ virtual void OnRehash(User* user)
+ {
+ ConfigReader Conf;
+ override = Conf.ReadFlag("nonicks", "operoverride", "no", 0);
+ }
};
MODULE_INIT(ModuleNoNickChange)
#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);
}
}
}
}
-void InspIRCd::RehashServer()
-{
- this->Rehash("");
-}
-
std::string InspIRCd::GetVersionString()
{
char versiondata[MAXBUF];
Config->Update005();
}
-std::string InspIRCd::GetRevision()
-{
- return REVISION;
-}
-
void InspIRCd::IncrementUID(int pos)
{
/*