mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Show usage if no code given
This commit is contained in:
parent
c4c325085a
commit
0afaf9eb1b
@ -33,6 +33,11 @@ my $nick = shift @ARGV // (print "Missing nick argument.\n" and die);
|
||||
my $channel = shift @ARGV // (print "Missing channel argument.\n" and die);
|
||||
my $code = join(' ', @ARGV);
|
||||
|
||||
if (not length $code) {
|
||||
print "$nick: Usage: cc [-paste] [-nomain] [-lang=<language>] [-info] [language options] <code> [-input=<stdin input>]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
my $lang = $language->new(nick => $nick, channel => $channel, lang => $language, code => $code);
|
||||
|
||||
$lang->process_interactive_edit;
|
||||
|
Loading…
Reference in New Issue
Block a user