当前位置: 首页>>代码示例>>C#>>正文


C# IrcDotNet.IrcLocalUser类代码示例

本文整理汇总了C#中IrcDotNet.IrcLocalUser的典型用法代码示例。如果您正苦于以下问题:C# IrcLocalUser类的具体用法?C# IrcLocalUser怎么用?C# IrcLocalUser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IrcLocalUser类属于IrcDotNet命名空间,在下文中一共展示了IrcLocalUser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleClientConnected

        protected virtual void HandleClientConnected(IrcRegistrationInfo regInfo)
        {
            if (regInfo.Password != null)
                // Authenticate with server using password.
                SendMessagePassword(regInfo.Password);

            // Check if client is registering as service or normal user.
            if (regInfo is IrcServiceRegistrationInfo)
            {
                // Register client as service.
                var serviceRegInfo = (IrcServiceRegistrationInfo)regInfo;
                SendMessageService(serviceRegInfo.NickName, serviceRegInfo.Distribution,
                    serviceRegInfo.Description);

                this.localUser = new IrcLocalUser(serviceRegInfo.NickName, serviceRegInfo.Distribution,
                    serviceRegInfo.Description);
            }
            else
            {
                // Register client as normal user.
                var userRegInfo = (IrcUserRegistrationInfo)regInfo;
                SendMessageNick(userRegInfo.NickName);
                SendMessageUser(userRegInfo.UserName, GetNumericUserMode(userRegInfo.UserModes),
                    userRegInfo.RealName);

                this.localUser = new IrcLocalUser(userRegInfo.NickName, userRegInfo.UserName, userRegInfo.RealName,
                    userRegInfo.UserModes);
            }
            this.localUser.Client = this;

            // Add local user to list of known users.
            lock (((ICollection)this.usersReadOnly).SyncRoot)
                this.users.Add(this.localUser);

            OnConnected(new EventArgs());
        }
开发者ID:txdv,项目名称:ircdotnet,代码行数:36,代码来源:IrcClient.cs

示例2: OnLocalUserQuit

 protected override void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e)
 {
     Console.WriteLine("Quit: {0}",e.Comment);
 }
开发者ID:gkinsman,项目名称:StatsBot,代码行数:4,代码来源:StatsBot.cs

示例3: OnLocalUserQuit

 protected abstract void OnLocalUserQuit(IrcLocalUser localUser, IrcCommentEventArgs e);
开发者ID:gkinsman,项目名称:StatsBot,代码行数:1,代码来源:IrcBot.cs

示例4: OnLocalUserLeftChannel

 protected override void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
 {
     //
 }
开发者ID:jaddie,项目名称:Irc.Net-4.0-Project---Fork,代码行数:4,代码来源:TwitterBot.cs

示例5: SendGreeting

 private void SendGreeting(IrcLocalUser localUser, IIrcMessageTarget target)
 {
     localUser.SendNotice(target, "This is the {0}, welcome.", ProgramInfo.AssemblyTitle);
     localUser.SendNotice(target, "Message me with '.help' for instructions on how to use me.");
     localUser.SendNotice(target, "Remember to log in via a private message and not via the channel.");
 }
开发者ID:jaddie,项目名称:Irc.Net-4.0-Project---Fork,代码行数:6,代码来源:TwitterBot.cs

示例6: OnLocalUserLeftChannel

 /// <summary>
 /// </summary>
 /// <param name="localUser">
 /// </param>
 /// <param name="e">
 /// </param>
 protected abstract void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e);
开发者ID:gordonc64,项目名称:CellAO-NightPredator,代码行数:7,代码来源:IrcBot.cs

示例7: SetLocalUserModes

 internal void SetLocalUserModes(IrcLocalUser user, string modes)
 {
     SendMessageUserMode(user.NickName, modes);
 }
开发者ID:txdv,项目名称:ircdotnet,代码行数:4,代码来源:IrcClient.cs

示例8: OnLocalUserJoinedChannel

        protected override void OnLocalUserJoinedChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
        {
            thisclient.FloodPreventer = new IrcStandardFloodPreventer(2,4000);
            thisclient.WhoReplyReceived += UserListUpdate;
            if (xmlprovider.runningVotes().Count() > 0)
            {
                VoteTimer = new System.Timers.Timer(5000);
                VoteTimer.Elapsed += OnVoteTimerEvent;
                VoteTimer.Enabled = true;
            }
            //OnClientRegistered may happen before joined channel thus...
            _streamProviderManager = new StreamProviderManager();
            _streamProviderManager.StreamStarted += OnStreamStarted;
            _streamProviderManager.StreamStopped += OnStreamStopped;
            _streamProviderManager.StreamGlobalNotification += OnStreamGlobalNotification;
            _streamProviderManager.AddStreamProvider(new TwitchProvider());
            _streamProviderManager.AddStreamProvider(new HitboxProvider());
            //localUser.Client.WhoReplyReceived += WhoReplyReceived;

            if (reconnectimer != null)
            {
                reconnectimer.Dispose();
            }

            if (!debug)
            {
                reconnectimer = new System.Timers.Timer(150000);
            }
            else
            {
                reconnectimer = new System.Timers.Timer(240000);
            }
            reconnectimer.Elapsed += OnReconnectTimer;
            reconnectimer.Enabled = true;
        }
开发者ID:Kolpa,项目名称:DeathmicChatbot,代码行数:35,代码来源:BotDeathmic.cs

示例9: OnLocalUserNoticeReceived

 protected override void OnLocalUserNoticeReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
 {
     Trace.TraceInformation("OnLocalUserNoticeReceived: " + e.Text);
 }
开发者ID:bremnes,项目名称:IrcBot,代码行数:4,代码来源:AzureBot.cs

示例10: OnLocalUserMessageReceived

 protected override void OnLocalUserMessageReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
 {
     if (e.Source.Name != localUser.NickName)
         Trace.TraceInformation("OnLocalUserMessageReceived: " + e.Text);
 }
开发者ID:bremnes,项目名称:IrcBot,代码行数:5,代码来源:AzureBot.cs

示例11: OnLocalUserLeftChannel

 protected override void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
 {
     Trace.TraceInformation("OnLocalUserLeftChannel");
 }
开发者ID:bremnes,项目名称:IrcBot,代码行数:4,代码来源:AzureBot.cs

示例12: HandleClientConnected

        private void HandleClientConnected(IrcRegistrationInfo regInfo)
        {
            Logger.WriteLine("Connected to server at '{0}'.", TraceEventType.Verbose,((IPEndPoint)this.socket.RemoteEndPoint).Address);
            
            if (regInfo.Password != null)
                // Authenticate with server using password.
                SendMessagePassword(regInfo.Password);

            // Check if client is registering as service or normal user.
            if (regInfo is IrcServiceRegistrationInfo)
            {
                // Register client as service.
                var serviceRegInfo = (IrcServiceRegistrationInfo)regInfo;
                SendMessageService(serviceRegInfo.NickName, serviceRegInfo.Distribution,
                    serviceRegInfo.Description);

                this.localUser = new IrcLocalUser(serviceRegInfo.NickName, serviceRegInfo.Distribution,
                    serviceRegInfo.Description);
            }
            else
            {
                // Register client as normal user.
                var userRegInfo = (IrcUserRegistrationInfo)regInfo;
                SendMessageNick(userRegInfo.NickName);
                SendMessageUser(userRegInfo.UserName, GetNumericUserMode(userRegInfo.UserModes),
                    userRegInfo.RealName);

                this.localUser = new IrcLocalUser(userRegInfo.NickName, userRegInfo.UserName, userRegInfo.RealName,
                    userRegInfo.UserModes);
            }
            this.localUser.Client = this;

            // Add local user to list of known users.
            lock (((ICollection)this.usersReadOnly).SyncRoot)
                this.users.Add(this.localUser);

            OnConnected(new EventArgs());
        }
开发者ID:carriercomm,项目名称:TwitchIrc,代码行数:38,代码来源:IrcClient.cs

示例13: OnLocalUserMessageReceived

 protected override void OnLocalUserMessageReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
 {
     //Console.WriteLine("{0}", e.Source.ToString());
 }
开发者ID:quiznilo,项目名称:Zerobot,代码行数:4,代码来源:bot.cs

示例14: OnLocalUserJoinedChannel

 protected override void OnLocalUserJoinedChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
 {
 }
开发者ID:quiznilo,项目名称:Zerobot,代码行数:3,代码来源:bot.cs

示例15: GetLocalUserModes

 internal void GetLocalUserModes(IrcLocalUser user)
 {
     SendMessageUserMode(user.NickName);
 }
开发者ID:txdv,项目名称:ircdotnet,代码行数:4,代码来源:IrcClient.cs


注:本文中的IrcDotNet.IrcLocalUser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。