private bool CheckRank(UserBase user, ChannelModeAttribute attr)
{
if (attr.Prefix == null)
{
return true;
}
switch (attr.Prefix.Value)
{
case '~':
return user.IsOwner(this);
case '&':
return user.IsProtect(this);
case '@':
return user.IsOperator(this);
case '%':
return user.IsHalfOperator(this);
case '+':
return user.IsVoice(this);
default:
return false;
}
}