Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    rcab045b r9c7a701  
    6969}
    7070
    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
     79sub OwlProcess {
    7280    return unless defined $irc;
    7381    eval {
     
    7684    return;
    7785}
     86
    7887
    7988sub register_handlers {
     
    109118$BarnOwl::Hooks::startup->add(\&startup);
    110119$BarnOwl::Hooks::shutdown->add(\&shutdown);
    111 $BarnOwl::Hooks::mainLoop->add(\&mainloop_hook);
     120#$BarnOwl::Hooks::mainLoop->add(\&mainloop_hook);
    112121
    113122################################################################################
     
    165174        BarnOwl::admin_message("IRC", "Connected to $alias as $nick");
    166175        $ircnets{$alias} = $conn;
     176        my $fd = $conn->getSocket()->fileno();
     177        BarnOwl::add_dispatch($fd, \&OwlProcess);
     178        $conn->{FD} = $fd;
    167179    } else {
    168180        die("IRC::Connection->connect failed: $!");
Note: See TracChangeset for help on using the changeset viewer.