sub delaycommand { my $context = Xchat::get_context; my $command = $_[0]; Xchat::hook_timer( 0, sub { Xchat::set_context($context); Xchat::command($command); return Xchat::REMOVE; } ); return Xchat::EAT_NONE; }