Inheritance: IrcEventArgs
コード例 #1
0
ファイル: ChannelManage.cs プロジェクト: bsamuels453/Pikatwo
 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);
     }
 }
コード例 #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();
        }
コード例 #3
0
ファイル: IRCBot.cs プロジェクト: blingbling4567/MCDawn
 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);
 }
コード例 #4
0
ファイル: frmMain.cs プロジェクト: alienity/LOIC
		void OnKick(object sender, KickEventArgs e)
		{
			if(OpList == null) OpList = new Dictionary<string, string>();
			if(OpList.ContainsKey(e.Whom))
			{
				OpList.Remove(e.Whom);
			}
		}
コード例 #5
0
ファイル: IrcMaster.cs プロジェクト: JamesBondski/mafiabot
 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));
     }
 }
コード例 #6
0
ファイル: IrcProtocolManager.cs プロジェクト: txdv/smuxi
 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));
     }
 }
コード例 #7
0
ファイル: GlobalChat.cs プロジェクト: CH4Code/OpenRA
 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));
     }
 }
コード例 #8
0
ファイル: ChatUI.cs プロジェクト: Quintinon/outwar-dca
 void mClient_OnKick(object sender, KickEventArgs e)
 {
     AddText(string.Format("*** {0} has kicked {1}", e.Who, e.Whom));
     UpdateNames();
 }
コード例 #9
0
ファイル: IrcProtocolManager.cs プロジェクト: flugsio/smuxi
 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());
     }
 }
コード例 #10
0
ファイル: GlobalChat.cs プロジェクト: Roger-luo/OpenRA
		void OnKick(object sender, KickEventArgs e)
		{
			Disconnect();
			connectionStatus = ChatConnectionStatus.Error;
			AddNotification("Error: You were kicked from the chat by {0}".F(e.Who));
		}
コード例 #11
0
ファイル: Program.cs プロジェクト: jefe323/Botler
 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);
     }
 }
コード例 #12
0
ファイル: ChannelWindow.xaml.cs プロジェクト: atoumey/z-chat
        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();
        }
コード例 #13
0
ファイル: Zombie.cs プロジェクト: PauloAguiar/parrot4net
 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);
     }
 }
コード例 #14
0
ファイル: IrcBot.cs プロジェクト: minecrafter/Constantinople
 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);
 }
コード例 #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);
			}
		}
コード例 #16
0
		void ClientOnKick(object sender, KickEventArgs e)
		{
			_events.Enqueue(new IrcEvent { Type = IrcEvent.EventType.Kick, Event = e });
			_waitHandle.Set();
		}