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

!fav now uses utils::id (and gets the power!)

parent 6cbe776a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -43,10 +43,14 @@ sub exec { ...@@ -43,10 +43,14 @@ sub exec {
my ($kernel, $user, $chan, $msg) = @_; my ($kernel, $user, $chan, $msg) = @_;
my ($nick, $mask) = split(/!/,$user); my ($nick, $mask) = split(/!/,$user);
if ($msg =~ /^ *!fav(?: ([0-9]+))?/) { if ($msg =~ /^ *!fav(?: (\S+))?/) {
my $id = ($1) ? $1 : $lastID->{$chan->[0]}; my $index = $1;
try {
my $id = utils::id::get($chan->[0], $index);
commands::fav::exec($nick, $id) commands::fav::exec($nick, $id)
} catch {
$irc->yield(privmsg => $chan->[0] => $insultes[rand @insultes]);
}
} }
elsif ($msg =~ /^ *!later(?: (-?[0-9]+))?(?: in ([0-9]*)?(h|m|s)?)?/) { elsif ($msg =~ /^ *!later(?: (-?[0-9]+))?(?: in ([0-9]*)?(h|m|s)?)?/) {
my $index = $1; my $index = $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