if (!IsClient(client_p))
return;
- sendto_channel_local_with_capability(ALL_MEMBERS, NOCAPS, CLICAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN %s",
+ sendto_channel_local_with_capability(client_p, ALL_MEMBERS, NOCAPS, CLICAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN %s",
client_p->name, client_p->username, client_p->host, chptr->chname);
- sendto_channel_local_with_capability(ALL_MEMBERS, CLICAP_EXTENDED_JOIN, NOCAPS, chptr, ":%s!%s@%s JOIN %s %s :%s",
+ sendto_channel_local_with_capability(client_p, ALL_MEMBERS, CLICAP_EXTENDED_JOIN, NOCAPS, chptr, ":%s!%s@%s JOIN %s %s :%s",
client_p->name, client_p->username, client_p->host, chptr->chname,
EmptyString(client_p->user->suser) ? "*" : client_p->user->suser,
client_p->info);
struct Client *who, struct membership *msptr,
const char *s, const char *s2, const char **forward)
{
- char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_ip4host[NICKLEN + USERLEN + HOSTLEN + 6];
+ char src_host[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_iphost[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_althost[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_ip4host[NAMELEN + USERLEN + HOSTLEN + 6];
char *s3 = NULL;
char *s4 = NULL;
struct sockaddr_in ip4;
s3 = src_althost;
}
}
-#ifdef RB_IPV6
if(GET_SS_FAMILY(&who->localClient->ip) == AF_INET6 &&
rb_ipv4_from_ipv6((const struct sockaddr_in6 *)&who->localClient->ip, &ip4))
{
s4, src_ip4host + sizeof src_ip4host - s4);
s4 = src_ip4host;
}
-#endif
RB_DLINK_FOREACH(ptr, list->head)
{
match(actualBan->banstr, s2) ||
match_cidr(actualBan->banstr, s2) ||
match_extban(actualBan->banstr, who, chptr, CHFL_BAN) ||
- (s3 != NULL && match(actualBan->banstr, s3))
-#ifdef RB_IPV6
- ||
+ (s3 != NULL && match(actualBan->banstr, s3)) ||
(s4 != NULL && (match(actualBan->banstr, s4) || match_cidr(actualBan->banstr, s4)))
-#endif
)
break;
else
is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
const char *s, const char *s2, const char **forward)
{
+#if 0
if (chptr->last_checked_client != NULL &&
who == chptr->last_checked_client &&
chptr->last_checked_type == CHFL_BAN &&
chptr->last_checked_ts = rb_current_time();
return chptr->last_checked_result;
+#else
+ return is_banned_list(chptr, &chptr->banlist, who, msptr, s, s2, forward);
+#endif
}
/* is_quieted()
is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
const char *s, const char *s2)
{
+#if 0
if (chptr->last_checked_client != NULL &&
who == chptr->last_checked_client &&
chptr->last_checked_type == CHFL_QUIET &&
chptr->last_checked_ts = rb_current_time();
return chptr->last_checked_result;
+#else
+ return is_banned_list(chptr, &chptr->quietlist, who, msptr, s, s2, NULL);
+#endif
}
/* can_join()
rb_dlink_node *invite = NULL;
rb_dlink_node *ptr;
struct Ban *invex = NULL;
- char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
+ char src_host[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_iphost[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_althost[NAMELEN + USERLEN + HOSTLEN + 6];
int use_althost = 0;
int i = 0;
hook_data_channel moduledata;
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
- char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
+ char src_host[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_iphost[NAMELEN + USERLEN + HOSTLEN + 6];
if (!MyClient(client_p))
return NULL;
char *pbuf;
const char *arg;
int dir;
- int arglen;
+ int arglen = 0;
/* Now send to servers... */
mc = 0;
sendto_server(target_p, chptr, CAP_TS6, NOCAPS,
":%s PART %s", target_p->id, chptr->chname);
- sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
+ sendto_channel_local(target_p, ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
target_p->name, target_p->username,
target_p->host, chptr->chname, target_p->name);