internal void UpdateChannelMode(char mode, string param, bool addMode) { try { channelMode c = new channelMode(); c.mode = mode; c.set = addMode; c.param = param; if (channelModes.Contains(mode)) { if (addMode) { channelModes[mode] = c; } else { channelModes.Remove(mode); } } else { if (addMode) { channelModes.Add(mode, c); } } string modes = ""; string prms = " "; foreach (channelMode cm in channelModes.Values) { modes += cm.mode.ToString(); if (cm.param != null) { prms += cm.param + " "; } } if (modes.Trim().Length > 0) { ChannelModes = "+" + modes.Trim() + prms.TrimEnd(); } else { ChannelModes = ""; } } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message + ":" + e.Source); } }
internal void UpdateChannelMode(char mode, string param, bool addMode) { try { channelMode c = new channelMode(); c.mode = mode; c.set = addMode; c.param = param; if (channelModes.Contains(mode)) { if (addMode) channelModes[mode] = c; else channelModes.Remove(mode); } else { if (addMode) channelModes.Add(mode, c); } string modes = ""; string prms = " "; foreach (channelMode cm in channelModes.Values) { modes += cm.mode.ToString(); if (cm.param != null) prms += cm.param + " "; } if (modes.Trim().Length > 0) ChannelModes = "+" + modes.Trim() + prms.TrimEnd(); else ChannelModes = ""; } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message + ":" + e.Source); } }
internal void UpdateChannelMode(char mode, string param, bool addMode) { try { channelMode c = new channelMode(); c.mode = mode; c.set = addMode; c.param = param; if (channelModes.Contains(mode)) { if (addMode) channelModes[mode] = c; else channelModes.Remove(mode); } else { if (addMode) channelModes.Add(mode, c); } string modes = ""; string prms = " "; foreach (channelMode cm in channelModes.Values) { modes += cm.mode.ToString(); if (cm.param != null) prms += cm.param + " "; } if (modes.Trim().Length > 0) ChannelModes = "+" + modes.Trim() + prms.TrimEnd(); else ChannelModes = ""; } catch (Exception e) { FormMain.Instance.WriteErrorFile(FormMain.Instance.InputPanel.CurrentConnection,"IceTabPage UpdateChannelMode2", e); } }