1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 10:06:38 +02:00

Allow bot usermodes to be configurable

This commit is contained in:
Adam
2011-08-12 03:13:56 -04:00
parent 54710a782b
commit feee50e695
24 changed files with 150 additions and 31 deletions
+16
View File
@@ -705,6 +705,22 @@ void User::SetModesInternal(const char *umodes, ...)
}
}
Anope::string User::GetModes() const
{
Anope::string ret;
for (size_t i = UMODE_BEGIN + 1; i < UMODE_END; ++i)
if (this->modes.HasFlag(static_cast<UserModeName>(i)))
{
UserMode *um = ModeManager::FindUserModeByName(static_cast<UserModeName>(i));
if (um == NULL)
continue;
ret += um->ModeChar;
}
return ret;
}
/** Find the channel container for Channel c that the user is on
* This is preferred over using FindUser in Channel, as there are usually more users in a channel
* than channels a user is in