Inheritance: IrcEventArgs
コード例 #1
0
ファイル: Join.cs プロジェクト: tgiphil/SmartIrcBot4net
 public bool Handle(JoinEventArgs args)
 {
     Invoke(Method, GetValues(Method.GetParameters(), (info) => {
     return Process(info, args);
       }));
       return true;
 }
コード例 #2
0
 private static void OnJoin(object sender, JoinEventArgs e)
 {
     if (!irc.IsMe(e.Who))
     {
         //CreateUser(e.Who, false);
         Log(e.Who + " joined.");
         Console.WriteLine(e.Who + " has joined!");
     }
     else
     {
         CreateUser(e.Who, true); // TwitchTV will never recognize the streamer as an admin if this isn't here.
     }
     Users.TotalUsers++;
     /*_playercount++;
     VoteDuration = _playercount;
     _logform.SetUserCount((int)_playercount);*/
     //VoteDuration = Users.All.Count;
     //_logform.SetUserCount(Users.All.Count);
 }
コード例 #3
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     try
     {
         Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel == devchannel ? "Dev " : "") + "Global Chat Channel.");
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
コード例 #4
0
ファイル: Main.cs プロジェクト: tgiphil/SmartIrcBot4net
 public void Greet(JoinEventArgs args)
 {
     if (args.Who != Bot.Nickname) {
     Bot.SendMessage(SendType.Message, args.Channel, string.Format("Hello {0}", args.Who));
       }
 }
コード例 #5
0
ファイル: Irc.cs プロジェクト: vsrz/desbot_vsrz
 static void client_OnJoin(object sender, JoinEventArgs e)
 {
     TouchUser(e.Who, true, false);
     if (e.Who.ToLower() == Nickname.ToLower())
     {
         client.RfcNames(Channel);
         State = IrcState.Ready;
         //SendRawMessage("JTVCLIENT");
         SendRawMessage("TWITCHCLIENT 3");
         SendRawMessage("CAP REQ :twitch.tv/membership");
         string botname = desBot.State.JtvSettings.Value.Nickname.ToString();
         SendChannelMessage(botname + " is online! (v" + Token.GetCurrentVersion() + "@twitch.tv)" + (Program.IsBuggyTwitch ? "/bt" : ""), false);
     }
 }
コード例 #6
0
ファイル: IrcProtocolManager.cs プロジェクト: txdv/smuxi
        private void _OnJoin(object sender, JoinEventArgs e)
        {
            GroupChatModel groupChat = (GroupChatModel) GetChat(e.Channel, ChatType.Group);
            if (e.Data.Irc.IsMe(e.Who)) {
                // tell join handlers, that they need to wait!!
                lock (_ActiveChannelJoinList) {
                    _ActiveChannelJoinList.Add(e.Channel.ToLower());
                }

                if (groupChat == null) {
                    groupChat = new GroupChatModel(e.Channel, e.Channel, this);
                    groupChat.UnsafePersonsComparer = StringComparer.OrdinalIgnoreCase;
                    Session.AddChat(groupChat);
                } else {
                    // chat still exists, so we we only need to enable it
                    // (sync is done in _OnChannelActiveSynced)
                    Session.EnableChat(groupChat);
                }
            } else {
                // someone else joined, let's add him to the channel chat
                // HACK: some buggy networks might send JOIN messages for users
                // that are already on the channel
                if (groupChat.UnsafePersons.ContainsKey(e.Who.ToLower())) {
            #if LOG4NET
                   _Logger.Error("_OnJoin(): groupChat.UnsafePerson contains " +
                                  "already: '" + e.Who + "', ignoring...");
            #endif
                    // ignore
                } else {
                    IrcUser siuser = _IrcClient.GetIrcUser(e.Who);
                    var icuser = CreateGroupPerson(e.Who);
                    icuser.Ident = siuser.Ident;
                    icuser.Host = siuser.Host;
                    groupChat.UnsafePersons.Add(icuser.NickName.ToLower(), icuser);
                    Session.AddPersonToGroupChat(groupChat, icuser);
                }
            }

            var builder = CreateMessageBuilder();
            builder.AppendEventPrefix();
            builder.AppendIdendityName(GetPerson(groupChat, e.Who));
            // TRANSLATOR: do NOT change the position of {0}!
            builder.AppendText(_("{0} [{1}] has joined {2}"),
                               String.Empty,
                               String.Format("{0}@{1}", e.Data.Ident, e.Data.Host),
                               e.Channel);

            var msg = builder.ToMessage();
            Session.AddMessageToChat(groupChat, msg);
        }
コード例 #7
0
ファイル: GlobalChatBot.cs プロジェクト: blha303/MCDawn
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     try
     {
         if (e.Data.Channel == devchannel)
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Dev Global Chat Channel.");
         }
         else
         {
             Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Global Chat Channel.");
         }
         globalchat.RfcNames(channel);
         globalchat.RfcNames(devchannel);
     }
     catch (Exception ex) { Server.ErrorLog(ex); }
 }
コード例 #8
0
ファイル: IrcBot.cs プロジェクト: tgiphil/SmartIrcBot4net
 internal void HandleOnJoin(object sender, JoinEventArgs args)
 {
     foreach (var join in Joins) {
     join.Handle(args);
       }
 }
コード例 #9
0
ファイル: Logger.cs プロジェクト: Crobol/Bot
 public void OnJoin(object sender, JoinEventArgs e)
 {
 }
コード例 #10
0
 void irc_OnJoin(object sender, JoinEventArgs e)
 {
     //Debug.WriteLine("Join: " + e.Channel);
 }
コード例 #11
0
ファイル: IRCBridge.cs プロジェクト: Warpten/wowarmory
 void irc_OnJoin(object sender, JoinEventArgs e)
 {
     while (ircMessageQueue.Count > 0) {
         var msg = ircMessageQueue.Dequeue();
         IrcSendMessage(msg);
     }
 }
コード例 #12
0
ファイル: IrcBot.cs プロジェクト: minecrafter/Constantinople
 public void OnJoin(object sender, JoinEventArgs e)
 {
     if (!logs.ContainsKey (e.Data.Channel))
         EnableChannel (e.Data.Channel);
     logs [e.Data.Channel].AddLine (e.Data.Nick + " has joined " + e.Channel);
 }
コード例 #13
0
ファイル: IrcBot.cs プロジェクト: mlapaglia/BTNster
 /// <summary>
 /// Update the UI status strip once we are in the announce channel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void irc_OnJoin(object sender, JoinEventArgs e)
 {
 }
コード例 #14
0
 private void MeebyIrc_OnJoin(object sender, Meebey.SmartIrc4net.JoinEventArgs e)
 {
     parent.ThreadSafeAddPreviewText("! JOINED: " + e.Data.Nick, LineType.IrcCommand);
 }
コード例 #15
0
 private void OnJoin(object sender, JoinEventArgs e)
 {
     AddClientLine(e.Who + " has logged on to the network.", Color.DarkBlue);
     AddGameMsg("Information", e.Who + " has logged on to the network.");
 }
コード例 #16
0
ファイル: GlobalChat.cs プロジェクト: CH4Code/OpenRA
        void OnJoin(object sender, JoinEventArgs e)
        {
            if (e.Who == client.Nickname || channel == null || e.Channel != channel.Name)
                return;

            AddNotification("{0} joined the chat.".F(e.Who));
            Game.RunAfterTick(() => Users.Add(e.Who, new ChatUser(e.Who, false, false)));
        }
コード例 #17
0
ファイル: frmMain.cs プロジェクト: Oser/LOIC
 void OnJoin(object sender, JoinEventArgs e)
 {
     if (!irc.IsMe(e.Who)) incrementHiveSize();
 }
コード例 #18
0
ファイル: IrcBot.cs プロジェクト: tgiphil/SmartIrcBot4net
 void HandleOnJoin(object sender, JoinEventArgs e)
 {
     foreach (var plugin in plugins) {
     plugin.HandleOnJoin(sender, e);
       }
 }
コード例 #19
0
ファイル: ChannelWindow.xaml.cs プロジェクト: atoumey/z-chat
        void irc_OnJoin(object sender, JoinEventArgs e)
        {
            if (e.Channel != Channel) return;

            Output(new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, "!") },
                   new ColorTextPair[] { new ColorTextPair(ZChat.Options.TextFore, e.Who + " joined the chat") });

            UpdateUsers();
            if (ZChat.Options.HighlightTrayIconForJoinsAndQuits)
                ShowActivity();
        }
コード例 #20
0
ファイル: IRCBot.cs プロジェクト: duaneking/MCSharp
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Logger.Log(e.Data.Nick + " has joined the IRC channel", LogType.IRCChat);
     Player.GlobalMessage(e.Data.Nick + " has joined the IRC channel");
     irc.RfcNames(channel);
 }
コード例 #21
0
 void onIRCJoin(object sender, JoinEventArgs e)
 {
     messageToVP(true, "", msgEntry, e.Who, e.Channel);
 }
コード例 #22
0
ファイル: IrcMaster.cs プロジェクト: JamesBondski/mafiabot
 void OnJoin(object sender, JoinEventArgs e)
 {
     if (Client.IsMe(e.Who)) {
         return;
     }
     this.UserJoined(this.GetChannel(e.Channel), this.GetUser(e.Who));
 }
コード例 #23
0
ファイル: Program.cs プロジェクト: jefe323/Botler
 static void irc_OnJoin(object sender, JoinEventArgs e)
 {
     Commands.Core.Seen.set.go(e.Data.Nick, e.Data.Channel, String.Format("{0} has joined the channel", e.Data.Nick));
 }
コード例 #24
0
ファイル: IRCBot.cs プロジェクト: sillyboyization/MCDawn
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Server.s.Log(e.Data.Nick + " has joined channel " + e.Data.Channel);
     if (e.Data.Channel == opchannel)
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has joined the operator channel", false);
     }
     else
     {
         Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + Server.DefaultColor + " has joined the channel", false);
     }
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
コード例 #25
0
ファイル: BetWorker.cs プロジェクト: Booom3/CreditBot
 private void _ircClient_OnJoin(object sender, JoinEventArgs e)
 {
     if(e.Who != _botName)
     {
         User existingUser = GetUser(e.Who);
         if (existingUser != null)
             _users.Add(existingUser);
         else
             _users.Add(new User(e.Who, _defaultStartValue));
     }
 }
コード例 #26
0
ファイル: ZChat.cs プロジェクト: atoumey/z-chat
        void IRC_OnJoin(object sender, JoinEventArgs e)
        {
            // this is how we know the server has successfully joined us to a channel
            if (e.Who == IRC.Nickname
                && !channelWindows.Any<ChannelWindow>(delegate(ChannelWindow chan)
                { if (chan.Channel == e.Channel) return true; else return false; }))
            {
                Application.Current.Dispatcher.Invoke(new VoidDelegate(delegate
                {
                    ChannelWindow newWindow = new ChannelWindow(this);
                    newWindow.Channel = e.Channel;
                    newWindow.UserInput += ParseUserInput;

                    newWindow.Closed += channelWindow_Closed;
                    channelWindows.Add(newWindow);
                    newWindow.Show();
                }));
            }
        }
コード例 #27
0
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     //Player.GlobalMessageDevs("To Devs: " + Server.GlobalChatColour + e.Data.Nick + Server.DefaultColor + " has joined the Global Chat Channel.");
     globalchat.RfcNames(channel);
 }
コード例 #28
0
ファイル: IRCBot.cs プロジェクト: blingbling4567/MCDawn
 // When someone joins the IRC
 void OnJoin(object sender, JoinEventArgs e)
 {
     Server.s.Log(Server.IRCColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel");
     Player.GlobalChat(null, Server.IRCColour + e.Data.Nick + "&g has joined the " + (e.Data.Channel.ToLower() == opchannel.ToLower() ? "operator " : "") + "channel", false);
     irc.RfcNames(channel);
     irc.RfcNames(opchannel);
 }
コード例 #29
0
ファイル: ChatUI.cs プロジェクト: Quintinon/outwar-dca
 void mClient_OnJoin(object sender, JoinEventArgs e)
 {
     UpdateNames();
 }
コード例 #30
0
ファイル: IRC.cs プロジェクト: Netshroud/steam-irc-bot
        void OnJoin( object sender, JoinEventArgs e )
        {
            var mainChan = Settings.Current.GetChannelsForTag( "main" )
                .FirstOrDefault();

            if ( mainChan == null )
            {
                Log.WriteWarn( "IRC", "No main channel configured, won't connect to Steam!" );
                return;
            }

            if ( e.Data.Nick == client.Nickname && string.Equals( e.Channel, mainChan.Channel, StringComparison.OrdinalIgnoreCase ) )
            {
                if ( !Steam.Instance.Connected )
                    Steam.Instance.Connect();
            }
        }
コード例 #31
0
ファイル: Trigger.cs プロジェクト: tgiphil/SmartIrcBot4net
 protected object Process(ParameterInfo info, JoinEventArgs args)
 {
     if (info.ParameterType == typeof(JoinEventArgs)) {
     return args;
       } else if (info.ParameterType == typeof(string)) {
     string name = info.Name.ToLower();
     switch (name) {
     case "who":
     case "nick":
       return args.Who;
     case "channel":
     default:
       return args.Channel;
     }
       } else {
     return Process(info, args.Data);
       }
 }