/[meteor]/googlecode.com/svn/trunk/Meteor/Controller.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /googlecode.com/svn/trunk/Meteor/Controller.pm

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

revision 25 by knops.gerd, Sun May 20 19:40:53 2007 UTC revision 46 by knops.gerd, Mon Feb 4 19:24:25 2008 UTC
# Line 90  sub processLine { Line 90  sub processLine {
90                                    
91                  my $channelName=$1;                  my $channelName=$1;
92                  my $channel=Meteor::Channel->channelWithName($channelName);                  my $channel=Meteor::Channel->channelWithName($channelName);
93                  $channel->addMessage($line);                  my $msg=$channel->addMessage($line);
94                  $self->write("OK$::CRLF");                  my $msgID=$msg->id();
95                    $self->write("OK\t$msgID$::CRLF");
96          }          }
97          elsif($cmd eq 'COUNTSUBSCRIBERS')          elsif($cmd eq 'COUNTSUBSCRIBERS')
98          {          {
# Line 126  sub processLine { Line 127  sub processLine {
127          {          {
128                  # uptime                  # uptime
129                  my $uptime=time-$::STARTUP_TIME;                  my $uptime=time-$::STARTUP_TIME;
130                  my $txt="uptime: $uptime$::CRLF";                  my $txt="OK$::CRLF"."uptime: $uptime$::CRLF";
131                                    
132                  # channel_count                  # channel_count
133                  my $numChannels=Meteor::Channel->numChannels();                  my $numChannels=Meteor::Channel->numChannels();
# Line 137  sub processLine { Line 138  sub processLine {
138                          $txt.=$key.': '.$::Statistics->{$key}.$::CRLF;                          $txt.=$key.': '.$::Statistics->{$key}.$::CRLF;
139                  }                  }
140                                    
141                    $txt.="--EOT--$::CRLF";
142                    
143                  $self->write($txt);                  $self->write($txt);
144          }          }
145          elsif($cmd eq 'QUIT')          elsif($cmd eq 'QUIT')
# Line 171  sub close { Line 174  sub close {
174                  }                  }
175          }          }
176                    
         $::Statistics->{'current_controllers'}--;  
           
177          $self->SUPER::close();          $self->SUPER::close();
178  }  }
179    
180    sub didClose {
181            
182            $::Statistics->{'current_controllers'}--;
183    }
184    
185  1;  1;
186  ############################################################################EOF  ############################################################################EOF

Legend:
Removed from v.25  
changed lines
  Added in v.46

  ViewVC Help
Powered by ViewVC 1.1.26