Commits

jdhore committed 66160b0 Merge

Branch Merge

Comments (0)

Files changed (7)

   will just get the help index and that's it on /quote help.
 
 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
 - Override no longer alows overriding opers to talk through +q, +m, etc.
 - All module management commands (MODLOAD, MODLIST, MODUNLOAD, MODRELOAD and
   MODRESTART) can be executed remotely. See the appropriate helpfile for
   details.
+- OMODE can now set and unset +ah.
+- OJOIN now works with !#channel and %#channel.
+- Staff channelmodes (+AO) now require chanops to set.
 
 other
 - Added a strip_unprintable function to make evasion of cmodes +G and +K
   less trivial.
 - 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
   can be disabled and the old behavior can be used by setting the
   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
 
 Todo list for ShadowIRCd 6.1
 -----------------------------
-* update ojoin/omode/etc to use +ah
 * notice/message !#channel and %#channel
 * Add a disable_oper option to auth {} to not allow users in that auth block
   to use OPER.

extensions/README

                  Syntax: OACCEPT <nick>
 
 m_ojoin.c      - OJOIN - Join a channel through any modes or limits with 
-                         an optional status (@+)
+                         an optional status (!@%+)
                  Syntax: OJOIN [status]<channel>
 
 m_olist.c      - OLIST - Lists channels like LIST, but shows hidden

extensions/m_ojoin.c

 		return 0;
 	}
 
-	if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
+	if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+' || *parv[1] == '!')
 	{
 		parv[1]++;
 		move_me = 1;
 			me.name, parv[1],
 			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);
 		sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
 				     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] == '+')
 	{
 		add_user_to_channel(chptr, source_p, CHFL_VOICE);

extensions/m_omode.c

 	set_channel_mode(client_p, source_p->servptr, chptr, msptr, 
 			 parc - 2, parv + 2);
 #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 */
 		if (!wasonchannel)
 				source_p->id);
 		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 */
 		if (wasonchannel)
-			msptr->flags |= CHFL_CHANOP;
+			msptr->flags |= CHFL_ADMIN;
 		else
 		{
 			add_user_to_channel(chptr, source_p, CHFL_CHANOP);
 		 * 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)
+			msptr->flags |= CHFL_CHANOP;
+		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_CHANOP;
 		else
 			remove_user_from_channel(msptr);

help/opers/snomask

 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
 -----------------------------------------------------------------
        +C     - Extended local client connections and exits
        +d     - Server debug messages
        +f     - Clients refused due to limits
+     ? +F     - Global client connections and exits
        +k     - Server and service kill messages
        +n     - Local client nick changes
        +r     - Invalid usernames and dumb HTTP proxies
        +s     - Generic server messages and oper kills
        +u     - Client connections without auth{} block
+     ? +W     - Shows whenever someone does a local whois on you
        +x     - New server introduction and split messages
        +y     - Juped channel join attempts, etc
        +Z     - Operspy usage
 	  int alevel, int parc, int *parn,
 	  const char **parv, int *errors, int dir, char c, long mode_type)
 {
+	int override = 0;
+
 	if(!IsOper(source_p) && !IsServer(source_p))
 	{
 		if(!(*errors & SM_ERR_NOPRIVS))
 		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))
 		return;
 
 		mode_changes[mode_count].nocaps = 0;
 		mode_changes[mode_count].id = NULL;
 		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;
 	}
 	else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
 		mode_changes[mode_count].caps = 0;
 		mode_changes[mode_count].nocaps = 0;
 		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++].arg = NULL;
 	}