diff options
author | Ben Harris <ben@tilde.team> | 2020-05-13 23:34:33 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2020-05-13 23:34:33 -0400 |
commit | 023e29ab75f1f413f918346edaddafdf8b1df5ee (patch) | |
tree | 9e8c6956c0c0ecac9639b1c727fe94cb253d71f7 /IrcStates/ISupportPrefix.cs | |
parent | b93174070a0964f254781686ed2390855127ad7a (diff) |
implement some stuff
Diffstat (limited to 'IrcStates/ISupportPrefix.cs')
-rw-r--r-- | IrcStates/ISupportPrefix.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/IrcStates/ISupportPrefix.cs b/IrcStates/ISupportPrefix.cs index b319e04..b535212 100644 --- a/IrcStates/ISupportPrefix.cs +++ b/IrcStates/ISupportPrefix.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; namespace IrcStates { @@ -17,11 +18,20 @@ namespace IrcStates public List<string> Modes { get; set; } public List<string> Prefixes { get; set; } + public string FromMode(char mode) + { + return FromMode(mode.ToString(CultureInfo.InvariantCulture)); + } public string FromMode(string mode) { return Modes.Contains(mode) ? Modes[Modes.IndexOf(mode)] : null; } + public string FromPrefix(char prefix) + { + return FromPrefix(prefix.ToString(CultureInfo.InvariantCulture)); + } + public string FromPrefix(string prefix) { return Prefixes.Contains(prefix) ? Prefixes[Prefixes.IndexOf(prefix)] : null; |