my $info = Xchat::user_info($nick); if( not defined $info or ref $info ne 'HASH' or not exists $info->{host}) { Xchat::print("$PREFIX Can't find " . $nick . "'s user info!"); return Xchat::EAT_ALL; } my ($user, $host) = split("\@", $info->{host});