Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.15 KB | None | 0 0
  1.             else // if type is LIST
  2.             {
  3.                 List<ListMode> list = chan.ListModes;
  4.  
  5.                 ListMode lMode;
  6.  
  7.                 if ((lMode = list.Find(x => x.Mask.EqualsIgnoreCase(parameter))) == null)
  8.                 {
  9.                     if (!isSet)
  10.                     {
  11.                         return;
  12.                     }
  13.  
  14.                     lMode = new ListMode(DateTime.Now, parameter, "", mode);
  15.                     list.Add(lMode);
  16.                 }
  17.  
  18.                 /*List<string> list;
  19.                 if (!chan.ListModes.TryGetValue(mode, out list))
  20.                 {
  21.                     if (!isSet) // If we are unsetting a value but had no list...then clearly we had no value already stored :)
  22.                         return;
  23.                     list = new List<string>();
  24.                     chan.ListModes.Add(mode, list);
  25.                 }
  26.                 // If we are here, we should have the list of this mode
  27.                 list.RemoveAll(x => x.EqualsIgnoreCase(parameter));
  28.                 if (isSet)
  29.                 {
  30.                     list.Add(parameter);
  31.                 }*/
  32.  
  33.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement