god damnit flash
fix your website
This commit is contained in:
parent
e8b72fbdf8
commit
8f5faa7fa9
2 changed files with 12 additions and 7 deletions
|
@ -17,12 +17,17 @@ namespace bot {
|
|||
static int currentMessage;
|
||||
|
||||
public static void reloadContext(FirefoxDriver d) {
|
||||
while(true) {
|
||||
try {
|
||||
List<IWebElement> chatdata = d.FindElement(By.Id("chatList")).FindElements(By.TagName("div")).ToList();
|
||||
messageDivSize = chatdata.Count;
|
||||
foreach(IWebElement we in chatdata) {
|
||||
if(Int32.Parse(we.GetAttribute("id").Substring(11)) > currentMessage)
|
||||
currentMessage = Int32.Parse(we.GetAttribute("id").Substring(11));
|
||||
}
|
||||
break;
|
||||
} catch(Exception shoehorn) {}
|
||||
}
|
||||
if(d.FindElement(By.Id("audioButton")).GetAttribute("class").ToLower() == "button")
|
||||
d.FindElement(By.Id("audioButton")).Click();
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace bot {
|
|||
tmp = new MySqlConnection("SERVER=" + dbinfo[0] + ";DATABASE=" + dbinfo[3] + ";UID=" + dbinfo[1] + ";PASSWORD=" + dbinfo[2] + ";");
|
||||
tmp.Open();
|
||||
} catch(Exception e) {
|
||||
criticalError("Could not open database connection!");
|
||||
criticalError("Could not open database connection! "+ e.Message);
|
||||
return null;
|
||||
}
|
||||
return tmp;
|
||||
|
|
Loading…
Reference in a new issue