- append_format(str, sizeof str, &pos, " %d", (int)(MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0));
+ {
+ /* fire the doing_who_show_idle hook to allow modules to tell us whether to show the idle time */
+ hook_data_client_approval hdata_showidle;
+
+ hdata_showidle.client = source_p;
+ hdata_showidle.target = target_p;
+ hdata_showidle.approved = WHOIS_IDLE_SHOW;
+
+ call_hook(doing_who_show_idle_hook, &hdata_showidle);
+
+ append_format(str, sizeof str, &pos, " %d",
+ hdata_showidle.approved ? (int)(MyClient(target_p) ? rb_current_time() - target_p->localClient->last : 0) : 0);
+ }