Exemple #1
0
 public void RemoveRank(Client client, string channel, UserRank rank)
 {
     if (ranks.ContainsKey(channel) && ranks[channel].Contains(rank))
     {
         ranks[channel].Remove(rank);
         if (!ranks[channel].Contains(UserRank.None))
         {
             ranks[channel].Add(UserRank.None);
         }
         client.OnRankChange(this, channel, ranks[channel].Min());
     }
 }
Exemple #2
0
 public void AddRank(Client client, string channel, UserRank rank)
 {
     Console.WriteLine($"Rank of {this} for {channel} on {client.Host} added: {rank}");
     if (!ranks.ContainsKey(channel))
     {
         ranks.TryAdd(channel, new List <UserRank>());
     }
     if (!ranks[channel].Contains(rank))
     {
         if (!ranks[channel].Contains(UserRank.None))
         {
             ranks[channel].Add(UserRank.None);
         }
         ranks[channel].Add(rank);
         client.OnRankChange(this, channel, ranks[channel].Min());
     }
 }
Exemple #3
0
 public void RemoveRank(Client client, string channel, UserRank rank)
 {
     if (ranks.ContainsKey(channel) && ranks[channel].Contains(rank))
     {
         ranks[channel].Remove(rank);
         if (!ranks[channel].Contains(UserRank.None))
             ranks[channel].Add(UserRank.None);
         client.OnRankChange(this, channel, ranks[channel].Min());
     }
 }
Exemple #4
0
 public void AddRank(Client client, string channel, UserRank rank)
 {
     Console.WriteLine($"Rank of {this} for {channel} on {client.Host} added: {rank}");
     if (!ranks.ContainsKey(channel))
         ranks.TryAdd(channel, new List<UserRank>());
     if (!ranks[channel].Contains(rank))
     {
         if (!ranks[channel].Contains(UserRank.None))
             ranks[channel].Add(UserRank.None);
         ranks[channel].Add(rank);
         client.OnRankChange(this, channel, ranks[channel].Min());
     }
 }