| 210 |
|
void |
| 211 |
|
show_isupport(struct Client *source_p) |
| 212 |
|
{ |
| 213 |
< |
const dlink_node *ptr = NULL; |
| 213 |
> |
const dlink_node *node = NULL; |
| 214 |
|
|
| 215 |
< |
DLINK_FOREACH(ptr, support_list_lines.head) |
| 216 |
< |
sendto_one_numeric(source_p, &me, RPL_ISUPPORT, ptr->data); |
| 215 |
> |
DLINK_FOREACH(node, support_list_lines.head) |
| 216 |
> |
sendto_one_numeric(source_p, &me, RPL_ISUPPORT, node->data); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
|
| 281 |
|
static void |
| 282 |
|
introduce_client(struct Client *source_p) |
| 283 |
|
{ |
| 284 |
< |
dlink_node *ptr = NULL; |
| 284 |
> |
dlink_node *node = NULL; |
| 285 |
|
char ubuf[IRCD_BUFSIZE] = ""; |
| 286 |
|
|
| 287 |
|
if (MyClient(source_p)) |
| 297 |
|
ubuf[1] = '\0'; |
| 298 |
|
} |
| 299 |
|
|
| 300 |
< |
DLINK_FOREACH(ptr, local_server_list.head) |
| 300 |
> |
DLINK_FOREACH(node, local_server_list.head) |
| 301 |
|
{ |
| 302 |
< |
struct Client *server = ptr->data; |
| 302 |
> |
struct Client *server = node->data; |
| 303 |
|
|
| 304 |
|
if (server == source_p->from) |
| 305 |
|
continue; |
| 837 |
|
void |
| 838 |
|
user_set_hostmask(struct Client *target_p, const char *hostname, const int what) |
| 839 |
|
{ |
| 840 |
< |
dlink_node *ptr = NULL; |
| 840 |
> |
dlink_node *node = NULL; |
| 841 |
|
|
| 842 |
|
if (!strcmp(target_p->host, hostname)) |
| 843 |
|
return; |
| 878 |
|
if (!ConfigGeneral.cycle_on_host_change) |
| 879 |
|
return; |
| 880 |
|
|
| 881 |
< |
DLINK_FOREACH(ptr, target_p->channel.head) |
| 881 |
> |
DLINK_FOREACH(node, target_p->channel.head) |
| 882 |
|
{ |
| 883 |
|
char modebuf[4], nickbuf[NICKLEN * 3 + 3] = ""; |
| 884 |
|
char *p = modebuf; |
| 885 |
|
int len = 0; |
| 886 |
< |
const struct Membership *ms = ptr->data; |
| 886 |
> |
const struct Membership *member = node->data; |
| 887 |
|
|
| 888 |
< |
if (has_member_flags(ms, CHFL_CHANOP)) |
| 888 |
> |
if (has_member_flags(member, CHFL_CHANOP)) |
| 889 |
|
{ |
| 890 |
|
*p++ = 'o'; |
| 891 |
|
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
| 892 |
|
} |
| 893 |
|
|
| 894 |
< |
if (has_member_flags(ms, CHFL_HALFOP)) |
| 894 |
> |
if (has_member_flags(member, CHFL_HALFOP)) |
| 895 |
|
{ |
| 896 |
|
*p++ = 'h'; |
| 897 |
|
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
| 898 |
|
} |
| 899 |
|
|
| 900 |
< |
if (has_member_flags(ms, CHFL_VOICE)) |
| 900 |
> |
if (has_member_flags(member, CHFL_VOICE)) |
| 901 |
|
{ |
| 902 |
|
*p++ = 'v'; |
| 903 |
|
len += snprintf(nickbuf + len, sizeof(nickbuf) - len, len ? " %s" : "%s", target_p->name); |
| 906 |
|
*p = '\0'; |
| 907 |
|
|
| 908 |
|
|
| 909 |
< |
sendto_channel_local_butone(NULL, CAP_EXTENDED_JOIN, 0, ms->chptr, ":%s!%s@%s JOIN %s %s :%s", |
| 909 |
> |
sendto_channel_local_butone(NULL, CAP_EXTENDED_JOIN, 0, member->chptr, ":%s!%s@%s JOIN %s %s :%s", |
| 910 |
|
target_p->name, target_p->username, |
| 911 |
< |
target_p->host, ms->chptr->name, |
| 911 |
> |
target_p->host, member->chptr->name, |
| 912 |
|
(!IsDigit(target_p->svid[0]) && target_p->svid[0] != '*') ? target_p->svid : "*", |
| 913 |
|
target_p->info); |
| 914 |
< |
sendto_channel_local_butone(NULL, 0, CAP_EXTENDED_JOIN, ms->chptr, ":%s!%s@%s JOIN :%s", |
| 914 |
> |
sendto_channel_local_butone(NULL, 0, CAP_EXTENDED_JOIN, member->chptr, ":%s!%s@%s JOIN :%s", |
| 915 |
|
target_p->name, target_p->username, |
| 916 |
< |
target_p->host, ms->chptr->name); |
| 916 |
> |
target_p->host, member->chptr->name); |
| 917 |
|
|
| 918 |
|
if (nickbuf[0]) |
| 919 |
< |
sendto_channel_local_butone(target_p, 0, 0, ms->chptr, ":%s MODE %s +%s %s", |
| 920 |
< |
target_p->servptr->name, ms->chptr->name, |
| 919 |
> |
sendto_channel_local_butone(target_p, 0, 0, member->chptr, ":%s MODE %s +%s %s", |
| 920 |
> |
target_p->servptr->name, member->chptr->name, |
| 921 |
|
modebuf, nickbuf); |
| 922 |
|
|
| 923 |
|
} |
| 1088 |
|
void |
| 1089 |
|
add_isupport(const char *name, const char *options, int n) |
| 1090 |
|
{ |
| 1091 |
< |
dlink_node *ptr; |
| 1091 |
> |
dlink_node *node = NULL; |
| 1092 |
|
struct Isupport *support = NULL; |
| 1093 |
|
|
| 1094 |
< |
DLINK_FOREACH(ptr, support_list.head) |
| 1094 |
> |
DLINK_FOREACH(node, support_list.head) |
| 1095 |
|
{ |
| 1096 |
< |
support = ptr->data; |
| 1096 |
> |
support = node->data; |
| 1097 |
|
if (irccmp(support->name, name) == 0) |
| 1098 |
|
{ |
| 1099 |
|
MyFree(support->name); |
| 1102 |
|
} |
| 1103 |
|
} |
| 1104 |
|
|
| 1105 |
< |
if (ptr == NULL) |
| 1105 |
> |
if (node == NULL) |
| 1106 |
|
{ |
| 1107 |
|
support = MyCalloc(sizeof(*support)); |
| 1108 |
|
dlinkAddTail(support, &support->node, &support_list); |
| 1126 |
|
void |
| 1127 |
|
delete_isupport(const char *name) |
| 1128 |
|
{ |
| 1129 |
< |
dlink_node *ptr; |
| 1130 |
< |
struct Isupport *support; |
| 1129 |
> |
dlink_node *node = NULL; |
| 1130 |
|
|
| 1131 |
< |
DLINK_FOREACH(ptr, support_list.head) |
| 1131 |
> |
DLINK_FOREACH(node, support_list.head) |
| 1132 |
|
{ |
| 1133 |
< |
support = ptr->data; |
| 1133 |
> |
struct Isupport *support = node->data; |
| 1134 |
> |
|
| 1135 |
|
if (irccmp(support->name, name) == 0) |
| 1136 |
|
{ |
| 1137 |
< |
dlinkDelete(ptr, &support_list); |
| 1137 |
> |
dlinkDelete(node, &support_list); |
| 1138 |
|
MyFree(support->name); |
| 1139 |
|
MyFree(support->options); |
| 1140 |
|
MyFree(support); |
| 1157 |
|
{ |
| 1158 |
|
char isupportbuffer[IRCD_BUFSIZE]; |
| 1159 |
|
char *p = isupportbuffer; |
| 1160 |
< |
dlink_node *ptr = NULL, *ptr_next = NULL; |
| 1160 |
> |
dlink_node *node = NULL, *node_next = NULL; |
| 1161 |
|
int n = 0; |
| 1162 |
|
int tokens = 0; |
| 1163 |
|
size_t len = 0; |
| 1164 |
|
size_t reserve = strlen(me.name) + HOSTLEN + strlen(numeric_form(RPL_ISUPPORT)); |
| 1165 |
|
|
| 1166 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, support_list_lines.head) |
| 1166 |
> |
DLINK_FOREACH_SAFE(node, node_next, support_list_lines.head) |
| 1167 |
|
{ |
| 1168 |
< |
dlinkDelete(ptr, &support_list_lines); |
| 1169 |
< |
MyFree(ptr->data); |
| 1170 |
< |
free_dlink_node(ptr); |
| 1168 |
> |
dlinkDelete(node, &support_list_lines); |
| 1169 |
> |
MyFree(node->data); |
| 1170 |
> |
free_dlink_node(node); |
| 1171 |
|
} |
| 1172 |
|
|
| 1173 |
< |
DLINK_FOREACH(ptr, support_list.head) |
| 1173 |
> |
DLINK_FOREACH(node, support_list.head) |
| 1174 |
|
{ |
| 1175 |
< |
struct Isupport *support = ptr->data; |
| 1175 |
> |
struct Isupport *support = node->data; |
| 1176 |
|
|
| 1177 |
|
p += (n = sprintf(p, "%s", support->name)); |
| 1178 |
|
len += n; |