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; }
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); }