Permalink
Browse files

doc fix, better error handling, --help option

  • Loading branch information...
1 parent 9b854a9 commit f0ddf211e3288381a25acf9c4761cb1d1572c049 @tokuhirom committed Oct 4, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 bin/ikachan
View
@@ -9,6 +9,7 @@ use lib File::Spec->catdir(dirname(__FILE__), '..', 'lib');
use AnySan;
use AnySan::Provider::IRC;
use Getopt::Long ();
+use Pod::Usage;
use Plack::Builder;
use Plack::Request;
use Plack::Response;
@@ -32,6 +33,8 @@ $parser->getoptions(
'h|help' => \$options{help},
'v|version' => \$options{version},
);
+pod2usage(1) if $options{help};
+die "Missing mandatory parameter: irc_server" unless defined $irc_server;
warn 'connecting to ' . join ' ', ($irc_server, $irc_port, ($irc_keyword || ''), $irc_nickname);
@@ -225,7 +228,7 @@ The port number a TCP based server daemon listens on. Defaults to
5000. This option doesn't mean anything if the server does not support
TCP socket.
-=item -Server, --Server
+=item -S, --Server
irc server address.

0 comments on commit f0ddf21

Please sign in to comment.