/[suikacvs]/messaging/suikawari/wari.pl
Suika

Diff of /messaging/suikawari/wari.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Thu Jun 20 11:39:46 2002 UTC revision 1.4 by wakaba, Tue Jun 25 09:35:34 2002 UTC
# Line 28  GetOptions ( Line 28  GetOptions (
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;
# Line 52  close LOG; Line 53  close LOG;
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;
# Line 98  sub send_msg ($$) { Line 99  sub send_msg ($$) {
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    
# Line 134  sub load_module ($) { Line 137  sub load_module ($) {
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;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24