write_debug(undef, "found $g->{'TYPE'} $g->{'NAME'}");
if ($type eq $g->{'TYPE'}) {
push(@g, $g);
+ $g->setio(sub {Irssi::print(shift)});
} else {
write_irssi(undef, '%s has wrong type (got %s, expected %s)', $p, $g->{'TYPE'}, $type);
delete($INC{$p});