From a5a0b3e8d820202d03be43ede0fc858b35d94f41 Mon Sep 17 00:00:00 2001 From: Sam Dodrill Date: Thu, 19 Feb 2015 12:11:16 -0800 Subject: [PATCH] Replace owner mode as +q [BREAKING CHANGE] Currently this will not work reliably as quiet mode is not updated. --- extensions/m_ojoin.c | 2 +- extensions/m_omode.c | 6 +++--- modules/core/m_join.c | 12 ++++++------ modules/m_info.c | 2 +- src/chmode.c | 6 +++--- src/s_user.c | 2 +- src/supported.c | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/extensions/m_ojoin.c b/extensions/m_ojoin.c index b4b1e4c..622db26 100644 --- a/extensions/m_ojoin.c +++ b/extensions/m_ojoin.c @@ -101,7 +101,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s", source_p->name, source_p->username, source_p->host, chptr->chname); - sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +y %s", + sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +q %s", me.name, chptr->chname, source_p->name); } else if(*parv[1] == '!' && ConfigChannel.use_admin) { add_user_to_channel(chptr, source_p, CHFL_ADMIN); diff --git a/extensions/m_omode.c b/extensions/m_omode.c index 18e3427..a3da032 100644 --- a/extensions/m_omode.c +++ b/extensions/m_omode.c @@ -118,17 +118,17 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char set_channel_mode(client_p, source_p->servptr, chptr, msptr, parc - 2, parv + 2); #else - if (parc == 4 && !strcmp(parv[2], "+y") && !irccmp(parv[3], source_p->name)) { + if (parc == 4 && !strcmp(parv[2], "+q") && !irccmp(parv[3], source_p->name)) { /* Ownering themselves */ if (!wasonchannel) { sendto_one_numeric(source_p, ERR_USERNOTINCHANNEL, form_str(ERR_USERNOTINCHANNEL), parv[3], chptr->chname); return 0; } - sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +y %s", + sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +q %s", me.name, parv[1], source_p->name); sendto_server(NULL, chptr, CAP_TS6, NOCAPS, - ":%s TMODE %ld %s +y %s", + ":%s TMODE %ld %s +q %s", me.id, (long) chptr->channelts, parv[1], source_p->id); msptr->flags |= CHFL_OWNER; diff --git a/modules/core/m_join.c b/modules/core/m_join.c index 08710c5..a795875 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -598,11 +598,11 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char * I would love to hear it - Taros */ if(fl & CHFL_OWNER) { - *mbuf++ = 'y'; + *mbuf++ = 'q'; para[pargs++] = target_p->name; if(fl & CHFL_ADMIN) { - /* its possible the +y has filled up MAXMODEPARAMS, if so, start + /* its possible the +q has filled up MAXMODEPARAMS, if so, start * a new buffer */ if(pargs >= MAXMODEPARAMS) { @@ -622,7 +622,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char para[pargs++] = target_p->name; } if(fl & CHFL_CHANOP) { - /* its possible the +y has filled up MAXMODEPARAMS, if so, start + /* its possible the +q has filled up MAXMODEPARAMS, if so, start * a new buffer */ if(pargs >= MAXMODEPARAMS) { @@ -642,7 +642,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char para[pargs++] = target_p->name; } if(fl & CHFL_HALFOP) { - /* its possible the +y has filled up MAXMODEPARAMS, if so, start + /* its possible the +q has filled up MAXMODEPARAMS, if so, start * a new buffer */ if(pargs >= MAXMODEPARAMS) { @@ -662,7 +662,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char para[pargs++] = target_p->name; } if(fl & CHFL_VOICE) { - /* its possible the +y has filled up MAXMODEPARAMS, if so, start + /* its possible the +q has filled up MAXMODEPARAMS, if so, start * a new buffer */ if(pargs >= MAXMODEPARAMS) { @@ -1025,7 +1025,7 @@ remove_our_modes(struct Channel *chptr, struct Client *source_p) if(is_owner(msptr)) { msptr->flags &= ~CHFL_ADMIN; lpara[count++] = msptr->client_p->name; - *mbuf++ = 'y'; + *mbuf++ = 'q'; /* Make sure it fits if +h, +o, or +v are involved */ if(is_admin(msptr)) { diff --git a/modules/m_info.c b/modules/m_info.c index 97ccd07..e76ec12 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -652,7 +652,7 @@ static struct InfoStruct info_table[] = { "use_owner", OUTPUT_BOOLEAN_YN, &ConfigChannel.use_owner, - "Enable chanmode +y (owner)", + "Enable chanmode +q (owner)", }, { "use_except", diff --git a/src/chmode.c b/src/chmode.c index d59d3f9..750e51e 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -141,7 +141,7 @@ construct_cflag_param_string(void) *cflagsparaminfo = '\0'; rb_snprintf(cflagsparaminfo, sizeof cflagsparaminfo, "%s%sb%s%s%s%sklov%s%s", - ConfigChannel.use_owner ? "y" : "", + ConfigChannel.use_owner ? "q" : "", ConfigChannel.use_admin ? "a" : "", ConfigChannel.use_except ? "e" : "", ConfigChannel.use_forward ? "f" : "", @@ -1866,7 +1866,7 @@ struct ChannelMode chmode_table[256] = { {chm_simple, MODE_NOPRIVMSGS }, /* n */ {chm_op, 0 }, /* o */ {chm_simple, MODE_PRIVATE }, /* p */ - {chm_ban, CHFL_QUIET }, /* q */ + {chm_owner, 0 }, /* q */ {chm_simple, MODE_REGONLY }, /* r */ {chm_simple, MODE_SECRET }, /* s */ {chm_simple, MODE_TOPICLIMIT }, /* t */ @@ -1874,7 +1874,7 @@ struct ChannelMode chmode_table[256] = { {chm_voice, 0 }, /* v */ {chm_nosuch, 0 }, /* w */ {chm_nosuch, 0 }, /* x */ - {chm_owner, 0 }, /* y */ + {chm_nosuch, 0 }, /* y */ {chm_simple, MODE_OPMODERATE }, /* z */ {chm_nosuch, 0 }, /* 0x7b */ diff --git a/src/s_user.c b/src/s_user.c index b7295cd..316ba2e 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -1435,7 +1435,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use mptr = mode; if(is_owner(mscptr)) { - *mptr++ = 'y'; + *mptr++ = 'q'; strcat(modeval, nick); strcat(modeval, " "); } diff --git a/src/supported.c b/src/supported.c index 270786c..0dbb578 100644 --- a/src/supported.c +++ b/src/supported.c @@ -252,7 +252,7 @@ isupport_prefix(const void *ptr) static char result[13]; rb_snprintf(result, sizeof result, "(%s%so%sv)%s%s@%s+", - ConfigChannel.use_owner ? "y" : "", + ConfigChannel.use_owner ? "q" : "", ConfigChannel.use_admin ? "a" : "", ConfigChannel.use_halfop ? "h" : "", ConfigChannel.use_owner ? "~" : "", @@ -305,7 +305,7 @@ isupport_ownermode(const void *ptr) if(!ConfigChannel.use_owner) return NULL; - rb_snprintf(result, sizeof result, "y"); + rb_snprintf(result, sizeof result, "q"); return result; }