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

Fix crash on !get if the video doesn't have tags

parent c7b1f4ec
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -57,8 +57,15 @@ sub exec { ...@@ -57,8 +57,15 @@ sub exec {
group by id"); group by id");
$sth->execute($content->[0]); $sth->execute($content->[0]);
my $tags = $sth->fetch->[0]; my $tags = $sth->fetch;
if ($tags) {
$tags = $tags->[0];
$tags =~ s/([a-zA-Z0-9_-]+)/#$1/g; $tags =~ s/([a-zA-Z0-9_-]+)/#$1/g;
}
else {
$tags = "";
}
if ($content->[1]) { if ($content->[1]) {
$irc->yield(privmsg => $chan => '['.$content->[0].'] '.$content->[2].' | '.$content->[1].' => '.$content->[3].' '.$tags) ; $irc->yield(privmsg => $chan => '['.$content->[0].'] '.$content->[2].' | '.$content->[1].' => '.$content->[3].' '.$tags) ;
......
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