Possible bug in reputation module

Interested in helping with the development of Budabot? Post your interest here.
DrUrban
Member
Posts: 30
Joined: Sun Dec 16, 2012 2:29 pm
antispam: Rimor

Possible bug in reputation module

Postby DrUrban » Sat Jan 12, 2013 3:30 pm

My private bot didnt let me add reputation, even it was more than few days from last time i sued that command. After changing 2 lines, seems to work ok.

Around line 108:

$sql = "SELECT name FROM reputation WHERE `by_charid` = ?";
$data = $this->db->query($sql, $by_charid);
if (count($data) > 3) {
$sendto->reply("You may submit reputation a maximum of 3 times in a 24 hour period.");
return;
}


Should it be?


$sql = "SELECT name FROM reputation WHERE `by_charid` = ? AND `dt` > ?";
$data = $this->db->query($sql, $by_charid, $time);
if (count($data) > 3) {
$sendto->reply("You may submit reputation a maximum of 3 times in a 24 hour period.");
return;
}
Tyrence
The Team
Posts: 1876
Joined: Sat Jan 09, 2010 1:32 am

Re: Possible bug in reputation module

Postby Tyrence » Sun Jan 13, 2013 1:04 am

Yes, I think you are right. I will make that change. Thanks!
"Those who expect to reap the blessings of freedom, must, like men, undergo the fatigues of supporting it." — Thomas Paine
"Nearly all men stand adversity, but if you want to test a man's character, give him power." — Abraham Lincoln
Budabot Releases and Downloads: https://github.com/Budabot/Budabot/releases

Return to “Budabot Team”

Who is online

Users browsing this forum: Google [Bot] and 1 guest