commit - f37600ee01f6cfd86e8fa80f77ee26ebaf3012b2
commit + 0d67be3f301e280225d8a04048ebb77a976d8169
blob - 8d001a825c013e8c77e339f5915a54eac792b6fa
blob + 59fe00229576d018900a600c548925fd4d9668cb
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
}
ptr++;
}
-
+
if(!can_kick) {
IRC_WriteStrClient(Origin, ERR_CHANOPPRIVTOLOW_MSG,
Client_ID(Origin), Name);
blob - 7a122ef790a0c5ec0148c3224b83956a8de00020
blob + a1bebb4ffb818b28b9eb17b469f8f91a78ff47a5
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
target = Client_Search(Req->argv[0]);
else
target = Client_ThisServer();
-
+
/* Make sure that the target is a server */
if (target && Client_Type(target) != CLIENT_SERVER)
target = Client_Introducer(target);
who_flags_qualifier(CLIENT *Client, const char *chan_user_modes, char *str, size_t len)
{
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'))
strlcat(str, "~", len);
if (strchr(chan_user_modes, 'a'))
strlcat(str, "&", len);
if (strchr(chan_user_modes, 'v'))
strlcat(str, "+", len);
-
+
return str;
}
-
+
if (strchr(chan_user_modes, 'q'))
strlcat(str, "~", len);
else if (strchr(chan_user_modes, 'a'))
strlcat(str, "%", len);
else if (strchr(chan_user_modes, 'v'))
strlcat(str, "+", len);
-
+
return str;
}
chan_user_modes = Channel_UserModes(Chan, c);
who_flags_qualifier(c, chan_user_modes, flags, sizeof(flags));
-
+
if (!write_whoreply(Client, c, Channel_Name(Chan),
flags))
return DISCONNECTED;
Conn_CountMax(), Conn_CountAccepted()))
return DISCONNECTED;
#endif
-
+
return CONNECTED;
} /* IRC_Send_LUSERS */
if (is_member || is_visible) {
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
-
+
who_flags_qualifier(cl, Channel_UserModes(Chan, cl), str, sizeof(str));
strlcat(str, Client_ID(cl), sizeof(str));
blob - f39463433ce5261b0d3736174845f92aadb21e76
blob + 7380c6eb5c70308b030097aadf58a9ab3bc933e4
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
if(Client_OperByMe(Client) && Conf_OperCanMode) {
is_oper = true;
}
-
+
/* Check if client is a server/service */
if(Client_Type(Client) == CLIENT_SERVER ||
Client_Type(Client) == CLIENT_SERVICE) {
/* Are there arguments left? */
if (arg_arg >= Req->argc)
arg_arg = -1;
-
+
if(!is_machine) {
o_mode_ptr = Channel_UserModes(Channel, Client);
while( *o_mode_ptr ) {
blob - f9182d984ca9c2c6f1f743b419a198d89b31ada7
blob + 380ab6224f55cf9b0d504f80be5718eceff824ae
--- src/ngircd/irc-server.c
+++ src/ngircd/irc-server.c
CLIENT *from, *c;
int i;
CONN_ID con;
-
+
assert( Client != NULL );
assert( Req != NULL );
Conn_Close( Client_Conn( Client ), NULL, "Bad password", true);
return DISCONNECTED;
}
-
+
/* Is there a registered server with this ID? */
if( ! Client_CheckID( Client, Req->argv[0] )) return DISCONNECTED;
bool is_owner, is_chanadmin, is_op, is_halfop, is_voiced;
CHANNEL *chan;
CLIENT *c;
-
+
assert( Client != NULL );
assert( Req != NULL );
while( ptr )
{
is_op = is_voiced = false;
-
+
/* cut off prefixes */
while(( *ptr == '~') || ( *ptr == '&' ) || ( *ptr == '@' ) ||
( *ptr == '%') || ( *ptr == '+' ))
- {
+ {
if( *ptr == '~' ) is_owner = true;
if( *ptr == '&' ) is_chanadmin = true;
if( *ptr == '@' ) is_op = true;
Channel_Join( c, channame );
chan = Channel_Search( channame );
assert( chan != NULL );
-
+
if( is_owner ) Channel_UserModeAdd( chan, c, 'q' );
if( is_chanadmin ) Channel_UserModeAdd( chan, c, 'a' );
if( is_op ) Channel_UserModeAdd( chan, c, 'o' );
strlcat( nick_out, ptr, sizeof( nick_out ));
}
else Log( LOG_ERR, "Got NJOIN for unknown nick \"%s\" for channel \"%s\"!", ptr, channame );
-
+
/* search for next Nick */
ptr = strtok( NULL, "," );
}