Replace owner mode as +q

[BREAKING CHANGE]

Currently this will not work reliably as quiet mode is not updated.
This commit is contained in:
Sam Dodrill 2015-02-19 12:11:16 -08:00
parent 76441b9232
commit a5a0b3e8d8
7 changed files with 17 additions and 17 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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)) {

View File

@ -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",

View File

@ -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 */

View File

@ -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, " ");
}

View File

@ -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;
}