All pastes #77923 Raw Edit

hvx

public text v1 · immutable
·published 2006-07-03 15:46 UTC
rendered paste body
#!/usr/bin/perl

Xchat::register("foobar", "0.1","Hello World","");
Xchat::print"» foobar loaded «";
Xchat::hook_command("foo", "foobar");
Xchat::hook_command("foo_help", "foobar_help");
sub foobar {
	my $user = $_[0][1];
	unless($user){
		Xchat::print"» You didn't enter a nickname «";
		return 1;
	}
	my $getinfo = Xchat::user_info("$user");
	my $gethost = $getinfo->{host};
	Xchat::print"$user!$gethost";
}
sub foobar_help {
	Xchat::print <<END;
» /foo » This will print the given user host. Example: /foo <user> «
END
}