projects
/
app-devbot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
untaint --server and --port
[app-devbot.git]
/
lib
/
App
/
Devbot.pm
diff --git
a/lib/App/Devbot.pm
b/lib/App/Devbot.pm
index 1e0f5c8ff1d54a3db96c67fab02708e05639cb10..d7cd700b47482b3ff191e5b1ec4308356343b9ee 100644
(file)
--- a/
lib/App/Devbot.pm
+++ b/
lib/App/Devbot.pm
@@
-15,11
+15,10
@@
use IRC::Utils qw/parse_user/;
use Getopt::Long;
use POSIX qw/strftime/;
use Getopt::Long;
use POSIX qw/strftime/;
+use Regexp::Common qw /net/;
##################################################
##################################################
-our $VERSION;
-
my $nick='devbot';
my $password;
my $server='irc.oftc.net';
my $nick='devbot';
my $password;
my $server='irc.oftc.net';
@@
-73,7
+72,14
@@
sub bot_start{
Retry_when_banned => 60,
));
Retry_when_banned => 60,
));
- $irc->yield(register => "all");
+ if ($server =~ /^($RE{net}{domain})$/) {
+ $server = $1;
+ }
+ if ($port =~ /^([0-9]+)$/) {
+ $port = $1;
+ }
+
+ $irc->yield(register => "all");
$irc->yield(
connect => {
Nick => $nick,
$irc->yield(
connect => {
Nick => $nick,
This page took
0.009202 seconds
and
4
git commands to generate.