internal void HandleOnNickChange(object sender, NickChangeEventArgs e) { if (OnNickChange != null) OnNickChange(this, e); }
public void PluginsOnNickChange(object sender, NickChangeEventArgs e) { OnNickChange(this, e); }
void BotOnNickChange(object sender, NickChangeEventArgs e) { RemoveNick(e.OldNickname); Identified(e.NewNickname); }
private void NickChangeHandler(object sender, NickChangeEventArgs e) { lock (seenData) { var seenResult = seenData.SeenEntries.Where(s => s.Nick == e.OldNickname).FirstOrDefault(); if (seenResult != null) { seenResult.LastSeenTime = DateTime.Now; seenResult.LastAction = "(NICK) Nick changed to: " + e.NewNickname; seenResult.OnStatus = false; } seenResult = seenData.SeenEntries.Where(s => s.Nick == e.NewNickname).FirstOrDefault(); if (seenResult != null) { seenResult.LastSeenTime = DateTime.Now; seenResult.LastAction = "(NICK) Nick changed from: " + e.OldNickname; seenResult.OnStatus = true; } else { var seenEntry = new SeenEntry(); seenData.SeenEntries.InsertOnSubmit(seenEntry); seenEntry.Nick = e.NewNickname; seenEntry.LastSeenTime = DateTime.Now; seenEntry.LastAction = "(NICK) Nick changed from: " + e.OldNickname; seenEntry.LastMessage = "<no message yet>"; seenEntry.TimesSeen = 0; seenEntry.OnStatus = true; } var aliasResult = seenData.AliasEntries.Where(a => a.Nick == e.OldNickname && a.Alias == e.NewNickname).FirstOrDefault(); if (aliasResult == null) { var aliasEntry = new AliasEntry(); seenData.AliasEntries.InsertOnSubmit(aliasEntry); aliasEntry.Nick = e.OldNickname; aliasEntry.Alias = e.NewNickname; } aliasResult = seenData.AliasEntries.Where(a => a.Nick == e.NewNickname && a.Alias == e.OldNickname).FirstOrDefault(); if (aliasResult == null) { var aliasEntry = new AliasEntry(); seenData.AliasEntries.InsertOnSubmit(aliasEntry); aliasEntry.Nick = e.NewNickname; aliasEntry.Alias = e.OldNickname; } SaveDb(); } }