28 |
verbose => \$VERBOSE, |
verbose => \$VERBOSE, |
29 |
) or die; |
) or die; |
30 |
|
|
31 |
|
sub eprint (@); |
32 |
sub dprint (@); |
sub dprint (@); |
33 |
sub vprint (@); |
sub vprint (@); |
34 |
binmode STDOUT; |
binmode STDOUT; |
53 |
} |
} |
54 |
|
|
55 |
for (@module) { |
for (@module) { |
56 |
dprint $_; |
vprint $_; |
57 |
my $module = "Suikawari::$_"; |
my $module = "Suikawari::$_"; |
58 |
load_module ($_); |
load_module ($_); |
59 |
my $b = new Bunshin; |
my $b = new Bunshin; |
99 |
dprint "Posting Message..."; |
dprint "Posting Message..."; |
100 |
my @m = map {$_."\n"} split /\x0D\x0A/, $msg; |
my @m = map {$_."\n"} split /\x0D\x0A/, $msg; |
101 |
my $r = $nntp->post (@m); |
my $r = $nntp->post (@m); |
102 |
vprint ${*$nntp}{'net_cmd_code'}, @{${*$nntp}{'net_cmd_resp'}}; |
if ($r) { |
103 |
unless ($r) { |
vprint ${*$nntp}{'net_cmd_code'}, @{${*$nntp}{'net_cmd_resp'}}; |
104 |
|
} else { |
105 |
|
eprint ${*$nntp}{'net_cmd_code'}, @{${*$nntp}{'net_cmd_resp'}}; |
106 |
#close_nntp ($nntp); |
#close_nntp ($nntp); |
107 |
#die; |
#die; |
108 |
vprint "send_msg: Can't post the message. Skiped"; |
eprint "send_msg: Can't post the message. Skiped"; |
109 |
} |
} |
110 |
} |
} |
111 |
|
|
137 |
} |
} |
138 |
} |
} |
139 |
|
|
140 |
|
sub eprint (@) { |
141 |
|
print shift, ' ' if @_ > 1; |
142 |
|
print map {/\n$/s? $_: $_."\n"} @_; |
143 |
|
} |
144 |
|
|
145 |
sub dprint (@) { |
sub dprint (@) { |
146 |
print shift, ' ' if $Bunshin::DEBUG && @_ > 1; |
print shift, ' ' if $Bunshin::DEBUG && @_ > 1; |
147 |
print map {/\n$/s? $_: $_."\n"} @_ if $Bunshin::DEBUG; |
print map {/\n$/s? $_: $_."\n"} @_ if $Bunshin::DEBUG; |