diff --git a/lib/commands/list.pm b/lib/commands/list.pm index 0cdb378c80388610a117ed14d4fe8634466cbe31..9d6a62db83b01e9da0db07172c58f012bcafe74c 100644 --- a/lib/commands/list.pm +++ b/lib/commands/list.pm @@ -13,14 +13,14 @@ sub exec { my $sth; if ($chan->[0] =~ /^#/) { - $sth = $dbh->prepare_cached('SELECT id, title, date, place, description + $sth = $dbh->prepare_cached('SELECT id, title, date, place, description, link FROM sam WHERE date > ? ORDER BY date LIMIT 2' ); } else { - $sth = $dbh->prepare_cached('SELECT id, title, date, place, description + $sth = $dbh->prepare_cached('SELECT id, title, date, place, description, link FROM sam WHERE date > ? ORDER BY date' @@ -49,6 +49,7 @@ sub exec { $msg = "[".$row->[0]."] ".$row->[1]." le $day/$month/$year"; $msg .= " @ ".$row->[3] if ($row->[3]); $msg .= " : ".$row->[4] if ($row->[4]); + $msg .= " <".$row->[5].">" if ($row->[5]); $irc->yield(privmsg => $chan => $msg); } diff --git a/lib/commands/parser.pm b/lib/commands/parser.pm index f01f6553de98912876163d1b2a1a759c45405839..2bb513d5c7ecdfe2932a78d21584b81c8e37b384 100644 --- a/lib/commands/parser.pm +++ b/lib/commands/parser.pm @@ -93,7 +93,7 @@ sub exec { $irc->yield(privmsg => $nick => " - le lieu et / ou la description peuvent être omis"); $irc->yield(privmsg => $nick => " - pensez à vérifier au préalable que la soirée n'a pas déjà été ajoutée"); $irc->yield(privmsg => $nick => " - « liste » en query retourne toutes les prochaines soirées"); - $irc->yield(privmsg => $nick => " - tu as perdu") if (int(rand(10)) == 5); + $irc->yield(privmsg => $nick => " - tu as perdu") if (int(rand(4)) == 2); $irc->yield(privmsg => $nick => "------------------"); $irc->yield(privmsg => $nick => "http://nightiies.iiens.net/sam/ (si t'es motivé pour dev un vrai site, /query moise)"); $irc->yield(privmsg => $nick => "Calendrier ICS : http://nigthiies.iiens.net/sam/events.php (ajoute « ?nick=$nick » à la fin de l'URL pour n'avoir que les soirées où tu te rends)");