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

Commit 8040156

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 45d02f7 commit 8040156

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

modules/core/m_nick.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -704,14 +704,6 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
704704

705705
if (dosend)
706706
{
707-
chptr = find_bannickchange_channel(source_p);
708-
if (chptr != NULL)
709-
{
710-
sendto_one_numeric(source_p, ERR_BANNICKCHANGE,
711-
form_str(ERR_BANNICKCHANGE),
712-
nick, chptr->chname);
713-
return;
714-
}
715707
if((source_p->localClient->last_nick_change + ConfigFileEntry.max_nick_time) < rb_current_time())
716708
source_p->localClient->number_of_nick_changes = 0;
717709

src/channel.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -968,44 +968,6 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
968968
return 0;
969969
}
970970

971-
/* find_bannickchange_channel()
972-
* Input: client to check
973-
* Output: channel preventing nick change
974-
*/
975-
struct Channel *
976-
find_bannickchange_channel(struct Client *client_p)
977-
{
978-
struct Channel *chptr;
979-
struct membership *msptr;
980-
rb_dlink_node *ptr;
981-
char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
982-
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
983-
984-
if (!MyClient(client_p) || IsOverride(client_p))
985-
return NULL;
986-
987-
rb_sprintf(src_host, "%s!%s@%s", client_p->name, client_p->username, client_p->host);
988-
rb_sprintf(src_iphost, "%s!%s@%s", client_p->name, client_p->username, client_p->sockhost);
989-
990-
RB_DLINK_FOREACH(ptr, client_p->user->channel.head)
991-
{
992-
msptr = ptr->data;
993-
chptr = msptr->chptr;
994-
if (is_chanop_voiced(msptr))
995-
continue;
996-
/* cached can_send */
997-
if (msptr->bants == chptr->bants)
998-
{
999-
if (can_send_banned(msptr))
1000-
return chptr;
1001-
}
1002-
else if (is_banned(chptr, client_p, msptr, src_host, src_iphost, NULL) == CHFL_BAN
1003-
|| is_quieted(chptr, client_p, msptr, src_host, src_iphost) == CHFL_BAN)
1004-
return chptr;
1005-
}
1006-
return NULL;
1007-
}
1008-
1009971
/* void check_spambot_warning(struct Client *source_p)
1010972
* Input: Client to check, channel name or NULL if this is a part.
1011973
* Output: none

src/messages.tab

Lines changed: 0 additions & 1 deletion
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 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)