Exemple #1
0
 void mClient_OnNickChange(object sender, NickChangeEventArgs e)
 {
     AddText(string.Format("*** {0} is now known as {1}", e.OldNickname, e.NewNickname));
     UpdateNames();
 }
Exemple #2
0
        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 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);
				}
			}
		}
 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);
 }
Exemple #5
0
 /// <summary>
 /// Catches the OnNickChange event so we can keep our list of query windows up-to-date.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void IRC_OnNickChange(object sender, NickChangeEventArgs e)
 {
     List<string> keysToRemove = new List<string>();
     List<KeyValuePair<string, PrivMsg>> newPrivs = new List<KeyValuePair<string, PrivMsg>>();
     foreach (PrivMsg eachPriv in queryWindows)
         if (eachPriv.QueriedUser == e.OldNickname.ToLower())
             eachPriv.QueriedUser = e.NewNickname.ToLower();
 }
 public void OnNickChange(object sender, NickChangeEventArgs e)
 {
     try
     {
         Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.OldNickname + "&g is now known as " + e.NewNickname);
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Exemple #7
0
        void irc_OnNickChange(object sender, NickChangeEventArgs e)
        {
            if (!UsersContains(e.OldNickname)) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.OldNickname + " changed their name to " + e.NewNickname) });

            UpdateUsers();
            ShowActivity();
        }
Exemple #8
0
        private void _OnNickChange(object sender, NickChangeEventArgs e)
        {
            #if LOG4NET
            _Logger.Debug("_OnNickChange() e.OldNickname: "+e.OldNickname+" e.NewNickname: "+e.NewNickname);
            #endif
            if (e.Data.Irc.IsMe(e.NewNickname)) {
                _MyPerson = CreatePerson(e.NewNickname, MyPerson.RealName,
                                         MyPerson.Ident, MyPerson.Host);

                var builder = CreateMessageBuilder();
                builder.AppendEventPrefix();
                // TRANSLATOR: do NOT change the position of {0}!
                builder.AppendText(_("You're now known as {0}"),
                                  String.Empty);
                builder.AppendIdendityName(CreatePerson(e.NewNickname));

                Session.AddMessageToChat(_NetworkChat, builder.ToMessage());
            }

            IrcUser ircuser = e.Data.Irc.GetIrcUser(e.NewNickname);
            if (ircuser != null) {
                foreach (string channel in ircuser.JoinedChannels) {
                    GroupChatModel cchat = (GroupChatModel)GetChat(channel, ChatType.Group);

                    // clone the old user to a new user
                    IrcGroupPersonModel olduser = (IrcGroupPersonModel) cchat.GetPerson(e.OldNickname);
                    if (olduser == null) {
            #if LOG4NET
                        _Logger.Error("cchat.GetPerson(e.OldNickname) returned null! cchat.Name: "+cchat.Name+" e.OldNickname: "+e.OldNickname);
            #endif
                        continue;
                    }
                    var newuser = CreateGroupPerson(e.NewNickname);
                    newuser.RealName = olduser.RealName;
                    newuser.Ident = olduser.Ident;
                    newuser.Host = olduser.Host;
                    newuser.IsOp = olduser.IsOp;
                    newuser.IsVoice = olduser.IsVoice;

                    Session.UpdatePersonInGroupChat(cchat, olduser, newuser);

                    var builder = CreateMessageBuilder();
                    builder.AppendEventPrefix();
                    if (e.Data.Irc.IsMe(e.NewNickname)) {
                        // TRANSLATOR: do NOT change the position of {0}!
                        builder.AppendText(_("You're now known as {0}"),
                                           String.Empty);
                    } else {
                        builder.AppendIdendityName(olduser);
                        // TRANSLATOR: do NOT change the position of {0} or {1}!
                        builder.AppendText(_("{0} is now known as {1}"),
                                           String.Empty,
                                           String.Empty);
                    }
                    builder.AppendIdendityName(newuser);
                    Session.AddMessageToChat(cchat, builder.ToMessage());
                }
            }
        }
Exemple #9
0
 public void OnNickChange(object sender, NickChangeEventArgs e)
 {
     try
     {
         if (e.Data.Channel == devchannel)
         {
             Player.GlobalMessageDevsStaff("To Devs/Staff: >[DevGlobal]: " + Server.GlobalChatColour + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname);
         }
         else
         {
             Player.GlobalMessageDevsStaff("To Devs/Staff: >[Global]: " + Server.GlobalChatColour + e.OldNickname + Server.DefaultColor + " is now known as " + e.NewNickname);
         }
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
Exemple #10
0
 private void OnNickChange(object sender, NickChangeEventArgs e)
 {
     if (OpList != null)
     {
         //Keep our set up to date.
         if (OpList.Contains(e.OldNickname))
         {
             OpList.Remove(e.OldNickname);
         }
         if (!OpList.Contains(e.NewNickname))
         {
             OpList.Add(e.NewNickname);
         }
     }
 }
 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 + ".");
 }
Exemple #12
0
 protected virtual void HandleNickChange(object sender, Meebey.SmartIrc4net.NickChangeEventArgs e)
 {
     OnNickChange(new Events.Irc.Specific.NickChangeEventArgs(e));
 }
Exemple #13
0
        private void _OnNickChange(object sender, NickChangeEventArgs e)
        {
            #if LOG4NET
            _Logger.Debug("_OnNickChange() e.OldNickname: "+e.OldNickname+" e.NewNickname: "+e.NewNickname);
            #endif
            if (e.Data.Irc.IsMe(e.NewNickname)) {
                MessageModel msg = new MessageModel();
                msg.MessageType = MessageType.Event;
                TextMessagePartModel textMsg;

                textMsg = new TextMessagePartModel();
                textMsg.Text = "-!- " + String.Format(
                                            _("You're now known as {0}"),
                                            String.Empty);
                msg.MessageParts.Add(textMsg);

                textMsg = new TextMessagePartModel();
                textMsg.Text = e.NewNickname;
                textMsg.Bold = true;
                textMsg.ForegroundColor = GetNickColor(e.NewNickname);
                msg.MessageParts.Add(textMsg);

                Session.AddMessageToChat(_NetworkChat, msg);
            }

            IrcUser ircuser = e.Data.Irc.GetIrcUser(e.NewNickname);
            if (ircuser != null) {
                foreach (string channel in ircuser.JoinedChannels) {
                    GroupChatModel cchat = (GroupChatModel)GetChat(channel, ChatType.Group);

                    // clone the old user to a new user
                    IrcGroupPersonModel olduser = (IrcGroupPersonModel) cchat.GetPerson(e.OldNickname);
                    if (olduser == null) {
            #if LOG4NET
                        _Logger.Error("cchat.GetPerson(e.OldNickname) returned null! cchat.Name: "+cchat.Name+" e.OldNickname: "+e.OldNickname);
            #endif
                        continue;
                    }
                    IrcGroupPersonModel newuser = new IrcGroupPersonModel(
                                                        e.NewNickname,
                                                        NetworkID,
                                                        this);
                    newuser.RealName = olduser.RealName;
                    newuser.Ident = olduser.Ident;
                    newuser.Host = olduser.Host;
                    newuser.IsOp = olduser.IsOp;
                    newuser.IsVoice = olduser.IsVoice;

                    Session.UpdatePersonInGroupChat(cchat, olduser, newuser);

                    if (e.Data.Irc.IsMe(e.NewNickname)) {
                        MessageModel msg = new MessageModel();
                        msg.MessageType = MessageType.Event;
                        TextMessagePartModel textMsg;

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = "-!- " + String.Format(
                                                    _("You're now known as {0}"),
                                                    String.Empty);
                        msg.MessageParts.Add(textMsg);

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = e.NewNickname;
                        textMsg.Bold = true;
                        textMsg.ForegroundColor = GetNickColor(e.NewNickname);
                        msg.MessageParts.Add(textMsg);

                        Session.AddMessageToChat(cchat, msg);
                    } else {
                        MessageModel msg = new MessageModel();
                        msg.MessageType = MessageType.Event;
                        TextMessagePartModel textMsg;

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = "-!- ";
                        msg.MessageParts.Add(textMsg);

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = e.OldNickname;
                        textMsg.ForegroundColor = GetNickColor(e.OldNickname);
                        msg.MessageParts.Add(textMsg);

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = String.Format(
                                            _("{0} is now known as {1}"),
                                            String.Empty,
                                            String.Empty);
                        msg.MessageParts.Add(textMsg);

                        textMsg = new TextMessagePartModel();
                        textMsg.Text = e.NewNickname;
                        textMsg.ForegroundColor = GetNickColor(e.NewNickname);
                        msg.MessageParts.Add(textMsg);

                        Session.AddMessageToChat(cchat, msg);
                    }
                }
            }
        }
Exemple #14
0
 void irc_OnNickChange( object sender, NickChangeEventArgs e )
 {
     CurrentPug.ChangeName( e.OldNickname, e.NewNickname );
 }
 void onIRCNick(object sender, NickChangeEventArgs e)
 {
     messageToVP(true, "", msgNick, e.OldNickname, e.NewNickname);
 }
Exemple #16
0
        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: " + e.OldNickname + " is AFK"); Server.afkset.Add(e.OldNickname); break;
                        case "Away":
                            Player.GlobalMessage("IRC: " + e.OldNickname + " is Away"); Server.afkset.Add(e.OldNickname); break;
                    }
                }
            }
            else if (Server.afkset.Contains(e.NewNickname))
            {
                Player.GlobalMessage("IRC: " + e.NewNickname + " is no longer away");
                Server.afkset.Remove(e.NewNickname);
            }
            else
                Player.GlobalMessage("IRC: " + e.OldNickname + " is now known as " + e.NewNickname);

            irc.RfcNames(channel);
        }
Exemple #17
0
 static void irc_OnNickChange(object sender, NickChangeEventArgs e)
 {
     //check for nicks on both old and new nicks
     showTells(e.NewNickname);
     showTells(e.OldNickname);
 }
Exemple #18
0
        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);
        }
Exemple #19
0
        protected void IRC_OnNickChange(object sender, NickChangeEventArgs e)
        {
            if (e.OldNickname != QueriedUser) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.OldNickname + " changed their name to " + e.NewNickname) });

            QueriedUser = e.NewNickname;
            UpdateTitle();

            ShowActivity();
        }
Exemple #20
0
		void OnNickChange(object sender, NickChangeEventArgs e)
		{
			if(OpList.ContainsKey(e.OldNickname))
			{
				OpList.Remove(e.OldNickname);
			}
			if(!OpList.ContainsKey(e.NewNickname))
			{
				OpList.Add(e.NewNickname, "");
			}
		}
 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);
 }
Exemple #22
0
 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 ClientOnNickChange(object sender, NickChangeEventArgs e)
		{
			_events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.NickChange, Event = e });
			_waitHandle.Set();
		}