Branch Merge

This commit is contained in:
JD Horelick 2010-04-04 16:25:20 -04:00
commit 015b28a06c
7 changed files with 120 additions and 11 deletions

12
NEWS
View File

@ -17,7 +17,9 @@ new configuration options
will just get the help index and that's it on /quote help. will just get the help index and that's it on /quote help.
new commands new commands
- /CYCLE - server-side /CYCLE, also called /HOP in some clients/servers. - CYCLE #channel - server-side CYCLE, also called HOP in some clients/servers.
Parts the user from the given channel, then joins them to it immediately after.
Enabled by loading extensions/m_cycle.
opers opers
- Override no longer alows overriding opers to talk through +q, +m, etc. - Override no longer alows overriding opers to talk through +q, +m, etc.
@ -30,14 +32,22 @@ opers
- All module management commands (MODLOAD, MODLIST, MODUNLOAD, MODRELOAD and - All module management commands (MODLOAD, MODLIST, MODUNLOAD, MODRELOAD and
MODRESTART) can be executed remotely. See the appropriate helpfile for MODRESTART) can be executed remotely. See the appropriate helpfile for
details. details.
- OMODE can now set and unset +ah.
- OJOIN now works with !#channel and %#channel.
- Staff channelmodes (+AO) now require chanops to set.
other other
- Added a strip_unprintable function to make evasion of cmodes +G and +K - Added a strip_unprintable function to make evasion of cmodes +G and +K
less trivial. less trivial.
- Massive helpfile updates. - Massive helpfile updates.
- Added SVSJOIN s2s command. This allows things like atheme's ns_ajoin
to work on shadowircd.
- Added BAN stuff (propogated bans on burst) from charybdis trunk. This - Added BAN stuff (propogated bans on burst) from charybdis trunk. This
can be disabled and the old behavior can be used by setting the can be disabled and the old behavior can be used by setting the
general::use_propogated_bans option to no. general::use_propogated_bans option to no.
- The --enable-small-net configure option is now enabled by default.
If you wish to disable small net mode, pass --disable-small-net to
configure.
-- shadowircd-6.0.0 -- shadowircd-6.0.0

View File

@ -1,6 +1,5 @@
Todo list for ShadowIRCd 6.1 Todo list for ShadowIRCd 6.1
----------------------------- -----------------------------
* update ojoin/omode/etc to use +ah
* notice/message !#channel and %#channel * notice/message !#channel and %#channel
* Add a disable_oper option to auth {} to not allow users in that auth block * Add a disable_oper option to auth {} to not allow users in that auth block
to use OPER. to use OPER.

View File

@ -36,7 +36,7 @@ m_oaccept.c - OACCEPT - Add metadata to a user that will allow you to
Syntax: OACCEPT <nick> Syntax: OACCEPT <nick>
m_ojoin.c - OJOIN - Join a channel through any modes or limits with m_ojoin.c - OJOIN - Join a channel through any modes or limits with
an optional status (@+) an optional status (!@%+)
Syntax: OJOIN [status]<channel> Syntax: OJOIN [status]<channel>
m_olist.c - OLIST - Lists channels like LIST, but shows hidden m_olist.c - OLIST - Lists channels like LIST, but shows hidden

View File

@ -65,7 +65,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
return 0; return 0;
} }
if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+') if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+' || *parv[1] == '!')
{ {
parv[1]++; parv[1]++;
move_me = 1; move_me = 1;
@ -98,7 +98,20 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
me.name, parv[1], me.name, parv[1],
source_p->name, source_p->username, source_p->host); source_p->name, source_p->username, source_p->host);
if(*parv[1] == '@') if(*parv[1] == '!' && ConfigChannel.use_admin)
{
add_user_to_channel(chptr, source_p, CHFL_ADMIN);
sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s SJOIN %ld %s + :!%s",
me.id, (long) chptr->channelts, chptr->chname, source_p->id);
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 +a %s",
me.name, chptr->chname, source_p->name);
}
else if(*parv[1] == '@')
{ {
add_user_to_channel(chptr, source_p, CHFL_CHANOP); add_user_to_channel(chptr, source_p, CHFL_CHANOP);
sendto_server(client_p, chptr, CAP_TS6, NOCAPS, sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
@ -111,6 +124,18 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
me.name, chptr->chname, source_p->name); me.name, chptr->chname, source_p->name);
} }
else if(*parv[1] == '%' && ConfigChannel.use_halfop)
{
add_user_to_channel(chptr, source_p, CHFL_HALFOP);
sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
":%s SJOIN %ld %s + :%s%s",
me.id, (long) chptr->channelts, chptr->chname, "%", source_p->id);
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 +h %s",
me.name, chptr->chname, source_p->name);
}
else if(*parv[1] == '+') else if(*parv[1] == '+')
{ {
add_user_to_channel(chptr, source_p, CHFL_VOICE); add_user_to_channel(chptr, source_p, CHFL_VOICE);

View File

@ -124,7 +124,24 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
set_channel_mode(client_p, source_p->servptr, chptr, msptr, set_channel_mode(client_p, source_p->servptr, chptr, msptr,
parc - 2, parv + 2); parc - 2, parv + 2);
#else #else
if (parc == 4 && !strcmp(parv[2], "+o") && !irccmp(parv[3], source_p->name)) if (parc == 4 && !strcmp(parv[2], "+a") && !irccmp(parv[3], source_p->name))
{
/* Admining 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 +a %s",
me.name, parv[1], source_p->name);
sendto_server(NULL, chptr, CAP_TS6, NOCAPS,
":%s TMODE %ld %s +a %s",
me.id, (long) chptr->channelts, parv[1],
source_p->id);
msptr->flags |= CHFL_ADMIN;
}
else if (parc == 4 && !strcmp(parv[2], "+o") && !irccmp(parv[3], source_p->name))
{ {
/* Opping themselves */ /* Opping themselves */
if (!wasonchannel) if (!wasonchannel)
@ -141,9 +158,47 @@ mo_omode(struct Client *client_p, struct Client *source_p, int parc, const char
source_p->id); source_p->id);
msptr->flags |= CHFL_CHANOP; msptr->flags |= CHFL_CHANOP;
} }
else else if (parc == 4 && !strcmp(parv[2], "+h") && !irccmp(parv[3], source_p->name))
{
/* Halfopping 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 +h %s",
me.name, parv[1], source_p->name);
sendto_server(NULL, chptr, CAP_TS6, NOCAPS,
":%s TMODE %ld %s +h %s",
me.id, (long) chptr->channelts, parv[1],
source_p->id);
msptr->flags |= CHFL_HALFOP;
}
else if (ConfigChannel.use_admin)
{ {
/* Hack it so set_channel_mode() will accept */ /* Hack it so set_channel_mode() will accept */
if (wasonchannel)
msptr->flags |= CHFL_ADMIN;
else
{
add_user_to_channel(chptr, source_p, CHFL_CHANOP);
msptr = find_channel_membership(chptr, source_p);
}
set_channel_mode(client_p, source_p, chptr, msptr,
parc - 2, parv + 2);
/* We know they were not opped before and they can't have opped
* themselves as set_channel_mode() does not allow that
* -- jilles */
if (wasonchannel)
msptr->flags &= ~CHFL_ADMIN;
else
remove_user_from_channel(msptr);
}
else
{
/* CHFL_ADMIN is only useful if admin is enabled
* so hack it with op if it is not. */
if (wasonchannel) if (wasonchannel)
msptr->flags |= CHFL_CHANOP; msptr->flags |= CHFL_CHANOP;
else else

View File

@ -1,6 +1,8 @@
MODE <nick> +s <+|-><modes> MODE <nick> +s <+|-><modes>
Server notice masks: Server notice masks: (? designates that the snomask is provided
by an extension and may not be present on
this server)
SNOMASK DESCRIPTION SNOMASK DESCRIPTION
----------------------------------------------------------------- -----------------------------------------------------------------
@ -9,11 +11,13 @@ Server notice masks:
+C - Extended local client connections and exits +C - Extended local client connections and exits
+d - Server debug messages +d - Server debug messages
+f - Clients refused due to limits +f - Clients refused due to limits
? +F - Global client connections and exits
+k - Server and service kill messages +k - Server and service kill messages
+n - Local client nick changes +n - Local client nick changes
+r - Invalid usernames and dumb HTTP proxies +r - Invalid usernames and dumb HTTP proxies
+s - Generic server messages and oper kills +s - Generic server messages and oper kills
+u - Client connections without auth{} block +u - Client connections without auth{} block
? +W - Shows whenever someone does a local whois on you
+x - New server introduction and split messages +x - New server introduction and split messages
+y - Juped channel join attempts, etc +y - Juped channel join attempts, etc
+Z - Operspy usage +Z - Operspy usage

View File

@ -671,6 +671,8 @@ chm_staff(struct Client *source_p, struct Channel *chptr,
int alevel, int parc, int *parn, int alevel, int parc, int *parn,
const char **parv, int *errors, int dir, char c, long mode_type) const char **parv, int *errors, int dir, char c, long mode_type)
{ {
int override = 0;
if(!IsOper(source_p) && !IsServer(source_p)) if(!IsOper(source_p) && !IsServer(source_p))
{ {
if(!(*errors & SM_ERR_NOPRIVS)) if(!(*errors & SM_ERR_NOPRIVS))
@ -687,6 +689,20 @@ chm_staff(struct Client *source_p, struct Channel *chptr,
return; return;
} }
if(alevel != CHFL_CHANOP && alevel != CHFL_ADMIN && alevel != CHFL_HALFOP)
{
if (IsOverride(source_p))
override = 1;
else
{
if(!(*errors & SM_ERR_NOOPS))
sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
me.name, source_p->name, chptr->chname);
*errors |= SM_ERR_NOOPS;
return;
}
}
if(MyClient(source_p) && (++mode_limit_simple > MAXMODES_SIMPLE)) if(MyClient(source_p) && (++mode_limit_simple > MAXMODES_SIMPLE))
return; return;
@ -701,7 +717,7 @@ chm_staff(struct Client *source_p, struct Channel *chptr,
mode_changes[mode_count].nocaps = 0; mode_changes[mode_count].nocaps = 0;
mode_changes[mode_count].id = NULL; mode_changes[mode_count].id = NULL;
mode_changes[mode_count].mems = ALL_MEMBERS; mode_changes[mode_count].mems = ALL_MEMBERS;
mode_changes[mode_count].override = 0; mode_changes[mode_count].override = override;
mode_changes[mode_count++].arg = NULL; mode_changes[mode_count++].arg = NULL;
} }
else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type)) else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
@ -713,7 +729,7 @@ chm_staff(struct Client *source_p, struct Channel *chptr,
mode_changes[mode_count].caps = 0; mode_changes[mode_count].caps = 0;
mode_changes[mode_count].nocaps = 0; mode_changes[mode_count].nocaps = 0;
mode_changes[mode_count].mems = ALL_MEMBERS; mode_changes[mode_count].mems = ALL_MEMBERS;
mode_changes[mode_count].override = 0; mode_changes[mode_count].override = override;
mode_changes[mode_count].id = NULL; mode_changes[mode_count].id = NULL;
mode_changes[mode_count++].arg = NULL; mode_changes[mode_count++].arg = NULL;
} }