167 |
|
Count.invisi, dlink_list_length(&global_serv_list)); |
168 |
|
else |
169 |
|
sendto_one_numeric(source_p, &me, RPL_LUSERCLIENT, |
170 |
< |
(Count.total-Count.invisi), Count.invisi, 1); |
170 |
> |
(Count.total - Count.invisi), Count.invisi, 1); |
171 |
|
|
172 |
< |
if (Count.oper > 0) |
172 |
> |
if (Count.oper) |
173 |
|
sendto_one_numeric(source_p, &me, RPL_LUSEROP, Count.oper); |
174 |
|
|
175 |
< |
if (dlink_list_length(&unknown_list) > 0) |
175 |
> |
if (dlink_list_length(&unknown_list)) |
176 |
|
sendto_one_numeric(source_p, &me, RPL_LUSERUNKNOWN, dlink_list_length(&unknown_list)); |
177 |
|
|
178 |
< |
if (dlink_list_length(&global_channel_list) > 0) |
178 |
> |
if (dlink_list_length(&global_channel_list)) |
179 |
|
sendto_one_numeric(source_p, &me, RPL_LUSERCHANNELS, dlink_list_length(&global_channel_list)); |
180 |
|
|
181 |
|
if (!ConfigServerHide.hide_servers || HasUMode(source_p, UMODE_OPER)) |
532 |
|
|
533 |
|
if (!valid_username(source_p->username, 1)) |
534 |
|
{ |
535 |
< |
char tmpstr2[IRCD_BUFSIZE] = ""; |
535 |
> |
char buf[IRCD_BUFSIZE] = ""; |
536 |
|
|
537 |
|
sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE, |
538 |
|
"Invalid username: %s (%s@%s)", |
539 |
|
source_p->name, source_p->username, source_p->host); |
540 |
|
++ServerStats.is_ref; |
541 |
< |
snprintf(tmpstr2, sizeof(tmpstr2), "Invalid username [%s]", |
542 |
< |
source_p->username); |
543 |
< |
exit_client(source_p, tmpstr2); |
541 |
> |
snprintf(buf, sizeof(buf), "Invalid username [%s]", source_p->username); |
542 |
> |
exit_client(source_p, buf); |
543 |
|
return; |
544 |
|
} |
545 |
|
|
811 |
|
{ |
812 |
|
char *m = umode_buf; |
813 |
|
int what = 0; |
815 |
– |
unsigned int i; |
816 |
– |
unsigned int flag; |
814 |
|
|
815 |
|
/* |
816 |
|
* Build a string in umode_buf to represent the change in the user's |
817 |
|
* mode between the new (source_p->umodes) and 'old'. |
818 |
|
*/ |
819 |
< |
for (i = 0; i < 128; ++i) |
819 |
> |
for (unsigned int i = 0; i < 128; ++i) |
820 |
|
{ |
821 |
< |
flag = user_modes[i]; |
821 |
> |
unsigned int flag = user_modes[i]; |
822 |
> |
|
823 |
|
if (!flag) |
824 |
|
continue; |
825 |
|
|
1007 |
|
sendto_one_numeric(source_p, &me, RPL_YOUREOPER); |
1008 |
|
} |
1009 |
|
|
1010 |
< |
static char new_uid[TOTALSIDUID + 1]; /* allow for \0 */ |
1010 |
> |
static char new_uid[TOTALSIDUID + 1]; /* Allow for \0 */ |
1011 |
|
|
1012 |
|
int |
1013 |
|
valid_sid(const char *sid) |
1056 |
|
static void |
1057 |
|
add_one_to_uid(int i) |
1058 |
|
{ |
1059 |
< |
if (i != IRC_MAXSID) /* Not reached server SID portion yet? */ |
1059 |
> |
if (i != IRC_MAXSID) /* Not reached server SID portion yet? */ |
1060 |
|
{ |
1061 |
|
if (new_uid[i] == 'Z') |
1062 |
|
new_uid[i] = '0'; |
1088 |
|
static const char * |
1089 |
|
uid_get(void) |
1090 |
|
{ |
1091 |
< |
add_one_to_uid(TOTALSIDUID - 1); /* index from 0 */ |
1091 |
> |
add_one_to_uid(TOTALSIDUID - 1); /* Index from 0 */ |
1092 |
|
return new_uid; |
1093 |
|
} |
1094 |
|
|
1146 |
|
|
1147 |
|
if (ptr == NULL) |
1148 |
|
{ |
1149 |
< |
support = MyMalloc(sizeof(*support)); |
1149 |
> |
support = MyCalloc(sizeof(*support)); |
1150 |
|
dlinkAddTail(support, &support->node, &support_list); |
1151 |
|
} |
1152 |
|
|
1153 |
|
support->name = xstrdup(name); |
1154 |
< |
if (options != NULL) |
1154 |
> |
if (options) |
1155 |
|
support->options = xstrdup(options); |
1156 |
|
support->number = n; |
1157 |
|
|
1219 |
|
p += (n = sprintf(p, "%s", support->name)); |
1220 |
|
len += n; |
1221 |
|
|
1222 |
< |
if (support->options != NULL) |
1222 |
> |
if (support->options) |
1223 |
|
{ |
1224 |
|
p += (n = sprintf(p, "=%s", support->options)); |
1225 |
|
len += n; |
1247 |
|
} |
1248 |
|
} |
1249 |
|
|
1250 |
< |
if (len != 0) |
1250 |
> |
if (len) |
1251 |
|
{ |
1252 |
|
if (*--p == ' ') |
1253 |
|
*p = '\0'; |