mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Change to <type:vhost> and <oper:vhost> because <oper:host> is taken.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11957 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
efc75198de
commit
38e125bdb8
@ -12,10 +12,10 @@
|
||||
# #
|
||||
|
||||
<class
|
||||
name="Shutdown"
|
||||
name="Shutdown"
|
||||
|
||||
# commands: oper commands that users of this class can run.
|
||||
commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOAD GUNLOADMODULE GRELOADMODULE SAJOIN SAPART SANICK SAQUIT SATOPIC"
|
||||
commands="DIE RESTART REHASH LOADMODULE UNLOADMODULE RELOAD GUNLOADMODULE GRELOADMODULE SAJOIN SAPART SANICK SAQUIT SATOPIC"
|
||||
|
||||
# privs: special privileges that users with this class may utilise.
|
||||
# VIEWING:
|
||||
@ -34,7 +34,7 @@
|
||||
privs="users/auspex channels/auspex servers/auspex users/mass-message channels/high-join-limit channels/set-permanent users/flood/no-throttle users/flood/increased-buffers"
|
||||
|
||||
# usermodes: Oper-only usermodes that opers with this class can use.
|
||||
usermodes="*"
|
||||
usermodes="*"
|
||||
|
||||
# chanmodes: Oper-only channel modes that opers with this class can use.
|
||||
chanmodes="*">
|
||||
@ -61,16 +61,16 @@
|
||||
# classes: classes (above blocks) that this type belongs to.
|
||||
classes="OperChat BanControl HostCloak Shutdown ServerLink"
|
||||
|
||||
# host: host oper gets on oper-up. This is optional.
|
||||
host="netadmin.omega.org.za"
|
||||
# vhost: host oper gets on oper-up. This is optional.
|
||||
vhost="netadmin.omega.org.za"
|
||||
|
||||
# modes: usermodes besides +o that are set on a oper of this type
|
||||
# when they oper up. Used for snomasks and other things.
|
||||
# Requires that m_opermodes.so be loaded.
|
||||
modes="+s +cCqQ">
|
||||
|
||||
<type name="GlobalOp" classes="OperChat BanControl HostCloak ServerLink" host="ircop.omega.org.za">
|
||||
<type name="Helper" classes="HostCloak" host="helper.omega.org.za">
|
||||
<type name="GlobalOp" classes="OperChat BanControl HostCloak ServerLink" vhost="ircop.omega.org.za">
|
||||
<type name="Helper" classes="HostCloak" vhost="helper.omega.org.za">
|
||||
|
||||
|
||||
#-#-#-#-#-#-#-#-#-#-#- OPERATOR CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
|
||||
@ -80,7 +80,7 @@
|
||||
# #
|
||||
|
||||
# oline with plain-text password
|
||||
<oper
|
||||
<oper
|
||||
# name: oper login that is used to oper up (/oper name password).
|
||||
# Remember: This is case sensitive
|
||||
name="Brain"
|
||||
@ -111,6 +111,10 @@
|
||||
# are loaded.
|
||||
#sslonly="yes"
|
||||
|
||||
# vhost: overrides the vhost in the type block. Class and modes may also
|
||||
# be overridden
|
||||
vhost="brain.netadmin.omega"
|
||||
|
||||
# type: What oper type this oline is. See the block above for list
|
||||
# of types. NOTE: This is case-sensitive as well.
|
||||
type="NetAdmin">
|
||||
@ -124,7 +128,7 @@
|
||||
type="NetAdmin">
|
||||
|
||||
# oline with hashed password. It is highly recommended to use hashed passwords.
|
||||
<oper
|
||||
<oper
|
||||
# name: oper login that is used to oper up (/oper name password).
|
||||
# Remember: This is case sensitive
|
||||
name="Brain"
|
||||
|
@ -65,6 +65,8 @@ class CoreExport ConfigTag : public refcountbase
|
||||
|
||||
std::string getTagLocation();
|
||||
|
||||
inline const std::vector<KeyVal>& getItems() const { return items; }
|
||||
|
||||
/** Create a new ConfigTag, giving access to the private KeyVal item list */
|
||||
static ConfigTag* create(const std::string& Tag, const std::string& file, int line,
|
||||
std::vector<KeyVal>*&items);
|
||||
|
@ -256,16 +256,17 @@ class BanCacheManager;
|
||||
class CoreExport ConfigReaderThread : public Thread
|
||||
{
|
||||
ServerConfig* Config;
|
||||
bool done;
|
||||
volatile bool done;
|
||||
public:
|
||||
std::string TheUserUID;
|
||||
const std::string TheUserUID;
|
||||
ConfigReaderThread(const std::string &useruid)
|
||||
: Thread(), done(false), TheUserUID(useruid)
|
||||
: Config(new ServerConfig), done(false), TheUserUID(useruid)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ConfigReaderThread()
|
||||
{
|
||||
delete Config;
|
||||
}
|
||||
|
||||
void Run();
|
||||
|
@ -73,15 +73,6 @@ CmdResult CommandOper::HandleLocal(const std::vector<std::string>& parameters, L
|
||||
if (match_pass && match_hosts)
|
||||
{
|
||||
/* found this oper's opertype */
|
||||
std::string host = ifo->getConfig("host");
|
||||
if (!host.empty())
|
||||
user->ChangeDisplayedHost(host.c_str());
|
||||
std::string opClass = ifo->getConfig("class");
|
||||
if (!opClass.empty())
|
||||
{
|
||||
user->SetClass(opClass);
|
||||
user->CheckClass();
|
||||
}
|
||||
user->Oper(ifo);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -925,7 +925,6 @@ std::string ServerConfig::GetSID()
|
||||
|
||||
void ConfigReaderThread::Run()
|
||||
{
|
||||
Config = new ServerConfig;
|
||||
Config->Read();
|
||||
done = true;
|
||||
}
|
||||
@ -957,7 +956,7 @@ void ConfigReaderThread::Finish()
|
||||
FOREACH_MOD(I_OnRehash, OnRehash(user));
|
||||
ServerInstance->BuildISupport();
|
||||
|
||||
delete old;
|
||||
Config = old;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -965,6 +964,5 @@ void ConfigReaderThread::Finish()
|
||||
ServerInstance->Logs->CloseLogs();
|
||||
ServerInstance->Config = old;
|
||||
ServerInstance->Logs->OpenFileLogs();
|
||||
delete this->Config;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,11 @@ void ListenSocket::AcceptInternal()
|
||||
}
|
||||
}
|
||||
if (res != MOD_RES_ALLOW)
|
||||
{
|
||||
ServerInstance->Logs->Log("SOCKET",DEFAULT,"Refusing connection on %s - %s",
|
||||
bind_desc.c_str(), res == MOD_RES_DENY ? "Connection refused by module" : "Module for this port not found");
|
||||
ServerInstance->SE->Close(incomingSockfd);
|
||||
}
|
||||
}
|
||||
|
||||
void ListenSocket::HandleEvent(EventType e, int err)
|
||||
|
@ -91,7 +91,7 @@ class ModuleHttpStats : public Module
|
||||
{
|
||||
data << "<" << x->first << " ";
|
||||
ConfigTag* tag = x->second;
|
||||
for (std::vector<KeyVal>::iterator j = tag->items.begin(); j != tag->items.end(); j++)
|
||||
for (std::vector<KeyVal>::const_iterator j = tag->getItems().begin(); j != tag->getItems().end(); j++)
|
||||
{
|
||||
data << Sanitize(j->first) << "="" << Sanitize(j->second) << "" ";
|
||||
}
|
||||
|
@ -628,18 +628,32 @@ void User::Oper(OperInfo* info)
|
||||
if (info->oper_block)
|
||||
opername = info->oper_block->getString("name");
|
||||
|
||||
ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')",
|
||||
nick.c_str(), ident.c_str(), host.c_str(), info->NameStr(), opername.c_str());
|
||||
this->WriteNumeric(381, "%s :You are now %s %s", nick.c_str(), strchr("aeiouAEIOU", info->name[0]) ? "an" : "a", info->NameStr());
|
||||
if (IS_LOCAL(this))
|
||||
{
|
||||
LocalUser* l = IS_LOCAL(this);
|
||||
std::string vhost = oper->getConfig("vhost");
|
||||
if (!vhost.empty())
|
||||
l->ChangeDisplayedHost(vhost.c_str());
|
||||
std::string opClass = oper->getConfig("class");
|
||||
if (!opClass.empty())
|
||||
{
|
||||
l->SetClass(opClass);
|
||||
l->CheckClass();
|
||||
}
|
||||
}
|
||||
|
||||
ServerInstance->Logs->Log("OPER", DEFAULT, "%s!%s@%s opered as type: %s", this->nick.c_str(), this->ident.c_str(), this->host.c_str(), info->NameStr());
|
||||
ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')",
|
||||
nick.c_str(), ident.c_str(), host.c_str(), oper->NameStr(), opername.c_str());
|
||||
this->WriteNumeric(381, "%s :You are now %s %s", nick.c_str(), strchr("aeiouAEIOU", oper->name[0]) ? "an" : "a", oper->NameStr());
|
||||
|
||||
ServerInstance->Logs->Log("OPER", DEFAULT, "%s!%s@%s opered as type: %s", this->nick.c_str(), this->ident.c_str(), this->host.c_str(), oper->NameStr());
|
||||
ServerInstance->Users->all_opers.push_back(this);
|
||||
|
||||
// Expand permissions from config for faster lookup
|
||||
if (IS_LOCAL(this))
|
||||
oper->init();
|
||||
|
||||
FOREACH_MOD(I_OnPostOper,OnPostOper(this, info->name, opername));
|
||||
FOREACH_MOD(I_OnPostOper,OnPostOper(this, oper->name, opername));
|
||||
}
|
||||
|
||||
void OperInfo::init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user