- $hook = Xchat::hook_fd($sock, \&_whois_recv, { flags => FD_READ, data => [ $callback, $args ] } );
- return $hook;
+
+ return called_from_script {
+ Xchat::hook_fd($sock, \&_whois_recv, {
+ flags => FD_READ,
+ data => [ $callback, $args ],
+ });
+ }