use strict;
use warnings;
use Xchat qw(:all);

my $window_name = "-WALLOPS-";

register( "Wallops Window", "1.1", "Move wallops to a separate window" );

hook_print( "Receive Wallops", sub {
	unless( find_context $window_name, get_info "server" ) {
		commandf 'QUERY -nofocus "%s"', $window_name;
	}

	set_context $window_name;
	emit_print "Receive Wallops", @{$_[0]};
	return EAT_ALL
});
