Skip to content
Extraits de code Groupes Projets
Valider e50eb6a4 rédigé par Alexandre Morignot's avatar Alexandre Morignot
Parcourir les fichiers

Fix !later -X

parent 616fe2c0
Branches
Étiquettes
Aucune requête de fusion associée trouvée
......@@ -13,18 +13,22 @@ sub exec {
$time = 6 if (!$time);
$time *= ($unit eq 's') ? 1 : ($unit eq 'm') ? 60 : 3600;
while ($offset <= 0) {
while ($offset < 0) {
my $sth = $dbh->prepare_cached('
SELECT content
FROM playbot_chan
WHERE date < (SELECT date
FROM playbot_chan
WHERE content = ?
AND chan = ?)
AND chan = ?
ORDER BY date DESC
LIMIT 1)
AND chan = (SELECT chan
FROM playbot_chan
WHERE content = ?
AND chan = ?)
AND chan = ?
ORDER BY date DESC
LIMIT 1)
ORDER BY date DESC
LIMIT 1');
unless (defined $sth) {
......
......@@ -48,7 +48,7 @@ sub exec {
}
elsif ($msg =~ /^ *!later(?: (-?[0-9]+))?(?: in ([0-9]*)?(h|m|s)?)?/) {
my $id = $1;
my $offset = $1;
my $offset = ($1) ? $1 : 0;
my ($time, $unit) = ($2, $3);
if ($id eq '' || $id =~ /^-/) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter