Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit f2466c1

Browse files
committed
Remove check preventing nick change when banned/quieted
Fuck this "feature" and the horse it rode in on, I hope whoever wrote this code stubs their toe and loses their keys
1 parent 4b033a7 commit f2466c1

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

modules/core/m_nick.c

-8
Original file line numberDiff line numberDiff line change
@@ -690,14 +690,6 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
690690

691691
if (dosend)
692692
{
693-
chptr = find_bannickchange_channel(source_p);
694-
if (chptr != NULL)
695-
{
696-
sendto_one_numeric(source_p, ERR_BANNICKCHANGE,
697-
form_str(ERR_BANNICKCHANGE),
698-
nick, chptr->chname);
699-
return;
700-
}
701693
if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) < rb_current_time())
702694
source_p->localClient->number_of_nick_changes = 0;
703695

src/channel.c

-38
Original file line numberDiff line numberDiff line change
@@ -981,44 +981,6 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
981981
return 0;
982982
}
983983

984-
/* find_bannickchange_channel()
985-
* Input: client to check
986-
* Output: channel preventing nick change
987-
*/
988-
struct Channel *
989-
find_bannickchange_channel(struct Client *client_p)
990-
{
991-
struct Channel *chptr;
992-
struct membership *msptr;
993-
rb_dlink_node *ptr;
994-
char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
995-
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
996-
997-
if (!MyClient(client_p) || IsOverride(client_p))
998-
return NULL;
999-
1000-
rb_sprintf(src_host, "%s!%s@%s", client_p->name, client_p->username, client_p->host);
1001-
rb_sprintf(src_iphost, "%s!%s@%s", client_p->name, client_p->username, client_p->sockhost);
1002-
1003-
RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
1004-
{
1005-
msptr = ptr->data;
1006-
chptr = msptr->chptr;
1007-
if (is_chanop_voiced(msptr))
1008-
continue;
1009-
/* cached can_send */
1010-
if (msptr->bants == chptr->bants)
1011-
{
1012-
if (can_send_banned(msptr))
1013-
return chptr;
1014-
}
1015-
else if (is_banned(chptr, client_p, msptr, src_host, src_iphost, NULL) == CHFL_BAN
1016-
|| is_quieted(chptr, client_p, msptr, src_host, src_iphost) == CHFL_BAN)
1017-
return chptr;
1018-
}
1019-
return NULL;
1020-
}
1021-
1022984
/* void check_spambot_warning(struct Client *source_p)
1023985
* Input: Client to check, channel name or NULL if this is a part.
1024986
* Output: none

src/messages.tab

-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ static const char * replies[] = {
456456
/* 432 ERR_ERRONEUSNICKNAME, */ ":%s 432 %s %s :Erroneous Nickname",
457457
/* 433 ERR_NICKNAMEINUSE, */ ":%s 433 %s %s :Nickname is already in use.",
458458
/* 434 */ NULL,
459-
/* 435 ERR_BANNICKCHANGE */ "%s %s :Cannot change nickname while banned/quieted on channel",
460459
/* 436 ERR_NICKCOLLISION, */ "%s :Nickname collision KILL",
461460
/* 437 ERR_UNAVAILRESOURCE, */ ":%s 437 %s %s :Nick/channel is temporarily unavailable",
462461
/* 438 ERR_NICKTOOFAST */ ":%s 438 %s %s %s :Nick change too fast. Please wait %d seconds.",

0 commit comments

Comments
 (0)