Changeset 9c7a701 for perl/modules/IRC/lib/BarnOwl/Module
- Timestamp:
- Feb 15, 2008, 12:56:49 AM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 18a54ee
- Parents:
- a6a4155
- Location:
- perl/modules/IRC/lib/BarnOwl/Module
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
rcab045b r9c7a701 69 69 } 70 70 71 sub mainloop_hook { 71 #sub mainloop_hook { 72 # return unless defined $irc; 73 # eval { 74 # $irc->do_one_loop(); 75 # }; 76 # return; 77 #} 78 79 sub OwlProcess { 72 80 return unless defined $irc; 73 81 eval { … … 76 84 return; 77 85 } 86 78 87 79 88 sub register_handlers { … … 109 118 $BarnOwl::Hooks::startup->add(\&startup); 110 119 $BarnOwl::Hooks::shutdown->add(\&shutdown); 111 $BarnOwl::Hooks::mainLoop->add(\&mainloop_hook);120 #$BarnOwl::Hooks::mainLoop->add(\&mainloop_hook); 112 121 113 122 ################################################################################ … … 165 174 BarnOwl::admin_message("IRC", "Connected to $alias as $nick"); 166 175 $ircnets{$alias} = $conn; 176 my $fd = $conn->getSocket()->fileno(); 177 BarnOwl::add_dispatch($fd, \&OwlProcess); 178 $conn->{FD} = $fd; 167 179 } else { 168 180 die("IRC::Connection->connect failed: $!"); -
perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm
r5ff830a r9c7a701 69 69 } 70 70 71 sub getSocket 72 { 73 my $self = shift; 74 return $self->conn->socket; 75 } 76 71 77 ################################################################################ 72 78 ############################### IRC callbacks ################################## … … 168 174 my $self = shift; 169 175 delete $BarnOwl::Module::IRC::ircnets{$self->alias}; 170 176 BarnOwl::remove_dispatch($self->{FD}); 171 177 BarnOwl::admin_message('IRC', 172 178 "[" . $self->alias . "] Disconnected from server");
Note: See TracChangeset
for help on using the changeset viewer.