mirror of
https://github.com/anope/anope.git
synced 2026-06-27 20:26:38 +02:00
Fix setting +o on opers on login.
This commit is contained in:
+8
-6
@@ -378,11 +378,12 @@ void User::Identify(NickAlias *na)
|
||||
{
|
||||
if (!this->nc->o->ot->modes.empty())
|
||||
{
|
||||
this->SetModes(NULL, this->nc->o->ot->modes);
|
||||
this->SendMessage(NULL, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str());
|
||||
UserMode *um = ModeManager::FindUserModeByName("OPER");
|
||||
auto *um = ModeManager::FindUserModeByName("OPER");
|
||||
if (um && !this->HasMode("OPER") && this->nc->o->ot->modes.find(um->mchar) != Anope::string::npos)
|
||||
IRCD->SendOper(this);
|
||||
|
||||
this->SetModes(NULL, this->nc->o->ot->modes);
|
||||
this->SendMessage(NULL, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str());
|
||||
}
|
||||
if (IRCD->CanSetVHost && !this->nc->o->vhost.empty())
|
||||
{
|
||||
@@ -548,11 +549,12 @@ void User::SetModeInternal(const MessageSource &source, UserMode *um, const Anop
|
||||
{
|
||||
if (!this->nc->o->ot->modes.empty())
|
||||
{
|
||||
this->SetModes(NULL, this->nc->o->ot->modes);
|
||||
this->SendMessage(NULL, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str());
|
||||
UserMode *oper = ModeManager::FindUserModeByName("OPER");
|
||||
auto *oper = ModeManager::FindUserModeByName("OPER");
|
||||
if (oper && !this->HasMode("OPER") && this->nc->o->ot->modes.find(oper->mchar) != Anope::string::npos)
|
||||
IRCD->SendOper(this);
|
||||
|
||||
this->SetModes(NULL, this->nc->o->ot->modes);
|
||||
this->SendMessage(NULL, "Changing your usermodes to \002%s\002", this->nc->o->ot->modes.c_str());
|
||||
}
|
||||
if (IRCD->CanSetVHost && !this->nc->o->vhost.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user