1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 23:13:13 +02:00

Use SetCorrectModes to set the inital modes on a founder once they register a channel

This commit is contained in:
Adam
2013-04-11 15:28:53 -05:00
parent c56d72ba84
commit 6f9dd282d2
+3 -11
View File
@@ -77,22 +77,14 @@ class CommandCSRegister : public Command
if (c)
{
c->CheckModes();
ChannelMode *cm;
if (u && u->FindChannel(c) != NULL)
{
/* On most ircds you do not receive the admin/owner mode till its registered */
if ((cm = ModeManager::FindChannelModeByName("OWNER")))
c->SetMode(NULL, cm, u->GetUID());
else if ((cm = ModeManager::FindChannelModeByName("PROTECT")))
c->RemoveMode(NULL, cm, u->GetUID());
}
if (u)
c->SetCorrectModes(u, true, true);
/* Mark the channel as persistent */
if (c->HasMode("PERM"))
ci->Extend("PERSIST");
/* Persist may be in def cflags, set it here */
else if (ci->HasExt("PERSIST") && (cm = ModeManager::FindChannelModeByName("PERM")))
else if (ci->HasExt("PERSIST"))
c->SetMode(NULL, "PERM");
}