]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Client_HostnameCloaked() -> Client_HostnameDisplayed()
authorAlexander Barton <alex@barton.de>
Sat, 24 Nov 2012 12:37:56 +0000 (13:37 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 24 Nov 2012 12:37:56 +0000 (13:37 +0100)
src/ngircd/client.c
src/ngircd/client.h
src/ngircd/irc-info.c
src/ngircd/irc-mode.c
src/ngircd/irc.c

index 2f8d771cc2ff81253cf62925757d7645ce39d539..54c01291cba646adc99e2499b59f8ac6be565ed1 100644 (file)
@@ -686,7 +686,7 @@ Client_Hostname(CLIENT *Client)
 
 
 /**
- * Get potentially cloaked hostname of a client.
+ * Get (potentially cloaked) hostname of a client to display it to other users.
  *
  * If the client has not enabled cloaking, the real hostname is used.
  * Please note that this function uses a global static buffer, so you can't
@@ -696,7 +696,7 @@ Client_Hostname(CLIENT *Client)
  * @return Pointer to client hostname
  */
 GLOBAL char *
-Client_HostnameCloaked(CLIENT *Client)
+Client_HostnameDisplayed(CLIENT *Client)
 {
        static char Cloak_Buffer[CLIENT_HOST_LEN];
 
@@ -837,7 +837,7 @@ Client_MaskCloaked(CLIENT *Client)
                return Client_Mask(Client);
 
        snprintf(Mask_Buffer, GETID_LEN, "%s!%s@%s", Client->id, Client->user,
-                Client_HostnameCloaked(Client));
+                Client_HostnameDisplayed(Client));
 
        return Mask_Buffer;
 } /* Client_MaskCloaked */
@@ -1346,7 +1346,7 @@ Client_RegisterWhowas( CLIENT *Client )
                 sizeof( My_Whowas[slot].id ));
        strlcpy( My_Whowas[slot].user, Client_User( Client ),
                 sizeof( My_Whowas[slot].user ));
-       strlcpy( My_Whowas[slot].host, Client_HostnameCloaked( Client ),
+       strlcpy( My_Whowas[slot].host, Client_HostnameDisplayed( Client ),
                 sizeof( My_Whowas[slot].host ));
        strlcpy( My_Whowas[slot].info, Client_Info( Client ),
                 sizeof( My_Whowas[slot].info ));
index 7a383af8696b7b685dc408b63cce5c02d99f7f6f..82b69019e2d071ad0a29fa0564b2d7e6f78d879e 100644 (file)
@@ -107,7 +107,7 @@ GLOBAL char *Client_User PARAMS(( CLIENT *Client ));
 GLOBAL char *Client_OrigUser PARAMS(( CLIENT *Client ));
 #endif
 GLOBAL char *Client_Hostname PARAMS(( CLIENT *Client ));
-GLOBAL char *Client_HostnameCloaked PARAMS(( CLIENT *Client ));
+GLOBAL char *Client_HostnameDisplayed PARAMS(( CLIENT *Client ));
 GLOBAL char *Client_Modes PARAMS(( CLIENT *Client ));
 GLOBAL char *Client_Flags PARAMS(( CLIENT *Client ));
 GLOBAL CLIENT *Client_Introducer PARAMS(( CLIENT *Client ));
index 40d4635494a80f74d97737844a633ea651c87edf..57d6e1a2e327afbe5261d180bda6caac727d4e9a 100644 (file)
@@ -727,7 +727,7 @@ IRC_USERHOST(CLIENT *Client, REQUEST *Req)
                                strlcat(rpl, "+", sizeof(rpl));
                        strlcat(rpl, Client_User(c), sizeof(rpl));
                        strlcat(rpl, "@", sizeof(rpl));
-                       strlcat(rpl, Client_HostnameCloaked(c), sizeof(rpl));
+                       strlcat(rpl, Client_HostnameDisplayed(c), sizeof(rpl));
                        strlcat(rpl, " ", sizeof(rpl));
                }
        }
@@ -792,7 +792,7 @@ write_whoreply(CLIENT *Client, CLIENT *c, const char *channelname, const char *f
 {
        return IRC_WriteStrClient(Client, RPL_WHOREPLY_MSG, Client_ID(Client),
                                  channelname, Client_User(c),
-                                 Client_HostnameCloaked(c),
+                                 Client_HostnameDisplayed(c),
                                  Client_ID(Client_Introducer(c)), Client_ID(c),
                                  flags, Client_Hops(c), Client_Info(c));
 }
@@ -1080,7 +1080,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
        /* Nick, user, hostname and client info */
        if (!IRC_WriteStrClient(from, RPL_WHOISUSER_MSG, Client_ID(from),
                                Client_ID(c), Client_User(c),
-                               Client_HostnameCloaked(c), Client_Info(c)))
+                               Client_HostnameDisplayed(c), Client_Info(c)))
                return DISCONNECTED;
 
        /* Server */
index 1cf19afc2bf437f19a2887509e12851c932a7951..907c929766f9355b8d201a7fee3eaac218fd574e 100644 (file)
@@ -393,12 +393,12 @@ Announce_Client_Hostname(CLIENT *Origin, CLIENT *Client)
 
        /* Inform the client itself */
        IRC_WriteStrClient(Client, RPL_HOSTHIDDEN_MSG, Client_ID(Client),
-                          Client_HostnameCloaked(Client));
+                          Client_HostnameDisplayed(Client));
 
        /* Inform other servers in the network */
        IRC_WriteStrServersPrefixFlag(Origin, Client_ThisServer(), 'M',
                                      "METADATA %s host :%s", Client_ID(Client),
-                                     Client_HostnameCloaked(Client));
+                                     Client_HostnameDisplayed(Client));
 }
 
 
index 9d9d3f026fcedfaf47b6475727e376acb768721e..63c4813a361e6b464f6b3ae7699c7af70170403f 100644 (file)
@@ -457,7 +457,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                                if (nick != NULL && host != NULL) {
                                        if (strcasecmp(nick, Client_ID(cl)) == 0 &&
                                            strcasecmp(user, Client_User(cl)) == 0 &&
-                                           strcasecmp(host, Client_HostnameCloaked(cl)) == 0)
+                                           strcasecmp(host, Client_HostnameDisplayed(cl)) == 0)
                                                break;
                                        else
                                                continue;
@@ -465,7 +465,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                                if (strcasecmp(user, Client_User(cl)) != 0)
                                        continue;
                                if (host != NULL && strcasecmp(host,
-                                               Client_HostnameCloaked(cl)) != 0)
+                                               Client_HostnameDisplayed(cl)) != 0)
                                        continue;
                                if (server != NULL && strcasecmp(server,
                                                Client_ID(Client_Introducer(cl))) != 0)