sharp-chat/SharpChat.Protocol.IRC/Channels/IChannelExtensions.cs

19 lines
522 B
C#
Raw Permalink Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Channels;
namespace SharpChat.Protocol.IRC.Channels {
public static class IChannelExtensions {
public static string GetIRCName(this IChannel channel) {
return $@"#{channel.Name.ToLowerInvariant()}";
}
public static char GetIRCNamesPrefix(this IChannel channel) {
// maybe?
//if(channel.IsInviteOnly)
// return '*';
if(channel.HasPassword)
return '@';
return '=';
}
}
}