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

Testing if the message is a command before searching url

parent 9d7bb31f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -266,6 +266,7 @@ sub on_speak ...@@ -266,6 +266,7 @@ sub on_speak
my ($nick,$mask) = split(/!/,$user); my ($nick,$mask) = split(/!/,$user);
my %content; my %content;
if (!commands::parser::exec(@args)) {
%content = sites::parser::parse($msg); %content = sites::parser::parse($msg);
if ($@) { if ($@) {
...@@ -319,8 +320,6 @@ sub on_speak ...@@ -319,8 +320,6 @@ sub on_speak
$irc->yield(privmsg => $chan => '['.$id.'] '.$content{'title'}) ; $irc->yield(privmsg => $chan => '['.$id.'] '.$content{'title'}) ;
} }
} }
else {
commands::parser::exec(@args);
} }
} }
......
...@@ -53,6 +53,11 @@ sub exec { ...@@ -53,6 +53,11 @@ sub exec {
$irc->yield(privmsg => $chan => '!later [<id>] [in <x>[s|m|h]] : vidéo rappelée par query (par défaut temps de 6h)'); $irc->yield(privmsg => $chan => '!later [<id>] [in <x>[s|m|h]] : vidéo rappelée par query (par défaut temps de 6h)');
$irc->yield(privmsg => $chan => 'Sans id précisée, la dernière vidéo postée est utilisée.'); $irc->yield(privmsg => $chan => 'Sans id précisée, la dernière vidéo postée est utilisée.');
} }
else {
return 0;
}
return 1;
} }
1; 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