diff options
| author | Alexander Barton <alex@barton.de> | 2010-08-17 21:14:51 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2010-08-17 21:14:51 +0200 |
| commit | 31ea0f8ee963087728558e55298ff519c956d4f3 (patch) | |
| tree | 5237e11298c91bf7c7a3f14658bd2a670cd6bd00 | |
| parent | fd4dfccc30fdbb61120e3c51f4b987cc725b603d (diff) | |
| download | ngircd-31ea0f8ee963087728558e55298ff519c956d4f3.tar.gz ngircd-31ea0f8ee963087728558e55298ff519c956d4f3.zip | |
IRC_WriteStrClientPrefix() / Get_Prefix(): respect hostname cloaking
| -rw-r--r-- | src/ngircd/irc-write.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ngircd/irc-write.c b/src/ngircd/irc-write.c index fdc0488b..07aadf48 100644 --- a/src/ngircd/irc-write.c +++ b/src/ngircd/irc-write.c @@ -104,7 +104,8 @@ va_dcl vsnprintf( buffer, 1000, Format, ap ); va_end( ap ); - return Conn_WriteStr( Client_Conn( Client_NextHop( Client )), ":%s %s", Get_Prefix( Client_NextHop( Client ), Prefix ), buffer ); + return Conn_WriteStr(Client_Conn(Client_NextHop(Client)), ":%s %s", + Get_Prefix(Client_NextHop(Client), Prefix), buffer); } /* IRC_WriteStrClientPrefix */ @@ -449,13 +450,15 @@ IRC_SetPenalty( CLIENT *Client, time_t Seconds ) static const char * -Get_Prefix( CLIENT *Target, CLIENT *Client ) +Get_Prefix(CLIENT *Target, CLIENT *Client) { - assert( Target != NULL ); - assert( Client != NULL ); + assert (Target != NULL); + assert (Client != NULL); - if( Client_Type( Target ) == CLIENT_SERVER ) return Client_ID( Client ); - else return Client_Mask( Client ); + if (Client_Type(Target) == CLIENT_SERVER) + return Client_ID(Client); + else + return Client_MaskCloaked(Client); } /* Get_Prefix */ |