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

Fixes #27: no more #t tag with #t=42m51s in youtube url

parent 97544459
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -134,10 +134,10 @@ sub exec { ...@@ -134,10 +134,10 @@ sub exec {
sub tag { sub tag {
my ($msg, $chan) = @_; my ($msg, $chan) = @_;
my @tags = ($msg =~ /#([a-zA-Z0-9_-]+)/g); my @tags = ($msg =~ /(?:^| )#([a-zA-Z0-9_]+)/g);
my $id = utils::id::get($chan); my $id = utils::id::get($chan);
commands::tag::exec($id, "@tags"); commands::tag::exec($id, $msg);
} }
1; 1;
...@@ -6,7 +6,7 @@ our $log; ...@@ -6,7 +6,7 @@ our $log;
sub exec { sub exec {
my ($id, $msg) = @_; my ($id, $msg) = @_;
while ($msg =~ /#?([a-zA-Z0-9_]+)/g) { while ($msg =~ /(?:^| )#?([a-zA-Z0-9_]+)/g) {
addTag($id, $1); addTag($id, $1);
} }
} }
......
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