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

nouvelle fonction addTag

parent f3447838
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -97,6 +97,18 @@ sub flux ...@@ -97,6 +97,18 @@ sub flux
} }
sub addTag
{
my ($id, $tag) = @_;
my $sth = $dbh->prepare_cached('INSERT INTO playbot_tags (id, tag) VALUES (?, ?)');
$log->error("Couldn't prepare querie; aborting") unless (defined $sth);
$sth->execute($id, $tag)
or $log->error("Couldn't finish transaction: " . $dbh->errstr);
}
sub later sub later
{ {
my ($nick, $id) = @_[ARG0,ARG1]; my ($nick, $id) = @_[ARG0,ARG1];
...@@ -328,11 +340,7 @@ sub on_speak ...@@ -328,11 +340,7 @@ sub on_speak
next; next;
} }
my $sth = $dbh->prepare_cached('INSERT INTO playbot_tags (id, tag) VALUES (?, ?)'); addTag ($lastID, $1);
$log->error("Couldn't prepare querie; aborting") unless (defined $sth);
$sth->execute($id, $1)
or $log->error("Couldn't finish transaction: " . $dbh->errstr);
} }
......
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