X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-write.c;h=ea9b9a02836a0c8f5c617c6cf6f5b2f7c2a5ff79;hp=fdc0488b463555503256d4f9369c428bd31f986f;hb=139f5961a078dfd23a469d98c3942f42595854aa;hpb=fd4dfccc30fdbb61120e3c51f4b987cc725b603d diff --git a/src/ngircd/irc-write.c b/src/ngircd/irc-write.c index fdc0488b..ea9b9a02 100644 --- a/src/ngircd/irc-write.c +++ b/src/ngircd/irc-write.c @@ -7,13 +7,15 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. - * - * Sending IRC commands over the network */ - #include "portab.h" +/** + * @file + * Sending IRC commands over the network + */ + #include "imp.h" #include #ifdef PROTOTYPES @@ -104,7 +106,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 */ @@ -308,7 +311,7 @@ IRC_WriteStrServersPrefixFlag_CB(CLIENT *ExceptOf, CLIENT *Prefix, char Flag, if (Client_Type(c) == CLIENT_SERVER && Client_Conn(c) > NONE && c != Client_ThisServer() && c != ExceptOf) { /* Found a target server, do the flags match? */ - if (Flag == '\0' || strchr(Client_Flags(c), Flag)) + if (Flag == '\0' || Client_HasFlag(c, Flag)) callback(c, Prefix, cb_data); } c = Client_Next(c); @@ -318,7 +321,7 @@ IRC_WriteStrServersPrefixFlag_CB(CLIENT *ExceptOf, CLIENT *Prefix, char Flag, /** * send message to all clients that are in the same channels as the client sending this message. - * only send message once per reote server. + * only send message once per remote server. */ #ifdef PROTOTYPES GLOBAL bool @@ -449,13 +452,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 */