]> jfr.im git - solanum.git/commitdiff
Clarify messages when auspex users have hidden their own idle times
authorStephen Bennett <redacted>
Sat, 1 Jul 2023 18:28:01 +0000 (19:28 +0100)
committerStephen Bennett <redacted>
Sat, 1 Jul 2023 21:39:11 +0000 (22:39 +0100)
Co-authored-by: Doug Freed <redacted>
modules/m_whois.c

index d82f65fa14aff155bd1df97fe6482fc01c75bbed..117acadb971557ea7931249c7871edff191924e6 100644 (file)
@@ -389,20 +389,18 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
                           hdata_showidle.approved != WHOIS_IDLE_HIDE ? (long)(rb_current_time() - target_p->localClient->last) : 0,
                           (unsigned long)target_p->localClient->firsttime);
 
-               if (hdata_showidle.approved == WHOIS_IDLE_SHOW)
-                       ;
-               else if (target_p->umodes & user_modes['I'])
+               if (hdata_showidle.approved != WHOIS_IDLE_SHOW)
                {
-                       if (hdata_showidle.approved == WHOIS_IDLE_HIDE)
-                               /* if the target has hidden their idle time, notify the source */
-                               sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time");
-                       else
-                               /* if the target has hidden their idle time, notify the source */
-                               sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time, but you have auspex");
-               }
-               else
-               {
-                       if (hdata_showidle.approved == WHOIS_IDLE_HIDE)
+                       if (target_p->umodes & user_modes['I'])
+                       {
+                               if (hdata_showidle.approved == WHOIS_IDLE_HIDE)
+                                       /* if the target has hidden their idle time, notify the source */
+                                       sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time");
+                               else
+                                       /* if the target has hidden their idle time, notify the source */
+                                       sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "is hiding their idle time, but you have auspex");
+                       }
+                       else if (hdata_showidle.approved == WHOIS_IDLE_HIDE)
                                /* if the source has hidden their idle time, notify the source that they can't view others' idle times either */
                                sendto_one_numeric(source_p, RPL_WHOISTEXT, form_str(RPL_WHOISTEXT), target_p->name, "has a hidden idle time because your own idle time is hidden");
                        else