• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IrcDotNet.IrcLocalUser类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnLocalUserMessageReceived

 protected override void OnLocalUserMessageReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
 {
     ReconnectInbound = false;
 }
开发者ID:Kolpa,项目名称:DeathmicChatbot,代码行数:4,代码来源:BotDeathmic.cs


示例17: SubscribeToRegisteredClientEvents

 private void SubscribeToRegisteredClientEvents(IrcLocalUser user)
 {
     user.JoinedChannel += OnJoinedChannel;
     user.MessageReceived += OnMessageReceived;
 }
开发者ID:koushikajay,项目名称:Alfred,代码行数:5,代码来源:IrcBot.cs


示例18: OnLocalUserLeftChannel

 protected virtual void OnLocalUserLeftChannel(IrcLocalUser localUser, IrcChannelEventArgs e)
 {
 }
开发者ID:IrcDotNet,项目名称:IrcDotNet,代码行数:3,代码来源:IrcBot.cs


示例19: OnLocalUserNoticeReceived

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


示例20: OnLocalUserNoticeReceived

 protected virtual void OnLocalUserNoticeReceived(IrcLocalUser localUser, IrcMessageEventArgs e)
 {
 }
开发者ID:IrcDotNet,项目名称:IrcDotNet,代码行数:3,代码来源:IrcBot.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IrcDotNet.IrcMessageEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# IrcDotNet.IrcClient类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap