예제 #1
0
        private void Events_UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
        {
            lock (this.Shadowbreeds)
                if (!this.Shadowbreeds.ContainsKey(e.Sender.ToLower()))
                {
                    this.Shadowbreeds.Add(e.Sender.ToLower(), ShadowbreedState.Unknown);
                }

            WhoisResult whois = XML.GetWhois(e.Sender, bot.Dimension);

            if (whois == null || !whois.Success)
            {
                return;
            }

            lock (this.Shadowbreeds)
                if (whois.Stats.Level >= 205)
                {
                    this.Shadowbreeds[e.Sender.ToLower()] = ShadowbreedState.Unknown;
                }
                else
                {
                    this.Shadowbreeds[e.Sender.ToLower()] = ShadowbreedState.Unavailable;
                }
        }
예제 #2
0
 public void Events_UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
 {
     if (Flooder.ContainsKey(e.SenderID))
     {
         Flooder.Remove(e.SenderID);
     }
 }
예제 #3
0
 internal void OnUserJoinChannel(BotShell bot, UserJoinChannelArgs e)
 {
     if (this.UserJoinChannelEvent != null)
     {
         try { this.UserJoinChannelEvent(bot, e); }
         catch { }
     }
 }
예제 #4
0
 internal void OnUserJoinChannel(BotShell sender, SlaveArgs slave, UserJoinChannelArgs e)
 {
     if (this.UserJoinChannelEvent != null)
     {
         try { this.UserJoinChannelEvent(sender, slave, e); }
         catch { }
     }
 }
예제 #5
0
파일: irc_Core.cs 프로젝트: deathlef/VhaBot
 private void Events_UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
 {
     if (e.Local)
     {
         if (this.RelayMode == "both" || this.RelayMode == "guest")
         {
             this.SendMessage(this.BOLD + this.BOLD + this.BOLD + "[" + bot.Character + "'s Guest]" + this.BOLD + " " + Format.Whois(e.Sender, bot.Dimension, FormatStyle.Medium) + " has joined the private channel", "irc");
         }
     }
 }
예제 #6
0
 private void Events_UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
 {
     if (this._announce)
     {
         string message;
         if (e.SenderWhois != null)
         {
             message = bot.ColorHeader + Format.Whois(e.SenderWhois, FormatStyle.Medium) + bot.ColorHighlight + " has joined the private channel";
         }
         else
         {
             message = bot.ColorHeader + e.Sender + bot.ColorHighlight + " has joined the private channel";
         }
         this.SendMessage(bot, message);
         this._database.ExecuteNonQuery("INSERT INTO pg VALUES (" + e.SenderID + ")");
     }
 }
예제 #7
0
 private void UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
 {
     if (!e.Local)
     {
         return;
     }
     lock (this._lds)
     {
         if (this._lds.ContainsKey(e.Sender))
         {
             if (this._core.AddRaider(e.Sender, false))
             {
                 bot.SendPrivateChannelMessage(bot.ColorHighlight + HTML.CreateColorString(bot.ColorHeaderHex, e.Sender) + " has rejoined the raid");
                 bot.SendPrivateMessage(e.SenderID, bot.ColorHighlight + "Welcome back. You have automatically rejoined the raid");
                 this._core.Log(e.Sender, null, this.InternalName, "raiders", string.Format("{0} has automatically rejoined the raid (Points: {1})", e.Sender, this._core.GetPoints(e.Sender)));
             }
             this._lds.Remove(e.Sender);
         }
     }
 }
예제 #8
0
 private void Events_UserJoinChannelEvent(BotShell bot, UserJoinChannelArgs e)
 {
     this.Output(e.Channel, String.Format("[{0}] {1} Joined the channel", e.Channel, e.Sender));
 }