private static void IrcClient_OnNickChange(object sender, NickChangeEventArgs e) { world.Penalize(new Penalty() { PenaltyType = PenaltyType.Nick, Nick = e.OldNickname, NewNick = e.NewNickname, UHost = e.Data.Host }); }
void OnNickChange(object sender, NickChangeEventArgs e) { Player.GlobalMessage(Server.IRCColour + "[IRC] " + e.OldNickname + "&g is now known as " + Server.IRCColour + e.NewNickname); Server.s.Log(Server.IRCColour + "[IRC] " + e.OldNickname + "&g is now known as " + Server.IRCColour + e.NewNickname); irc.RfcNames(channel); irc.RfcNames(opchannel); }
void OnNickChange(object sender, NickChangeEventArgs e) { if (e.NewNickname.ToLower().Contains("afk")) { Player.GlobalMessage(Server.IRCColour + "[IRC] " + e.OldNickname + Server.DefaultColor + " is AFK"); Server.afkset.Add(e.OldNickname); } else if (e.NewNickname.ToLower().Contains("away")) { Player.GlobalMessage(Server.IRCColour + "[IRC] " + e.OldNickname + Server.DefaultColor + " is Away"); Server.afkset.Add(e.OldNickname); } else if (Server.afkset.Contains(e.NewNickname)) { Player.GlobalMessage(Server.IRCColour + "[IRC] " + e.NewNickname + Server.DefaultColor + " is no longer away"); Server.afkset.Remove(e.NewNickname); } else { Player.GlobalMessage(Server.IRCColour + "[IRC] " + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname); } irc.RfcNames(channel); irc.RfcNames(opchannel); }
private static void OnNickChange(object sender, NickChangeEventArgs e) { string oldNick = e.OldNickname; string newNick = e.NewNickname; Users.Remove(oldNick); Users.Add(newNick); Users.Sort(); CRCDisplay.UpdateUsers(); CRCGame.UpdateUsers(); if (newNick != client.Nickname) { if (crcNicks.ContainsKey(oldNick)) { crcNicks[newNick] = crcNicks[oldNick]; crcNicks.Remove(oldNick); } string message = oldNick + CRCStrings.Localize("client_nick_change") + newNick; CRCDisplay.AddInformation(message); CRCGame.AddInformation(message); } else { CRCOptions.Name = newNick; string message = CRCStrings.Localize("client_own_nick_change") + newNick; CRCDisplay.AddInformation(message); CRCGame.AddInformation(message); } }
void ClientOnNickChange(object sender, NickChangeEventArgs e) { _events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.NickChange, Event = e }); _waitHandle.Set(); }
/// <summary> /// Verarbeitet einen Nickname wechsel /// </summary> /// <seealso cref="OnNickChange"/> private void _connection_OnNickChange(object sender, NickChangeEventArgs e) { Log.Information("{OldNickname} heißt jetzt {NewNickname}", e.OldNickname, e.NewNickname); using (var context = new BotContext()) { User oldNick = context.GetUser(e.OldNickname); User newNick = context.GetUser(e.NewNickname); if (oldNick != null && newNick == null) { oldNick.LastUsedName = new Nickname { Name = e.NewNickname, User = oldNick }; context.SaveChanges(); } //else if (oldNick == null && newNick != null) //{ // newNick.Names.Add(e.OldNickname); // newNick.LastUsedName = e.NewNickname; // context.SaveChanges(); //} } ThreadPool.QueueUserWorkItem(x => { OnNickChange?.Invoke(this, e); }); }
void OnNickChange(object sender, NickChangeEventArgs e) { string key; if (e.NewNickname.Split('|').Length == 2) { key = e.NewNickname.Split('|')[1]; if (key != null && key != "") { switch (key) { case "AFK": Player.GlobalMessage("[IRC] " + Server.IRCColour + e.OldNickname + Server.DefaultColor + " est AFK"); Server.afkset.Add(e.OldNickname); break; case "Away": Player.GlobalMessage("[IRC] " + Server.IRCColour + e.OldNickname + Server.DefaultColor + " is Away"); Server.afkset.Add(e.OldNickname); break; } } } else if (Server.afkset.Contains(e.NewNickname)) { Player.GlobalMessage("[IRC] " + Server.IRCColour + e.NewNickname + Server.DefaultColor + " is no longer away"); Server.afkset.Remove(e.NewNickname); } else { Player.GlobalMessage("[IRC] " + Server.IRCColour + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname); } irc.RfcNames(channel); irc.RfcNames(opchannel); }
void OnNickChange(object sender, NickChangeEventArgs e) { Player.GlobalMessageGC(Server.gcColor + "[Global] " + e.OldNickname + Server.DefaultColor + " is now known as " + Server.gcColor + e.NewNickname); Server.s.LogGC(e.OldNickname + " is now known as " + e.NewNickname); irc.RfcNames(channel); }
internal void HandleOnNickChange(object sender, NickChangeEventArgs e) { if (OnNickChange != null) { OnNickChange(this, e); } }
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(); } }
private static void OnNickChange(object sender, NickChangeEventArgs e) { if (!Users.ContainsKey(e.OldNickname)) { return; } Users.Add(e.NewNickname, Users[e.OldNickname]); Users.Remove(e.OldNickname); }
public void Server_OnNick(object sender, NickChangeEventArgs e) { User user = Users.GetUser(e.User); if (user != null) { user.Nick = e.NewNick; } }
public void OnNickChange(object sender, NickChangeEventArgs e) { try { Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname + " on " + e.Data.Channel); globalchat.RfcNames(channel); globalchat.RfcNames(devchannel); } catch (Exception ex) { Server.ErrorLog(ex); } }
// --------------------------------------------------- // IRC events related to (possibly) multiple channels. // --------------------------------------------------- void NickChange(object s, NickChangeEventArgs e) { foreach (var channel in GetJoinedChannels(e.NewNickname)) { writer.Log(channel, "-!- {0} is now known as {1}", e.OldNickname, e.NewNickname); } writer.CloseLog(e.OldNickname); }
void OnNickChange(object sender, NickChangeEventArgs e) { if (OpList.ContainsKey(e.OldNickname)) { OpList.Remove(e.OldNickname); } if (!OpList.ContainsKey(e.NewNickname)) { OpList.Add(e.NewNickname, ""); } }
private void Listener_OnNick(object sender, NickChangeEventArgs e) { OnNick.Fire(this, new NickChangeEventArgs(e.User, e.NewNick)); foreach (KeyValuePair <string, Channel> item in _channels) { if (item.Value.HasUser(e.User.Nick)) { item.Value.NickChange(e.User, e.NewNick); } } }
public void ProcessNickCommand() { IrcMessage msg = new IrcMessage { Command = "NICK", From = _userString, Message = "Ortz", Tokens = _nick.Split(new[] { ' ' }) }; NickChangeEventArgs givenArgs = null; _listener.OnNick += delegate(object sender, NickChangeEventArgs args) { givenArgs = args; }; _listener.ProcessNickCommand(msg); Assert.AreEqual(_testUser, givenArgs.User); Assert.AreEqual("Ortz", givenArgs.NewNick); }
void ClienNickChange(NickChangeEventArgs e) { if (_iam == e.OldNickname) { _iam = e.NewNickname; } else { var bot = Server.Bot(e.OldNickname); if (bot != null) { bot.Name = e.NewNickname; UpdateBot(bot); } } }
void OnNickChange(object sender, NickChangeEventArgs e) { AddNotification("{0} is now known as {1}.".F(e.OldNickname, e.NewNickname)); Game.RunAfterTick(() => { ChatUser user; if (!Users.TryGetValue(e.OldNickname, out user)) { return; } Users.Remove(e.OldNickname); Users.Add(e.NewNickname, new ChatUser(e.NewNickname, user.IsOp, user.IsVoiced)); }); }
void mClient_OnNickChange(object sender, NickChangeEventArgs e) { AddText(string.Format("*** {0} is now known as {1}", e.OldNickname, e.NewNickname)); UpdateNames(); }
private void OnNickChange(object sender, NickChangeEventArgs e) { AddClientLine(e.OldNickname + " is now known as " + e.NewNickname + ".", Color.DarkBlue); AddGameMsg("Information", e.OldNickname + " is now known as " + e.NewNickname + "."); }
private void Channel_OnNick(object sender, NickChangeEventArgs ea) { AddLine(ChannelStrings.NickChange.With(ea.User.Nick, ea.NewNick)); }
void onIRCNick(object sender, NickChangeEventArgs e) { messageToVP(true, "", msgNick, e.OldNickname, e.NewNickname); }
private void irc_OnNickChange(object sender, NickChangeEventArgs e) { this.AddChatMsg("# " + e.OldNickname + " is now known as " + e.NewNickname + "."); this.irc.RfcNames(Res.IrcChannel); }
private void Listener_OnNick(object sender, NickChangeEventArgs e) { OnNick.Fire(this, new NickChangeEventArgs(e.User, e.NewNick)); }
void BotOnNickChange(object sender, NickChangeEventArgs e) { RemoveNick(e.OldNickname); Identified(e.NewNickname); }
private void Channel_OnNick(object sender, NickChangeEventArgs e) { AddMessage(ChannelStrings.NickChange.With(e.User.Nick, e.NewNick)); }
public void OnNickChange(object sender, NickChangeEventArgs e) { //Player.GlobalMessageDevsStaff("To Devs/Staff: " + Server.GlobalChatColour + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname); globalchat.RfcNames(channel); }
public void PluginsOnNickChange(object sender, NickChangeEventArgs e) { OnNickChange(this, e); }