|
@@ -1,17 +1,23 @@
|
|
|
#!/usr/bin/perl
|
|
|
+# git clone http://repo.ldn-fai.net/repo/si-public.git
|
|
|
|
|
|
package Bot;
|
|
|
use base qw(Bot::BasicBot);
|
|
|
use warnings;
|
|
|
use strict;
|
|
|
|
|
|
-if(! -w $ARGV[0]) {
|
|
|
- print "ERREUR: $ARGV[0] est inexistant ou non-inscriptible.\n";
|
|
|
+if(@ARGV && ! -w "$ARGV[0]" || !@ARGV) {
|
|
|
+ if(@ARGV) {
|
|
|
+ print "ERREUR: $ARGV[0] est inexistant ou non-inscriptible.\n";
|
|
|
+ } else {
|
|
|
+ print "USAGE: ./$0 fichier-a-ecrire\n";
|
|
|
+ }
|
|
|
+
|
|
|
exit 1;
|
|
|
}
|
|
|
|
|
|
my $nick = "accbot";
|
|
|
-my $chan = "#fdnbottest";
|
|
|
+my $chan = "#fdnbotteste";
|
|
|
my $url = "http://fdn.ldn-fai.net";
|
|
|
my $file = $ARGV[0];
|
|
|
my $flag = "[ACC]";
|