Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ extern void del_invite(struct Channel *chptr, struct Client *who);

const char *channel_modes(struct Channel *chptr, struct Client *who);

extern struct Channel *find_bannickchange_channel(struct Client *client_p);

extern void check_spambot_warning(struct Client *source_p, const char *name);

extern void check_splitmode(void *);
Expand Down
8 changes: 0 additions & 8 deletions modules/core/m_nick.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,14 +690,6 @@ change_local_nick(struct Client *client_p, struct Client *source_p,

if (dosend)
{
chptr = find_bannickchange_channel(source_p);
if (chptr != NULL)
{
sendto_one_numeric(source_p, ERR_BANNICKCHANGE,
form_str(ERR_BANNICKCHANGE),
nick, chptr->chname);
return;
}
if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) < rb_current_time())
source_p->localClient->number_of_nick_changes = 0;

Expand Down
38 changes: 0 additions & 38 deletions src/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,44 +981,6 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
return 0;
}

/* find_bannickchange_channel()
* Input: client to check
* Output: channel preventing nick change
*/
struct Channel *
find_bannickchange_channel(struct Client *client_p)
{
struct Channel *chptr;
struct membership *msptr;
rb_dlink_node *ptr;
char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];

if (!MyClient(client_p) || IsOverride(client_p))
return NULL;

rb_sprintf(src_host, "%s!%s@%s", client_p->name, client_p->username, client_p->host);
rb_sprintf(src_iphost, "%s!%s@%s", client_p->name, client_p->username, client_p->sockhost);

RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
{
msptr = ptr->data;
chptr = msptr->chptr;
if (is_chanop_voiced(msptr))
continue;
/* cached can_send */
if (msptr->bants == chptr->bants)
{
if (can_send_banned(msptr))
return chptr;
}
else if (is_banned(chptr, client_p, msptr, src_host, src_iphost, NULL) == CHFL_BAN
|| is_quieted(chptr, client_p, msptr, src_host, src_iphost) == CHFL_BAN)
return chptr;
}
return NULL;
}

/* void check_spambot_warning(struct Client *source_p)
* Input: Client to check, channel name or NULL if this is a part.
* Output: none
Expand Down
2 changes: 1 addition & 1 deletion src/messages.tab
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ static const char * replies[] = {
/* 432 ERR_ERRONEUSNICKNAME, */ ":%s 432 %s %s :Erroneous Nickname",
/* 433 ERR_NICKNAMEINUSE, */ ":%s 433 %s %s :Nickname is already in use.",
/* 434 */ NULL,
/* 435 ERR_BANNICKCHANGE */ "%s %s :Cannot change nickname while banned/quieted on channel",
/* 435 */ NULL,
/* 436 ERR_NICKCOLLISION, */ "%s :Nickname collision KILL",
/* 437 ERR_UNAVAILRESOURCE, */ ":%s 437 %s %s :Nick/channel is temporarily unavailable",
/* 438 ERR_NICKTOOFAST */ ":%s 438 %s %s %s :Nick change too fast. Please wait %d seconds.",
Expand Down