Ejemplo n.º 1
0
        public bool KillSession(BotClass bot)
        {
            var username = bot.Demonbuddy.BuddyAuthUsername;
            var password = bot.Demonbuddy.BuddyAuthPassword;

            // if username and password are empty stop here!
            if (username.Length <= 0 && password.Length <= 0) return false;

            var client = _buddyAuthWebClients.FirstOrDefault(c => c.Username.Equals(username) && c.Password.Equals(password));
            if (client == null)
            {
                client = new BuddyAuthWebClient(username,password);
                _buddyAuthWebClients.Add(client);
            }
            client.KillSession(bot);
            return false;
        }
Ejemplo n.º 2
0
        public bool KillSession(BotClass bot)
        {
            var username = bot.Demonbuddy.BuddyAuthUsername;
            var password = bot.Demonbuddy.BuddyAuthPassword;

            // if username and password are empty stop here!
            if (username.Length <= 0 && password.Length <= 0)
            {
                return(false);
            }

            var client = _buddyAuthWebClients.FirstOrDefault(c => c.Username.Equals(username) && c.Password.Equals(password));

            if (client == null)
            {
                client = new BuddyAuthWebClient(username, password);
                _buddyAuthWebClients.Add(client);
            }
            client.KillSession(bot);
            return(false);
        }