mirror of
https://github.com/anope/anope.git
synced 2026-07-09 04:03:13 +02:00
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Conflicts: include/config.h
This commit is contained in:
@@ -620,7 +620,6 @@ int ServerConfig::Read(bool bail)
|
||||
{"serverinfo", "hostname", "", new ValueContainerChar(&Config.ServiceHost), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
|
||||
{"serverinfo", "pid", "services.pid", new ValueContainerChar(&Config.PIDFilename), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty},
|
||||
{"serverinfo", "motd", "services.motd", new ValueContainerChar(&Config.MOTDFilename), DT_CHARPTR, ValidateNotEmpty},
|
||||
{"networkinfo", "helpchannel", "", new ValueContainerChar(&Config.HelpChannel), DT_CHARPTR, NoValidation},
|
||||
{"networkinfo", "logchannel", "", new ValueContainerChar(&Config.LogChannel), DT_CHARPTR, NoValidation},
|
||||
{"networkinfo", "logbot", "no", new ValueContainerBool(&Config.LogBot), DT_BOOLEAN, NoValidation},
|
||||
{"networkinfo", "networkname", "", new ValueContainerChar(&Config.NetworkName), DT_CHARPTR, ValidateNotEmpty},
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class HelpChannel : public Module
|
||||
{
|
||||
ci::string HelpChan;
|
||||
|
||||
public:
|
||||
HelpChannel(const std::string &modname, const std::string &creator) : Module(modname, creator)
|
||||
{
|
||||
this->SetAuthor("Anope");
|
||||
this->SetVersion(VERSION_STRING);
|
||||
this->SetType(SUPPORTED);
|
||||
|
||||
Implementation i[] = { I_OnChannelModeSet, I_OnReload };
|
||||
ModuleManager::Attach(i, this, 2);
|
||||
|
||||
OnReload(true);
|
||||
}
|
||||
|
||||
EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const std::string ¶m)
|
||||
{
|
||||
if (Name == CMODE_OP && c && c->ci && c->name == this->HelpChan)
|
||||
{
|
||||
User *u = finduser(param);
|
||||
|
||||
if (u)
|
||||
u->SetMode(OperServ, UMODE_HELPOP);
|
||||
}
|
||||
|
||||
return EVENT_CONTINUE;
|
||||
}
|
||||
|
||||
void OnReload(bool)
|
||||
{
|
||||
ConfigReader config;
|
||||
|
||||
this->HelpChan = config.ReadValue("m_helpchan", "helpchannel", "", 0).c_str();
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(HelpChannel)
|
||||
+35
-4
@@ -497,6 +497,37 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (input == "y")
|
||||
broken = 1;
|
||||
input = "";
|
||||
while (input != "y" && input != "n")
|
||||
{
|
||||
std::cout << std::endl << "Are you converting a 1.8.x database? (y/n) " << std::endl << "? ";
|
||||
std::cin >> input;
|
||||
}
|
||||
/* 1.8 doesn't have nickserv etc in bot.db, create them */
|
||||
if (input == "y")
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
fs << "BI NickServ NickServ services.anope.org " << now << " 0 :NickServ" << std::endl;
|
||||
fs << "MD FLAGS NICKSERV" << std::endl;
|
||||
|
||||
fs << "BI ChanServ ChanServ services.anope.org " << now << " 0 :ChanServ" << std::endl;
|
||||
fs << "MD FLAGS CHANSERV" << std::endl;
|
||||
|
||||
fs << "BI BotServ BotServ services.anope.org " << now << " 0 :BotServ" << std::endl;
|
||||
fs << "MD FLAGS BOTSERV" << std::endl;
|
||||
|
||||
fs << "BI HostServ HostServ services.anope.org " << now << " 0 :HostServ" << std::endl;
|
||||
fs << "MD FLAGS HOSTSERV" << std::endl;
|
||||
|
||||
fs << "BI OperServ OperServ services.anope.org " << now << " 0 :OperServ" << std::endl;
|
||||
fs << "MD FLAGS OPERSERV" << std::endl;
|
||||
|
||||
fs << "BI MemoServ MemoServ services.anope.org " << now << " 0 :MemoServ" << std::endl;
|
||||
fs << "MD FLAGS MEMOSERV" << std::endl;
|
||||
|
||||
fs << "BI Global Global services.anope.org " << now << " 0: Global" << std::endl;
|
||||
fs << "MD FLAGS GLOBAL" << std::endl;
|
||||
}
|
||||
|
||||
while ((c = getc_db(f)) == 1) {
|
||||
READ(read_string(&nick, f));
|
||||
@@ -854,16 +885,16 @@ int main(int argc, char *argv[])
|
||||
process_mlock_modes(fs, ci->mlock_off, ircd);
|
||||
fs << std::endl;
|
||||
}
|
||||
if (ci->mlock_limit || ci->mlock_key || ci->mlock_flood || ci->mlock_redirect)
|
||||
if (ci->mlock_limit || (ci->mlock_key && *ci->mlock_key) || (ci->mlock_flood && *ci->mlock_flood) || (ci->mlock_redirect && *ci->mlock_redirect))
|
||||
{
|
||||
fs << "MD MLP";
|
||||
if (ci->mlock_limit)
|
||||
fs << " CMODE_LIMIT " << ci->mlock_limit;
|
||||
if (ci->mlock_key)
|
||||
if (ci->mlock_key && *ci->mlock_key)
|
||||
fs << " CMODE_KEY " << ci->mlock_key;
|
||||
if (ci->mlock_flood)
|
||||
if (ci->mlock_flood && *ci->mlock_flood)
|
||||
fs << " CMODE_FLOOD " << ci->mlock_flood;
|
||||
if (ci->mlock_redirect)
|
||||
if (ci->mlock_redirect && *ci->mlock_redirect)
|
||||
fs << " CMODE_REDIRECT " << ci->mlock_redirect;
|
||||
fs << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user