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

C# IrcDotNet.IrcUser类代码示例

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

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



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

示例1: IRCCommandEventArgs

 public IRCCommandEventArgs(string text, IrcUser sender, IIrcMessageTarget target)
 {
     parameters = IRCCommands.ParseParameters(text);
     RawText = text;
     Sender = sender;
     Target = target;
 }
开发者ID:Enerdy,项目名称:TShockIRC,代码行数:7,代码来源:IRCCommandEventArgs.cs


示例2: Execute

        public void Execute(IrcClient Client, string channel, IrcUser Sender, string message)
        {
            message = message.Trim();
            if (message == "")
            {
                Client.LocalUser.SendMessage(channel, horoscopeHelpMsg());
            }
            else
            {

                if (!signs.ContainsKey(message))
                {
                    Client.LocalUser.SendMessage(channel, "Why won't you give me a sign~");
                    return;
                }

                string html = getHTML(signs[message]);

                string horoscope = dropHtmlPrecedingHoroscope(html, message);
                horoscope = dropHtmlTailingHoroscope(horoscope);
                horoscope = html2Txt(horoscope);

                Client.LocalUser.SendMessage(channel, horoscope);
            }
        }
开发者ID:code-n-beer,项目名称:SimoBot,代码行数:25,代码来源:HoroscopeFeature.cs


示例3: TwitterBotUser

        public TwitterBotUser(IrcUser ircUser)
            : this()
        {
            Debug.Assert(ircUser != null);

            this.IrcUser = ircUser;
        }
开发者ID:jaddie,项目名称:Irc.Net-4.0-Project---Fork,代码行数:7,代码来源:TwitterBotUser.cs


示例4: IrcChannelInvitationEventArgs

        /// <summary>
        /// Initializes a new instance of the <see cref="IrcChannelInvitationEventArgs"/> class.
        /// </summary>
        /// <param name="channel">The channel to which the recipient user is invited.</param>
        /// <param name="inviter">The user inviting the recipient user to the channel.</param>
        public IrcChannelInvitationEventArgs(IrcChannel channel, IrcUser inviter)
            : base(channel)
        {
            if (inviter == null)
                throw new ArgumentNullException("inviter");

            this.Inviter = inviter;
        }
开发者ID:toddhainsworth,项目名称:ircdotnet,代码行数:13,代码来源:IrcEventArgs.cs


示例5: IrcChannelUser

        internal IrcChannelUser(IrcUser user, IEnumerable<char> modes = null)
        {
            this.user = user;

            this.modes = new HashSet<char>();
            this.modesReadOnly = new ReadOnlySet<char>(this.modes);
            if (modes != null)
                this.modes.AddRange(modes);
        }
开发者ID:GJiin,项目名称:meridian59-dotnet,代码行数:9,代码来源:IrcChannelUser.cs


示例6: OnChannelModeChanged

 protected override void OnChannelModeChanged(IrcChannel channel, IrcUser source, string newModes, IEnumerable<string> newModeParameters) { 
     // Twitch doesn't actually send JOIN messages. This means we need to add users
     // to the channel when changing their mode if we haven't already.
     foreach (string username in newModeParameters)
     {
         IrcUser user = GetUserFromNickName(username);
         if (channel.GetChannelUser(user) == null)
             channel.HandleUserJoined(new IrcChannelUser(user));
     }
 }
开发者ID:Sebioff,项目名称:ParkitectTwitchIntegration,代码行数:10,代码来源:TwitchIrcClient.cs


示例7: IrcQueryViewModel

 public IrcQueryViewModel(IrcUser user, IrcClient client, Settings settings)
 {
     this.Settings = settings;
       this.User = user;
       this.client = client;
       this.DisplayName = user.NickName;
       this.Messages = new BindableCollection<Message>();
       this.Closable = true;
       // TODO
       this.client.LocalUser.MessageReceived += this.messageReceived;
 }
开发者ID:schwarz,项目名称:handle,代码行数:11,代码来源:IrcQueryViewModel.cs


示例8: Run

        public void Run(IrcClient client, IIrcMessageSource source, IList<IIrcMessageTarget> targets, string command, IList<string> parameters)
        {
            Client = client;
            SourceUser = (IrcUser)source;
            Command = command;
            Parameters = parameters;

            if (targets.Contains(Client.LocalUser) && source != null)
                ReplyTargets = new[] { (IIrcMessageTarget)source };
            else
            {
                ReplyTargets = targets;
            }

            Run();
        }
开发者ID:bremnes,项目名称:IrcBot,代码行数:16,代码来源:BaseChatCommand.cs


示例9: LevelSubmission

 public LevelSubmission(string levelID, IrcUser user, bool forceAdd)
 {
     //If you are force adding the level, bypass error checking, formatting and API call.
     if (!forceAdd)
     {
         if (!IsValidLevelCode(levelID))
             throw new ArgumentException("Invalid level code format");
         LevelID = FormatLevelCode(levelID);
         Level = SMMApi.GetLevel(LevelID);
         if (Level == null)
             throw new ArgumentException("Level does not exist");
     }
     else
         LevelID = levelID;
     //Initiaze variables
     User = user;
     IsPlayed = false;
     IsQueued = false;
 }
开发者ID:dram55,项目名称:MarioMakerTwitchBot,代码行数:19,代码来源:LevelSubmission.cs


示例10: HandleTopicChanged

        internal void HandleTopicChanged(IrcUser source, string newTopic)
        {
            this.Topic = newTopic;

            OnTopicChanged(new IrcUserEventArgs(source));
        }
开发者ID:charla-n,项目名称:BIRC,代码行数:6,代码来源:IrcChannel.cs


示例11: HandleModesChanged

        internal void HandleModesChanged(IrcUser source,  string newModes, IEnumerable<string> newModeParameters)
        {
            lock (((ICollection)this.modesReadOnly).SyncRoot)
                this.modes.UpdateModes(newModes, newModeParameters, this.client.ChannelUserModes,
                    (add, mode, modeParameter) => this.users.Single(
                        cu => cu.User.NickName == modeParameter).HandleModeChanged(add, mode));

            OnModesChanged(new IrcUserEventArgs(source));
        }
开发者ID:charla-n,项目名称:BIRC,代码行数:9,代码来源:IrcChannel.cs


示例12: HandleUserInvited

        internal void HandleUserInvited(IrcUser user)
        {
			lock (this.modesReadOnly)
                OnUserInvited(new IrcUserEventArgs(user));
        }
开发者ID:Sebioff,项目名称:ParkitectTwitchIntegration,代码行数:5,代码来源:IrcChannel.cs


示例13: IrcUserEventArgs

        /// <inheritdoc/>
        /// <summary>
        /// Initializes a new instance of the <see cref="IrcUserEventArgs"/> class.
        /// </summary>
        /// <param name="user">The user that the event concerns.</param>
        public IrcUserEventArgs(IrcUser user, string comment = null)
            : base(comment)
        {
            if (user == null)
                throw new ArgumentNullException("user");

            this.User = user;
        }
开发者ID:toddhainsworth,项目名称:ircdotnet,代码行数:13,代码来源:IrcEventArgs.cs


示例14: GetUserFromNickName

        /// <summary>
        ///     Gets the user with the specified nick name, creating it if necessary.
        /// </summary>
        /// <param name="nickName">The nick name of the user.</param>
        /// <param name="isOnline">
        ///     <see langword="true" /> if the user is currently online;
        ///     <see langword="false" />, if the user is currently offline.
        ///     The <see cref="IrcUser.IsOnline" /> property of the user object is set to this value.
        /// </param>
        /// <param name="createdNew">
        ///     <see langword="true" /> if the user object was created during the call;
        ///     <see langword="false" />, otherwise.
        /// </param>
        /// <returns>The user object that corresponds to the specified nick name.</returns>
        protected IrcUser GetUserFromNickName(string nickName, bool isOnline, out bool createdNew)
        {
            if (nickName == null)
                throw new ArgumentNullException("nickName");
            if (nickName.Length == 0)
                throw new ArgumentException(Resources.MessageValueCannotBeEmptyString, "nickName");

            // Search for user with given nick name in list of known users. If it does not exist, add it.
            IrcUser user;
            lock (((ICollection) Users).SyncRoot)
            {
                user = users.SingleOrDefault(u => u.NickName == nickName);
                if (user == null)
                {
                    user = new IrcUser
                    {
                        Client = this,
                        NickName = nickName
                    };
                    users.Add(user);
                    createdNew = true;
                }
                else
                {
                    createdNew = false;
                }
            }
            user.IsOnline = isOnline;
            return user;
        }
开发者ID:IrcDotNet,项目名称:IrcDotNet,代码行数:44,代码来源:IrcClient.cs


示例15: IrcUserEventArgs

 /// <inheritdoc/>
 /// <summary>
 /// Initializes a new instance of the <see cref="IrcUserEventArgs"/> class.
 /// </summary>
 /// <param name="user">The user that the event concerns, or <see langword="null"/> for no user.</param>
 public IrcUserEventArgs(IrcUser user, string comment = null)
     : base(comment)
 {
     this.User = user;
 }
开发者ID:txdv,项目名称:ircdotnet,代码行数:10,代码来源:IrcEventArgs.cs


示例16: NotImplemented

 private void NotImplemented(IrcClient Client, string channel, IrcUser Sender, string message)
 {
     Client.LocalUser.SendMessage(channel, "Not implemented");
 }
开发者ID:code-n-beer,项目名称:SimoBot,代码行数:4,代码来源:HoroscopeFeature.cs


示例17: HandleInviteReceived

 internal void HandleInviteReceived(IrcUser inviter, IrcChannel channel)
 {
     OnInviteReceived(new IrcChannelInvitationEventArgs(channel, inviter));
 }
开发者ID:IrcDotNet,项目名称:IrcDotNet,代码行数:4,代码来源:IrcUser.cs


示例18: HandleUserInvited

 internal void HandleUserInvited(IrcUser user)
 {
     lock (((ICollection)this.modesReadOnly).SyncRoot)
         OnUserInvited(new IrcUserEventArgs(user));
 }
开发者ID:toddhainsworth,项目名称:ircdotnet,代码行数:5,代码来源:IrcChannel.cs


示例19: OnChannelModeChanged

 protected virtual void OnChannelModeChanged(IrcChannel channel, IrcUser source, string newModes,
     IEnumerable<string> newModeParameters)
 {
 }
开发者ID:IrcDotNet,项目名称:IrcDotNet,代码行数:4,代码来源:IrcClientMessageProcessing.cs


示例20: GetChannelUser

        /// <summary>
        /// Gets the <see cref="IrcChannelUser"/> in the channel that corresponds to the specified
        /// <see cref="IrcUser"/>, or <see langword="null"/> if none is found.
        /// </summary>
        /// <param name="user">The <see cref="IrcUser"/> for which to look.</param>
        /// <returns>The <see cref="IrcChannelUser"/> in the channel that corresponds to the specified
        /// <see cref="IrcUser"/>, or <see langword="null"/> if none is found.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="user"/> is <see langword="null"/>.</exception>
        public IrcChannelUser GetChannelUser(IrcUser user)
        {
            if (user == null)
                throw new ArgumentNullException("user");

            return this.users.SingleOrDefault(cu => cu.User == user);
        }
开发者ID:toddhainsworth,项目名称:ircdotnet,代码行数:15,代码来源:IrcChannel.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Ast.AstGenerator类代码示例发布时间:2022-05-26
下一篇:
C# IrcDotNet.IrcRegistrationInfo类代码示例发布时间: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