當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。