205a206,229 > if ($s =~ /^\!quote/) > { > if (my($quote, $auteur, $url, $source)=($s =~ /^\!quote\s+"(.+)"\s+(.+)\s+(https?\:\/\/[\S]+)\s+(.+)/)) > { > #$conn->privmsg($channel, "quote: $quote"); > #$conn->privmsg($channel, "auteur: $auteur"); > #$conn->privmsg($channel, "url: $url"); > #$conn->privmsg($channel, "source: $source"); > my $sql='INSERT INTO Quote > (User_Quote, Quote_Quote, Auteur_Quote, URL_Quote, Source_Quote, Date_Quote, Note_Quote) > VALUES > ( ?, ?, ?, ?, ?, NOW(), ?)'; > my $dbh = DBI->connect($dsn, $db_user_name, $db_password); > my $sth = $dbh->prepare($sql); > die "Fatal: cannot RECONNECT !\n" unless > ($sth->execute($who, $quote, $auteur, $url, $source,1)); > $sth->finish(); > $conn->privmsg($channel, "C'est dans la boite !"); > } > else > { > $conn->privmsg($channel, "Pour ajoutter une citation tapez : !quote \"la citation\" l'auteur http://url la source"); > } > } # a-t-on "!quote" dans le message