Inheritance: IrcEventArgs
Ejemplo n.º 1
0
 void OnKick(object sender, KickEventArgs kickEventArgs)
 {
     if (kickEventArgs.Whom.Equals(_ircInterface.Nick)){
         _ircInterface.DebugLog("Kicked from channel " + kickEventArgs.Channel + ", attempting to rejoin");
         _ircInterface.Client.RfcJoin(kickEventArgs.Channel);
     }
 }
Ejemplo n.º 2
0
        void onIRCKick(object sender, KickEventArgs e)
        {
            messageToVP(true, "", msgKicked, e.Who, e.Whom, e.Channel, e.KickReason);

            if (e.Whom == config.NickName)
                irc.Disconnect();
        }
Ejemplo n.º 3
0
 void OnKick(object sender, KickEventArgs e)
 {
     Player.GlobalMessage(Server.IRCColour + e.Data.Nick + " was kicked from the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel (" + e.KickReason + ")");
     Server.s.Log(Server.IRCColour + e.Data.Nick + " was kicked from the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel (" + e.KickReason + ")");
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
Ejemplo n.º 4
0
		void OnKick(object sender, KickEventArgs e)
		{
			if(OpList == null) OpList = new Dictionary<string, string>();
			if(OpList.ContainsKey(e.Whom))
			{
				OpList.Remove(e.Whom);
			}
		}
Ejemplo n.º 5
0
 void OnKick(object sender, KickEventArgs e)
 {
     if (Client.IsMe(e.Whom)) {
         throw new Exception("Got kicked!");
     }
     else {
         this.UserLeft(this.GetChannel(e.Channel), this.GetUser(e.Whom));
     }
 }
Ejemplo n.º 6
0
 private void _OnKick(object sender, KickEventArgs e)
 {
     #if LOG4NET
     _Logger.Debug("_OnKick() e.Channel: "+e.Channel+" e.Whom: "+e.Whom);
     #endif
     GroupChatModel cchat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
     if (e.Data.Irc.IsMe(e.Whom)) {
         Session.AddTextToChat(cchat,
             "-!- " + String.Format(
                         _("You were kicked from {0} by {1} [{2}]"),
                         e.Channel, e.Who, e.KickReason));
         Session.DisableChat(cchat);
     } else {
         PersonModel user = cchat.GetPerson(e.Whom);
         Session.RemovePersonFromGroupChat(cchat, user);
         Session.AddTextToChat(cchat,
             "-!- " + String.Format(
                         _("{0} was kicked from {1} by {2} [{3}]"),
                         e.Whom, e.Channel, e.Who, e.KickReason));
     }
 }
Ejemplo n.º 7
0
 void OnKick(object sender, KickEventArgs e)
 {
     if (e.Whom == client.Nickname)
     {
         Disconnect();
         connectionStatus = ChatConnectionStatus.Error;
         AddNotification("You were kicked from the chat by {0}. ({1})".F(e.Who, e.KickReason));
     }
     else
     {
         Users.Remove(e.Whom);
         AddNotification("{0} was kicked from the chat by {1}. ({2})".F(e.Whom, e.Who, e.KickReason));
     }
 }
Ejemplo n.º 8
0
 void mClient_OnKick(object sender, KickEventArgs e)
 {
     AddText(string.Format("*** {0} has kicked {1}", e.Who, e.Whom));
     UpdateNames();
 }
Ejemplo n.º 9
0
 private void _OnKick(object sender, KickEventArgs e)
 {
     #if LOG4NET
     _Logger.Debug("_OnKick() e.Channel: "+e.Channel+" e.Whom: "+e.Whom);
     #endif
     var chat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
     var builder = CreateMessageBuilder();
     builder.AppendEventPrefix();
     if (e.Data.Irc.IsMe(e.Whom)) {
         // TRANSLATOR: do NOT change the position of {1}!
         builder.AppendText(_("You were kicked from {0} by {1}"),
                            e.Channel, String.Empty);
         builder.AppendIdendityName(GetPerson(chat, e.Who));
         builder.AppendText(" [").AppendMessage(e.KickReason).AppendText("]");
         Session.AddMessageToChat(chat, builder.ToMessage());
         Session.DisableChat(chat);
     } else {
         PersonModel user = chat.GetPerson(e.Whom);
         Session.RemovePersonFromGroupChat(chat, user);
         builder.AppendIdendityName(GetPerson(chat, e.Whom));
         // TRANSLATOR: do NOT change the position of {0} and {2}!
         builder.AppendText(_("{0} was kicked from {1} by {2}"),
                            String.Empty, e.Channel, String.Empty);
         builder.AppendIdendityName(GetPerson(chat, e.Who));
         builder.AppendText(" [").AppendMessage(e.KickReason).AppendText("]");
         Session.AddMessageToChat(chat, builder.ToMessage());
     }
 }
Ejemplo n.º 10
0
		void OnKick(object sender, KickEventArgs e)
		{
			Disconnect();
			connectionStatus = ChatConnectionStatus.Error;
			AddNotification("Error: You were kicked from the chat by {0}".F(e.Who));
		}
Ejemplo n.º 11
0
 static void irc_OnKick(object sender, KickEventArgs e)
 {
     if (e.Whom == GlobalVar.bot_nick)
     {
         //make same as part
         string[] pArgs = { "part", e.Data.Channel };
         Commands.Core.Channel.part.command(pArgs, e.Data.Channel, e.Data.Nick, GlobalVar.irc);
     }
 }
Ejemplo n.º 12
0
        void irc_OnKick(object sender, KickEventArgs e)
        {
            if (e.Channel != Channel) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.Who + " kicked " + e.Whom + "(" + e.KickReason + ")") });

            UpdateUsers();
            if (ZChat.Options.HighlightTrayIconForJoinsAndQuits)
                ShowActivity();
        }
Ejemplo n.º 13
0
 private void OnKick(object sender, KickEventArgs e)
 {
     // Similar to with Quit, but he WAS kicked (uses Whom)
     if (OpList == null) OpList = new HashSet<string>();
     if (OpList.Contains(e.Whom))
     {
         //Remove him if he's there.
         OpList.Remove(e.Whom);
     }
 }
Ejemplo n.º 14
0
 public void OnKick(object sender, KickEventArgs e)
 {
     if (!logs.ContainsKey (e.Data.Channel))
         EnableChannel (e.Data.Channel);
     logs [e.Data.Channel].AddLine (e.Who + " was kicked from " + e.Channel + " by " + e.Whom + ": " + e.KickReason);
 }
Ejemplo n.º 15
0
		void ClientKick(KickEventArgs e)
		{
			var channel = Server.Channel(e.Data.Channel);
			if (channel != null)
			{
				if (_iam == e.Whom)
				{
					channel.Connected = false;
					_log.Warn("kicked from " + channel.Name + " (" + e.KickReason + ")");
					FireNotificationAdded(Notification.Types.ChannelKicked, channel);
				}
				else
				{
					var bot = channel.Bot(e.Whom);
					if (bot != null)
					{
						bot.Connected = false;
						bot.LastMessage = "kicked from " + e.Channel;
						UpdateBot(bot);
					}
				}
				UpdateChannel(channel);
			}
		}
Ejemplo n.º 16
0
		void ClientOnKick(object sender, KickEventArgs e)
		{
			_events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.Kick, Event = e });
			_waitHandle.Set();
		}