mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Add constructors to the TokenList class.
This commit is contained in:
parent
5881e6f6a3
commit
4856a8f967
@ -31,6 +31,12 @@ class CoreExport TokenList final
|
||||
insp::flat_set<std::string, irc::insensitive_swo> tokens;
|
||||
|
||||
public:
|
||||
/** Creates a new empty token list. */
|
||||
TokenList() = default;
|
||||
|
||||
/** Creates a new token list from a list of tokens. */
|
||||
TokenList(const std::string& tokenlist);
|
||||
|
||||
/** Adds a space-delimited list of tokens to the token list.
|
||||
* @param tokenlist The list of space-delimited tokens to add.
|
||||
*/
|
||||
|
@ -201,6 +201,11 @@ bool InspIRCd::TimingSafeCompare(const std::string& one, const std::string& two)
|
||||
return (diff == 0);
|
||||
}
|
||||
|
||||
TokenList::TokenList(const std::string& tokenlist)
|
||||
{
|
||||
AddList(tokenlist);
|
||||
}
|
||||
|
||||
void TokenList::AddList(const std::string& tokenlist)
|
||||
{
|
||||
std::string token;
|
||||
|
@ -90,8 +90,8 @@ class WebIRCHost final
|
||||
, fingerprint(fp)
|
||||
, password(pass)
|
||||
, passhash(hash)
|
||||
, trustedflags(flags)
|
||||
{
|
||||
trustedflags.AddList(flags);
|
||||
}
|
||||
|
||||
bool IsFlagTrusted(const std::string& flag) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user