Use unreal prefixes

+q is now owner mode
+Q is now quiet mode
+y is now not used

! prefix changed to &
This commit is contained in:
Sam Dodrill 2014-05-28 16:33:54 -07:00
parent 047d0992c1
commit 53df278f9c
12 changed files with 37 additions and 36 deletions

View File

@ -1,5 +1,7 @@
# Elemental-IRCd
# This is the IRCHighway branch. This will not link to other Elemental-IRCd instances without the specific patches in this version.
**Elemental-IRCd** is a high performance, lightweight, and scalable
IRC daemon. It is a fork of the now-defunct ShadowIRCD and seeks to continue in
the direction ShadowIRCD was headed.

View File

@ -106,7 +106,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)

View File

@ -123,7 +123,7 @@ 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)
@ -132,10 +132,10 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
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

@ -17,7 +17,7 @@
#include "version.h"
IRCDVar myIrcd[] = {
{"Elemental-IRCd 6.5", /* ircd name */
{"Elemental-IRCd+ihw 6.5", /* ircd name */
"+oiS", /* nickserv mode */
"+oiS", /* chanserv mode */
"+oiS", /* memoserv mode */
@ -38,13 +38,13 @@ IRCDVar myIrcd[] = {
"+oiS", /* Global alias mode */
"+oiS", /* Used by BotServ Bots */
2, /* Chan Max Symbols */
"-cijlmnpstrgzQF", /* Modes to Remove */
"+ao", /* Channel Umode used by Botserv bots */
"-cijlmnpstrgzF", /* Modes to Remove */
"+o", /* Channel Umode used by Botserv bots */
1, /* SVSNICK */
1, /* Vhost */
1, /* Has Owner */
"+y", /* Mode to set for an owner */
"-y", /* Mode to unset for an owner */
"+q", /* Mode to set for an owner */
"-q", /* Mode to unset for an owner */
"+a", /* Mode to set for chan admin */
"-a", /* Mode to unset for chan admin */
NULL, /* Mode On Reg */

View File

@ -33,7 +33,7 @@ class ChannelModeLargeBan : public ChannelMode
class ElementalProto : public IRCDProto
{
public:
ElementalProto(Module *creator) : IRCDProto(creator, "Elemental-IRCd 6.5+")
ElementalProto(Module *creator) : IRCDProto(creator, "Elemental-IRCd+ihw 6.5+")
{
DefaultPseudoclientModes = "+oiS";
CanCertFP = true;
@ -378,8 +378,8 @@ class ProtoElemental : public Module
ModeManager::AddChannelMode(new ChannelModeStatus("VOICE", 'v', '+', 0));
ModeManager::AddChannelMode(new ChannelModeStatus("HALFOP", 'h', '%', 1));
ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 2);
ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT", 'a', '!', 3));
ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'y', '~', 4));
ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT", 'a', '&', 3));
ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '~', 4));
}
public:

View File

@ -19,7 +19,7 @@ DECLARE_MODULE_V1("protocol/elemental-ircd", true, _modinit, NULL, PACKAGE_STRIN
/* *INDENT-OFF* */
ircd_t elemental_ircd = {
"elemental-ircd", /* IRCd name */
"elemental-ircd+ihw", /* IRCd name */
"$$", /* TLD Prefix, used by Global. */
true, /* Whether or not we use IRCNet/TS6 UID */
false, /* Whether or not we use RCOMMAND */
@ -32,13 +32,13 @@ ircd_t elemental_ircd = {
CSTATUS_OWNER, /* Integer flag for owner channel flag. */
CSTATUS_PROTECT, /* Integer flag for protect channel flag. */
CSTATUS_HALFOP, /* Integer flag for halfops. */
"+y", /* Mode we set for owner. */
"+q", /* Mode we set for owner. */
"+a", /* Mode we set for protect. */
"+h", /* Mode we set for halfops. */
PROTOCOL_SHADOWIRCD, /* Protocol type */
CMODE_PERM, /* Permanent cmodes */
CMODE_IMMUNE, /* Oper-immune cmode */
"beIq", /* Ban-like cmodes */
"beIQ", /* Ban-like cmodes */
'e', /* Except mchar */
'I', /* Invex mchar */
IRCD_CIDR_BANS | IRCD_HOLDNICK /* Flags */
@ -58,7 +58,6 @@ struct cmode_ elemental_mode_list[] = {
{ 'L', CMODE_EXLIMIT},
{ 'P', CMODE_PERM },
{ 'F', CMODE_FTARGET},
{ 'Q', CMODE_DISFWD },
{ 'M', CMODE_IMMUNE },
{ 'C', CMODE_NOCTCP },
{ 'A', CMODE_ADMINONLY },
@ -75,7 +74,7 @@ struct cmode_ elemental_mode_list[] = {
};
struct cmode_ elemental_status_mode_list[] = {
{ 'y', CSTATUS_OWNER },
{ 'q', CSTATUS_OWNER },
{ 'a', CSTATUS_PROTECT },
{ 'o', CSTATUS_OP },
{ 'h', CSTATUS_HALFOP },
@ -85,7 +84,7 @@ struct cmode_ elemental_status_mode_list[] = {
struct cmode_ elemental_prefix_mode_list[] = {
{ '~', CSTATUS_OWNER },
{ '!', CSTATUS_PROTECT },
{ '&', CSTATUS_PROTECT },
{ '@', CSTATUS_OP },
{ '%', CSTATUS_HALFOP },
{ '+', CSTATUS_VOICE },

View File

@ -553,7 +553,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
fl |= CHFL_OWNER;
s++;
}
else if(*s == '!')
else if(*s == '&')
{
fl |= CHFL_ADMIN;
s++;
@ -601,7 +601,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
}
else if(fl & CHFL_ADMIN)
{
*ptr_uid++ = '!';
*ptr_uid++ = '&';
len_nick++;
len_uid++;
}
@ -647,7 +647,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
if(fl & CHFL_OWNER)
{
*mbuf++ = 'y';
*mbuf++ = 'q';
para[pargs++] = target_p->name;
if(fl & CHFL_ADMIN)
@ -1139,7 +1139,7 @@ remove_our_modes(struct Channel *chptr, struct Client *source_p)
{
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

@ -653,7 +653,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

@ -195,8 +195,8 @@ find_channel_status(struct membership *msptr, int combine)
if(is_admin(msptr))
{
if(!combine)
return "!";
*p++ = '!';
return "&";
*p++ = '&';
}
if(is_chanop(msptr))

View File

@ -150,13 +150,13 @@ 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" : "",
ConfigChannel.use_halfop ? "h" : "",
strchr(ConfigChannel.disabledmodes, 'j') ? "" : "j",
strchr(ConfigChannel.disabledmodes, 'q') ? "" : "q",
strchr(ConfigChannel.disabledmodes, 'Q') ? "" : "Q",
ConfigChannel.use_invex ? "I" : "");
}
@ -1968,7 +1968,7 @@ struct ChannelMode chmode_table[256] =
{chm_nosuch, 0 }, /* N */
{chm_nosuch, 0 }, /* O */
{chm_staff, MODE_PERMANENT }, /* P */
{chm_simple, MODE_DISFORWARD }, /* Q */
{chm_ban, CHFL_QUIET }, /* Q */
{chm_nosuch, 0 }, /* R */
{chm_nosuch, 0 }, /* S */
{chm_simple, MODE_NONOTICE }, /* T */
@ -2000,7 +2000,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 */
@ -2008,7 +2008,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

@ -1538,7 +1538,7 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use
if(is_owner(mscptr))
{
*mptr++ = 'y';
*mptr++ = 'q';
strcat(modeval, nick);
strcat(modeval, " ");
}

View File

@ -260,11 +260,11 @@ 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 ? "~" : "",
ConfigChannel.use_admin ? "!" : "",
ConfigChannel.use_admin ? "&" : "",
ConfigChannel.use_halfop ? "%" : "");
return result;
}
@ -274,7 +274,7 @@ isupport_maxlist(const void *ptr)
{
static char result[30];
rb_snprintf(result, sizeof result, "bq%s%s:%i",
rb_snprintf(result, sizeof result, "bQ%s%s:%i",
ConfigChannel.use_except ? "e" : "",
ConfigChannel.use_invex ? "I" : "",
ConfigChannel.max_bans);
@ -313,7 +313,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;
}
@ -332,7 +332,7 @@ init_isupport(void)
add_isupport("CHANMODES", isupport_chanmodes, NULL);
add_isupport("CHANLIMIT", isupport_chanlimit, NULL);
add_isupport("PREFIX", isupport_prefix, NULL);
add_isupport("OWNER", isupport_ownermode, NULL);
//add_isupport("OWNER", isupport_ownermode, NULL);
add_isupport("MAXLIST", isupport_maxlist, NULL);
add_isupport("MODES", isupport_intptr, &maxmodes);
add_isupport("NETWORK", isupport_stringptr, &ServerInfo.network_name);