diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 7 | ||||
-rw-r--r-- | src/configreader.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index d82ad6c23..c7913606f 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -162,6 +162,9 @@ void Channel::SetDefaultModes() ModeHandler* mode = ServerInstance->Modes->FindMode(*n, MODETYPE_CHANNEL); if (mode) { + if (mode->GetPrefixRank()) + continue; + if (mode->GetNumParams(true)) list.GetToken(parameter); else @@ -223,7 +226,7 @@ Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, co if (!chan) { - privs = "o"; + privs = ServerInstance->Config->DefaultModes.substr(0, ServerInstance->Config->DefaultModes.find(' ')); if (override == false) { @@ -343,7 +346,7 @@ void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, boo for (std::string::const_iterator i = privs->begin(); i != privs->end(); ++i) { ModeHandler* mh = ServerInstance->Modes->FindMode(*i, MODETYPE_CHANNEL); - if (mh) + if (mh && mh->GetPrefixRank()) { std::string nick = user->nick; /* Set, and make sure that the mode handler knows this mode was now set */ diff --git a/src/configreader.cpp b/src/configreader.cpp index d7d448bc4..27b9e5c77 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -401,7 +401,7 @@ void ServerConfig::Fill() UndernetMsgPrefix = options->getBool("ircumsgprefix"); FullHostInTopic = options->getBool("hostintopic"); MaxTargets = security->getInt("maxtargets", 20, 1, 31); - DefaultModes = options->getString("defaultmodes", "nt"); + DefaultModes = options->getString("defaultmodes", "not"); PID = ConfValue("pid")->getString("file"); MaxChans = ConfValue("channels")->getInt("users", 20); OperMaxChans = ConfValue("channels")->getInt("opers", 60); |