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


C# wmib.User类代码示例

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


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

示例1: Hook_Nick

 public override void Hook_Nick(config.channel channel, User Target, string OldNick)
 {
     Notification result = Notification.RetrieveTarget(Target.Nick);
     while (result != null)
     {
         core.irc._SlowQueue.DeliverMessage(result.Source_Name + "! " + OldNick + " just changed nicknames to " + Target.Nick + " which you wanted to talk with, in " + channel.Name + ". This message was delivered to you because you asked me to notify you about this user's activity. For more information, see http://meta.wikimedia.org/wiki/WM-Bot", result.Source_Name, IRC.priority.low);
         lock (Notification.NotificationList)
         {
             Notification.NotificationList.Remove(result);
         }
         result = Notification.RetrieveTarget(Target.Nick);
     }
     result = Notification.RetrieveTarget(OldNick);
     while (result != null)
     {
         core.irc._SlowQueue.DeliverMessage(result.Source_Name + "! " + OldNick + " just changed a nickname to " + Target.Nick + " which you wanted to talk with, in " + channel.Name + ". This message was delivered to you because you asked me to notify you about this user's activity. For more information, see http://meta.wikimedia.org/wiki/WM-Bot", result.Source_Name, IRC.priority.low);
         lock (Notification.NotificationList)
         {
             Notification.NotificationList.Remove(result);
         }
         result = Notification.RetrieveTarget(OldNick);
     }
     if (Target.Nick.ToLower() != OldNick.ToLower())
     {
         result = Notification.RetrieveSource(OldNick);
         while (result != null)
         {
             result.Source_Name = Target.Nick;
             result = Notification.RetrieveSource(OldNick);
         }
     }
 }
开发者ID:Krenair,项目名称:wikimedia-bot,代码行数:32,代码来源:NotifyUs.cs

示例2: Hook_PRIV

 public override void Hook_PRIV(config.channel channel, User invoker, string message)
 {
     if (message.StartsWith("!") && message.Contains("|"))
     {
         DebugLog("Parsing: " + message, 6);
         string user = message.Substring(message.IndexOf("|") + 1);
         user = user.Trim();
         DebugLog("Parsed user - " + user, 6);
         if (user.Contains(" "))
         {
             user = user.Substring(0, user.IndexOf(" "));
         }
         if (user != "")
         {
             DebugLog("Adding user to list " + user, 6);
             Ring.Add(new Buffer.Item(invoker.Nick, user));
         }
     }
     else
     {
         message = message.ToLower();
         if (message.Contains(channel.instance.Nick) && !message.Contains("thanks to") && (message.Contains("thanks") || message.Contains("thank you")) && !message.Contains("no thank"))
         {
             string response = "Hey " + invoker.Nick + ", you are welcome!";
             Buffer.Item x = Ring.getUser(invoker.Nick);
             DebugLog("Checking if user was recently informed using infobot");
             if (x != null)
             {
                 response = "Hey " + invoker.Nick + ", you are welcome, but keep in mind I am just a stupid bot, it was actually " + x.User + " who helped you :-)";
                 Ring.Delete(x);
             }
             core.irc._SlowQueue.DeliverMessage(response, channel);
         }
     }
 }
开发者ID:Krenair,项目名称:wikimedia-bot,代码行数:35,代码来源:Class1.cs

示例3: Hook_PRIV

 public override void Hook_PRIV(config.channel channel, User invoker, string message)
 {
     if (message == "@replag")
     {
         core.irc._SlowQueue.DeliverMessage("Replication lag is approximately " + GetReplag(), channel);
         return;
     }
 }
开发者ID:johnduhart,项目名称:wikimedia-bot,代码行数:8,代码来源:Class1.cs

示例4: Hook_PRIV

 public override void Hook_PRIV(Channel channel, User invoker, string message)
 {
     if (message == Configuration.System.CommandPrefix + "ping")
     {
         Info i = new Info();
         i.channel = channel;
         Thread thread = new Thread(Ping);
         thread.Start(i);
     }
 }
开发者ID:johnduhart,项目名称:wikimedia-bot,代码行数:10,代码来源:Class.cs

示例5: Hook_Kick

 public override void Hook_Kick(config.channel channel, User source, User user)
 {
     Notification result = Notification.RetrieveTarget(user.Nick);
     while (result != null)
     {
         core.irc._SlowQueue.DeliverMessage(result.Source_Name + "! " + user.Nick + " just got kicked from " + channel.Name + ". This message was delivered to you because you asked me to notify you about this user's activity. For more information, see http://meta.wikimedia.org/wiki/WM-Bot", result.Source_Name, IRC.priority.low);
         lock (Notification.NotificationList)
         {
             Notification.NotificationList.Remove(result);
         }
         result = Notification.RetrieveTarget(user.Nick);
     }
 }
开发者ID:Krenair,项目名称:wikimedia-bot,代码行数:13,代码来源:NotifyUs.cs

示例6: Hook_OnPrivateFromUser

        public override bool Hook_OnPrivateFromUser(string message, User user)
        {
            WriteStatus(user.Nick, user.Host, "<private message>", item.Action.Talk);
            if (message.StartsWith("@seen "))
            {
                    string parameter = "";
                        parameter = message.Substring(message.IndexOf(" ") + 1);
                    if (parameter != "")
                    {
                        RetrieveStatus(parameter, null, user.Nick);
                        return true;
                    }
            }

            if (message.StartsWith("@seenrx "))
            {
                    core.irc._SlowQueue.DeliverMessage("Sorry but this command can be used in channels only (it's cpu expensive so it can be used on public by trusted users only)", user.Nick, IRC.priority.low);
                    return true;
            }
            return false;
        }
开发者ID:reedy,项目名称:wikimedia-bot,代码行数:21,代码来源:Seen.cs

示例7: IrcKick

 public static void IrcKick(Channel Channel, User Source, User Target)
 {
     lock(ExtensionHandler.Extensions)
     {
         foreach (Module module in ExtensionHandler.Extensions)
         {
             if (!module.IsWorking)
             {
                 continue;
             }
             try
             {
                 module.Hook_Kick(Channel, Source, Target);
             } catch (Exception fail)
             {
                 Syslog.Log("MODULE: exception at Hook_Kick in " + module.Name, true);
                 Core.HandleException(fail, module.Name);
             }
         }
     }
 }
开发者ID:johnduhart,项目名称:wikimedia-bot,代码行数:21,代码来源:SystemHooks.cs

示例8: Hook_Quit

 public virtual void Hook_Quit(User user, string Message)
 {
     return;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:4,代码来源:Module.cs

示例9: Hook_SetConfig

 public virtual bool Hook_SetConfig(config.channel chan, User invoker, string config, string value)
 {
     return false;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:4,代码来源:Module.cs

示例10: Hook_Part

 public virtual void Hook_Part(config.channel channel, User user)
 {
     return;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:4,代码来源:Module.cs

示例11: Hook_PRIV

 /// <summary>
 /// This hook is called when someone send a private message to channel
 /// </summary>
 /// <param name="channel">channel</param>
 /// <param name="invoker">invoker</param>
 /// <param name="message">message</param>
 public virtual void Hook_PRIV(config.channel channel, User invoker, string message)
 {
     return;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:10,代码来源:Module.cs

示例12: Hook_OnPrivateFromUser

 public virtual bool Hook_OnPrivateFromUser(string message, User user)
 {
     return false;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:4,代码来源:Module.cs

示例13: Hook_OnSelf

 public virtual void Hook_OnSelf(config.channel channel, User self, string message)
 {
     return;
 }
开发者ID:atdt,项目名称:wikimedia-bot,代码行数:4,代码来源:Module.cs

示例14: Hook_OnSelf

 public override void Hook_OnSelf(config.channel channel, User self, string message)
 {
     chanLog(message, channel, config.username, "");
 }
开发者ID:reedy,项目名称:wikimedia-bot,代码行数:4,代码来源:Plugin.cs

示例15: Hook_Quit

 public override void Hook_Quit(User user, string Message)
 {
     WriteStatus(user.Nick, user.Host, "N/A", item.Action.Exit, "", Message);
 }
开发者ID:reedy,项目名称:wikimedia-bot,代码行数:4,代码来源:Seen.cs


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