Fix some "whitespace glitches"

Some have been introduced by commit 7b01bb83, some are older.
This commit is contained in:
Alexander Barton 2012-09-11 12:48:51 +02:00
parent f37600ee01
commit 0d67be3f30
4 changed files with 19 additions and 19 deletions

View File

@ -362,7 +362,7 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
} }
ptr++; ptr++;
} }
if(!can_kick) { if(!can_kick) {
IRC_WriteStrClient(Origin, ERR_CHANOPPRIVTOLOW_MSG, IRC_WriteStrClient(Origin, ERR_CHANOPPRIVTOLOW_MSG,
Client_ID(Origin), Name); Client_ID(Origin), Name);

View File

@ -117,7 +117,7 @@ IRC_INFO(CLIENT * Client, REQUEST * Req)
target = Client_Search(Req->argv[0]); target = Client_Search(Req->argv[0]);
else else
target = Client_ThisServer(); target = Client_ThisServer();
/* Make sure that the target is a server */ /* Make sure that the target is a server */
if (target && Client_Type(target) != CLIENT_SERVER) if (target && Client_Type(target) != CLIENT_SERVER)
target = Client_Introducer(target); target = Client_Introducer(target);
@ -811,8 +811,8 @@ static char *
who_flags_qualifier(CLIENT *Client, const char *chan_user_modes, char *str, size_t len) who_flags_qualifier(CLIENT *Client, const char *chan_user_modes, char *str, size_t len)
{ {
assert(Client != NULL); assert(Client != NULL);
if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX) { if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX) {
if (strchr(chan_user_modes, 'q')) if (strchr(chan_user_modes, 'q'))
strlcat(str, "~", len); strlcat(str, "~", len);
if (strchr(chan_user_modes, 'a')) if (strchr(chan_user_modes, 'a'))
@ -823,10 +823,10 @@ who_flags_qualifier(CLIENT *Client, const char *chan_user_modes, char *str, size
strlcat(str, "&", len); strlcat(str, "&", len);
if (strchr(chan_user_modes, 'v')) if (strchr(chan_user_modes, 'v'))
strlcat(str, "+", len); strlcat(str, "+", len);
return str; return str;
} }
if (strchr(chan_user_modes, 'q')) if (strchr(chan_user_modes, 'q'))
strlcat(str, "~", len); strlcat(str, "~", len);
else if (strchr(chan_user_modes, 'a')) else if (strchr(chan_user_modes, 'a'))
@ -837,7 +837,7 @@ who_flags_qualifier(CLIENT *Client, const char *chan_user_modes, char *str, size
strlcat(str, "%", len); strlcat(str, "%", len);
else if (strchr(chan_user_modes, 'v')) else if (strchr(chan_user_modes, 'v'))
strlcat(str, "+", len); strlcat(str, "+", len);
return str; return str;
} }
@ -890,7 +890,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
chan_user_modes = Channel_UserModes(Chan, c); chan_user_modes = Channel_UserModes(Chan, c);
who_flags_qualifier(c, chan_user_modes, flags, sizeof(flags)); who_flags_qualifier(c, chan_user_modes, flags, sizeof(flags));
if (!write_whoreply(Client, c, Channel_Name(Chan), if (!write_whoreply(Client, c, Channel_Name(Chan),
flags)) flags))
return DISCONNECTED; return DISCONNECTED;
@ -1479,7 +1479,7 @@ IRC_Send_LUSERS(CLIENT *Client)
Conn_CountMax(), Conn_CountAccepted())) Conn_CountMax(), Conn_CountAccepted()))
return DISCONNECTED; return DISCONNECTED;
#endif #endif
return CONNECTED; return CONNECTED;
} /* IRC_Send_LUSERS */ } /* IRC_Send_LUSERS */
@ -1609,7 +1609,7 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
if (is_member || is_visible) { if (is_member || is_visible) {
if (str[strlen(str) - 1] != ':') if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str)); strlcat(str, " ", sizeof(str));
who_flags_qualifier(cl, Channel_UserModes(Chan, cl), str, sizeof(str)); who_flags_qualifier(cl, Channel_UserModes(Chan, cl), str, sizeof(str));
strlcat(str, Client_ID(cl), sizeof(str)); strlcat(str, Client_ID(cl), sizeof(str));

View File

@ -441,7 +441,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
if(Client_OperByMe(Client) && Conf_OperCanMode) { if(Client_OperByMe(Client) && Conf_OperCanMode) {
is_oper = true; is_oper = true;
} }
/* Check if client is a server/service */ /* Check if client is a server/service */
if(Client_Type(Client) == CLIENT_SERVER || if(Client_Type(Client) == CLIENT_SERVER ||
Client_Type(Client) == CLIENT_SERVICE) { Client_Type(Client) == CLIENT_SERVICE) {
@ -527,7 +527,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
/* Are there arguments left? */ /* Are there arguments left? */
if (arg_arg >= Req->argc) if (arg_arg >= Req->argc)
arg_arg = -1; arg_arg = -1;
if(!is_machine) { if(!is_machine) {
o_mode_ptr = Channel_UserModes(Channel, Client); o_mode_ptr = Channel_UserModes(Channel, Client);
while( *o_mode_ptr ) { while( *o_mode_ptr ) {

View File

@ -54,7 +54,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
CLIENT *from, *c; CLIENT *from, *c;
int i; int i;
CONN_ID con; CONN_ID con;
assert( Client != NULL ); assert( Client != NULL );
assert( Req != NULL ); assert( Req != NULL );
@ -88,7 +88,7 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
Conn_Close( Client_Conn( Client ), NULL, "Bad password", true); Conn_Close( Client_Conn( Client ), NULL, "Bad password", true);
return DISCONNECTED; return DISCONNECTED;
} }
/* Is there a registered server with this ID? */ /* Is there a registered server with this ID? */
if( ! Client_CheckID( Client, Req->argv[0] )) return DISCONNECTED; if( ! Client_CheckID( Client, Req->argv[0] )) return DISCONNECTED;
@ -206,7 +206,7 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
bool is_owner, is_chanadmin, is_op, is_halfop, is_voiced; bool is_owner, is_chanadmin, is_op, is_halfop, is_voiced;
CHANNEL *chan; CHANNEL *chan;
CLIENT *c; CLIENT *c;
assert( Client != NULL ); assert( Client != NULL );
assert( Req != NULL ); assert( Req != NULL );
@ -220,11 +220,11 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
while( ptr ) while( ptr )
{ {
is_op = is_voiced = false; is_op = is_voiced = false;
/* cut off prefixes */ /* cut off prefixes */
while(( *ptr == '~') || ( *ptr == '&' ) || ( *ptr == '@' ) || while(( *ptr == '~') || ( *ptr == '&' ) || ( *ptr == '@' ) ||
( *ptr == '%') || ( *ptr == '+' )) ( *ptr == '%') || ( *ptr == '+' ))
{ {
if( *ptr == '~' ) is_owner = true; if( *ptr == '~' ) is_owner = true;
if( *ptr == '&' ) is_chanadmin = true; if( *ptr == '&' ) is_chanadmin = true;
if( *ptr == '@' ) is_op = true; if( *ptr == '@' ) is_op = true;
@ -239,7 +239,7 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
Channel_Join( c, channame ); Channel_Join( c, channame );
chan = Channel_Search( channame ); chan = Channel_Search( channame );
assert( chan != NULL ); assert( chan != NULL );
if( is_owner ) Channel_UserModeAdd( chan, c, 'q' ); if( is_owner ) Channel_UserModeAdd( chan, c, 'q' );
if( is_chanadmin ) Channel_UserModeAdd( chan, c, 'a' ); if( is_chanadmin ) Channel_UserModeAdd( chan, c, 'a' );
if( is_op ) Channel_UserModeAdd( chan, c, 'o' ); if( is_op ) Channel_UserModeAdd( chan, c, 'o' );
@ -266,7 +266,7 @@ IRC_NJOIN( CLIENT *Client, REQUEST *Req )
strlcat( nick_out, ptr, sizeof( nick_out )); strlcat( nick_out, ptr, sizeof( nick_out ));
} }
else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame ); else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame );
/* search for next Nick */ /* search for next Nick */
ptr = strtok( NULL, "," ); ptr = strtok( NULL, "," );
} }