/// <summary> /// Query if the user has owner in this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> /// /// <returns> /// True if user has owner, false if not. /// </returns> public static bool HasOwner(this IChannelUser channelUser) { return((ChannelUserMode.ModeFlags(channelUser.Modes) & ChannelUserModeType.Owner) == ChannelUserModeType.Owner); }
/// <summary> /// Query if the user has protected in this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> /// /// <returns> /// True if user has protected, false if not. /// </returns> public static bool HasProtected(this IChannelUser channelUser) { return((ChannelUserMode.ModeFlags(channelUser.Modes) & ChannelUserModeType.Protected) == ChannelUserModeType.Protected); }
/// <summary> /// Query if the user has halfop in this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> /// /// <returns> /// True if user has halfop, false if not. /// </returns> public static bool HasHalfOp(this IChannelUser channelUser) { return((ChannelUserMode.ModeFlags(channelUser.Modes) & ChannelUserModeType.HalfOp) == ChannelUserModeType.HalfOp); }
/// <summary> /// Query if the user has voice in this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> /// /// <returns> /// True if user has voice, false if not. /// </returns> public static bool HasVoice(this IChannelUser channelUser) { return((ChannelUserMode.ModeFlags(channelUser.Modes) & ChannelUserModeType.Voice) == ChannelUserModeType.Voice); }
/// <summary> /// Query if the user has no modes in this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> /// /// <returns> /// True if the user has no modes in this channel, false if not. /// </returns> public static bool HasNone(this IChannelUser channelUser) { return(ChannelUserMode.ModeFlags(channelUser.Modes) == 0); }
/// <summary> /// Gets the highest mode this user has on this channel. /// </summary> /// /// <param name="channelUser">The channel user to act on.</param> public static ChannelUserModeType HighestUserMode(this IChannelUser channelUser) { return(ChannelUserMode.HighestMode(channelUser.Modes)); }