fix some formatting
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
21f1e95fb8
commit
d3600ce568
|
@ -51,10 +51,10 @@ namespace IRCStates
|
|||
var value = string.Empty;
|
||||
if (split.Length > 1)
|
||||
{
|
||||
value = split[1];
|
||||
value = split[1];
|
||||
Raw[key] = value;
|
||||
}
|
||||
|
||||
|
||||
switch (split[0])
|
||||
{
|
||||
case "NETWORK":
|
||||
|
|
|
@ -11,16 +11,16 @@ namespace IRCStates
|
|||
if (splitVal == null) return;
|
||||
|
||||
var split = splitVal.Split(',', 4);
|
||||
|
||||
|
||||
ListModes = new List<string>();
|
||||
ListModes.AddRange(split[0].Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
||||
|
||||
|
||||
SettingBModes = new List<string>();
|
||||
SettingBModes.AddRange(split[1].Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
||||
|
||||
|
||||
SettingCModes = new List<string>();
|
||||
SettingCModes.AddRange(split[2].Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
||||
|
||||
|
||||
SettingDModes = new List<string>();
|
||||
SettingDModes.AddRange(split[3].Select(c => c.ToString(CultureInfo.InvariantCulture)));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using IRCTokens;
|
||||
|
@ -12,7 +11,7 @@ namespace IRCStates
|
|||
public const string WhoType = "525"; // randomly generated
|
||||
private readonly StatefulDecoder _decoder;
|
||||
|
||||
private Dictionary<string, string> TempCaps;
|
||||
private readonly Dictionary<string, string> TempCaps;
|
||||
|
||||
public Server(string name)
|
||||
{
|
||||
|
@ -168,10 +167,7 @@ namespace IRCStates
|
|||
var channelUser = channel.Users[nicknameLower];
|
||||
if (add)
|
||||
{
|
||||
if (!channelUser.Modes.Contains(c))
|
||||
{
|
||||
channelUser.Modes.Add(c);
|
||||
}
|
||||
if (!channelUser.Modes.Contains(c)) channelUser.Modes.Add(c);
|
||||
}
|
||||
else if (channelUser.Modes.Contains(c))
|
||||
{
|
||||
|
@ -555,19 +551,16 @@ namespace IRCStates
|
|||
target = target.Substring(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
emit.Target = line.Params[0];
|
||||
|
||||
if (IsChannel(target) && HasChannel(target))
|
||||
{
|
||||
emit.Channel = Channels[CaseFold(target)];
|
||||
}
|
||||
else if (IsMe(target))
|
||||
{
|
||||
emit.SelfTarget = true;
|
||||
}
|
||||
emit.Channel = Channels[CaseFold(target)];
|
||||
else if (IsMe(target)) emit.SelfTarget = true;
|
||||
|
||||
return emit;
|
||||
}
|
||||
|
@ -578,9 +571,7 @@ namespace IRCStates
|
|||
.TrimStart('+')
|
||||
.Select(m => m.ToString(CultureInfo.InvariantCulture))
|
||||
.Where(m => !Modes.Contains(m)))
|
||||
{
|
||||
Modes.Add(c);
|
||||
}
|
||||
|
||||
return new Emit();
|
||||
}
|
||||
|
@ -614,7 +605,6 @@ namespace IRCStates
|
|||
var tokens = new List<string>();
|
||||
|
||||
foreach (var c in modeString)
|
||||
{
|
||||
if (new[] {'+', '-'}.Contains(c))
|
||||
{
|
||||
modifier = c;
|
||||
|
@ -624,7 +614,6 @@ namespace IRCStates
|
|||
modes.Add((modifier == '+', c.ToString(CultureInfo.InvariantCulture)));
|
||||
tokens.Add($"{modifier}{c}");
|
||||
}
|
||||
}
|
||||
|
||||
emit.Tokens = tokens;
|
||||
|
||||
|
@ -632,11 +621,9 @@ namespace IRCStates
|
|||
{
|
||||
emit.SelfTarget = true;
|
||||
foreach (var (add, c) in modes)
|
||||
{
|
||||
if (add && !Modes.Contains(c))
|
||||
Modes.Add(c);
|
||||
else if (Modes.Contains(c)) Modes.Remove(c);
|
||||
}
|
||||
}
|
||||
else if (HasChannel(target))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue