From a7738ac0d152aecfb87ac0c72ed064ca1726756d Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 23 Apr 2008 18:31:02 +0200 Subject: [PATCH 1/8] Mention dline/undline with remoteban oper privilege. --- doc/sgml/oper-guide/oprivs.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/sgml/oper-guide/oprivs.sgml b/doc/sgml/oper-guide/oprivs.sgml index 7a7654be9..827a4b25d 100644 --- a/doc/sgml/oper-guide/oprivs.sgml +++ b/doc/sgml/oper-guide/oprivs.sgml @@ -18,9 +18,9 @@ remoteban (B), set remote bans - This grants the ability to use the ON argument on KLINE/XLINE/RESV - and UNKLINE/UNXLINE/UNRESV to set and unset bans on other servers, - and the server argument on REHASH. + This grants the ability to use the ON argument on + DLINE/KLINE/XLINE/RESV and UNDLINE/UNKLINE/UNXLINE/UNRESV to set + and unset bans on other servers, and the server argument on REHASH. This is only allowed if the oper may perform the action locally, and if the remote server has a shared{} block. From 3c71ce9d23033ac71c35d14291b12d9ff618724f Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 23 Apr 2008 18:31:34 +0200 Subject: [PATCH 2/8] Mention undline more clearly with unkline oper privilege. --- doc/sgml/oper-guide/oprivs.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/sgml/oper-guide/oprivs.sgml b/doc/sgml/oper-guide/oprivs.sgml index 827a4b25d..fb5213e41 100644 --- a/doc/sgml/oper-guide/oprivs.sgml +++ b/doc/sgml/oper-guide/oprivs.sgml @@ -133,7 +133,7 @@ - unkline (U), unkline + unkline (U), unkline and undline Allows using UNKLINE and UNDLINE. From 2cfb7214ee9a5ae84bc69943fd0656af640bfa48 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 23 Apr 2008 18:32:46 +0200 Subject: [PATCH 3/8] Require remoteban privilege to send dline/undline to other servers. --- modules/m_dline.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/m_dline.c b/modules/m_dline.c index f7f0945eb..ef7c1cdc0 100644 --- a/modules/m_dline.c +++ b/modules/m_dline.c @@ -100,6 +100,13 @@ mo_dline(struct Client *client_p, struct Client *source_p, if(parc >= loc+2 && !irccmp(parv[loc], "ON")) { + if(!IsOperRemoteBan(source_p)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "remoteban"); + return 0; + } + target_server = parv[loc+1]; loc += 2; } @@ -145,6 +152,13 @@ mo_undline(struct Client *client_p, struct Client *source_p, int parc, const cha if(parc >= 4 && !irccmp(parv[2], "ON")) { + if(!IsOperRemoteBan(source_p)) + { + sendto_one(source_p, form_str(ERR_NOPRIVS), + me.name, source_p->name, "remoteban"); + return 0; + } + target_server = parv[3]; sendto_match_servs(source_p, target_server, CAP_ENCAP, NOCAPS, From 80a12aea20ffe2f9e8487a6c7a4af72db7edf61a Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 24 Apr 2008 23:47:27 +0200 Subject: [PATCH 4/8] Mention potential version differences explicitly. --- help/opers/privs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/help/opers/privs b/help/opers/privs index ecb09ea32..1bf575e43 100644 --- a/help/opers/privs +++ b/help/opers/privs @@ -7,5 +7,6 @@ block, the name of the operator block and those privileges from the auth block that have an effect after the initial connection. -If the server the nick is on does not support this -extension, you will not receive a reply. +The exact format depends on the server the nick is on; +if it does not support this extension, you will not +receive a reply. From ae71856b5328532db06024bb1040ffe1136f8876 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 24 Apr 2008 23:58:47 +0200 Subject: [PATCH 5/8] Document PRIVS command in sgml. --- doc/sgml/oper-guide/commands.sgml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/sgml/oper-guide/commands.sgml b/doc/sgml/oper-guide/commands.sgml index e26edf7c2..eabf734d9 100644 --- a/doc/sgml/oper-guide/commands.sgml +++ b/doc/sgml/oper-guide/commands.sgml @@ -631,6 +631,27 @@ no target is specified. + + PRIVS + + PRIVS + nick + + + Displays effective operator privileges for + the specified nick, or for yourself if no nick is + given. This includes all privileges from the operator + block, the name of the operator block and those + privileges from the auth block that have an effect + after the initial connection. + + + The exact output depends on the server the nick is on, + see the matching version of this document. + If the remote server does not support this extension, you will not + receive a reply. + + MASKTRACE From 4bf178c50c83dd2f057ff9c682c4cfd55efd7739 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 25 Apr 2008 14:17:32 +0200 Subject: [PATCH 6/8] Copy makerelease scripts from atheme-services and adapt them. --- scripts/application.sh | 33 ++++++++++++++ scripts/makerelease.sh | 100 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100755 scripts/application.sh create mode 100755 scripts/makerelease.sh diff --git a/scripts/application.sh b/scripts/application.sh new file mode 100755 index 000000000..f3da0b7dd --- /dev/null +++ b/scripts/application.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# application.sh: Special package building rules for charybdis. +# +# Copyright (c) 2007-2008 atheme.org +# +# Permission to use, copy, modify, and/or distribute this software for +# any purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +if [ "x$TIP" = "x" ]; then + echo "Please don't run me directly." + exit +fi + +# Charybdis wants the hg tip to be in include/serno.h, in its own format. +MYTIP=`hg parents --template '#date|shortdate#_#node|short#' 2>/dev/null | sed -e s/-//g -e s/_/-/` +echo "[atheme-services] Generating include/serno.h for tip $MYTIP." +cat << _EOF_ > include/serno.h +/* Generated automatically by makepackage. Any changes made here will be lost. */ +#define SERNO "$MYTIP" +_EOF_ diff --git a/scripts/makerelease.sh b/scripts/makerelease.sh new file mode 100755 index 000000000..716b57d69 --- /dev/null +++ b/scripts/makerelease.sh @@ -0,0 +1,100 @@ +#!/bin/sh +# mkrelease.sh: Creates a release suitable for distfiles.atheme.org. +# +# Copyright (c) 2007 atheme.org +# +# Permission to use, copy, modify, and/or distribute this software for +# any purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +if [ "x$1" = "x" ]; then + echo "usage: $0 releasename [--automatic]" + exit +else + RELEASENAME="$1" +fi + +if [ "x$2" = "x--automatic" ]; then + AUTOMATIC="yes" +fi + +TIP=`hg tip --template "#rev#:#node|short#"` + +WRKDIR=`pwd` + +if [ -d $RELEASENAME ]; then + echo "Deleting previous release named $RELEASENAME." + rm -rf $WRKDIR/$RELEASENAME/ +fi + +echo "Making release named $RELEASENAME (tip $TIP)" + +echo +echo "Building root: $RELEASENAME/" +hg archive $RELEASENAME +cd $RELEASENAME +sh autogen.sh +rm -rf autogen.sh autom4te.cache + +# Run application specific instructions here. +if [ -x "$WRKDIR/application.sh" ]; then + . $WRKDIR/application.sh +fi + +cd .. + +echo "Building $RELEASENAME.tgz from $RELEASENAME/" +tar zcf $RELEASENAME.tgz $RELEASENAME/ + +echo "Building $RELEASENAME.tbz2 from $RELEASENAME/" +tar jcf $RELEASENAME.tbz2 $RELEASENAME/ + +PUBLISH="yes" + +ok="0" +if [ "x$AUTOMATIC" != "xyes" ]; then + echo + echo "Would you like to publish these releases now?" + while [ $ok -eq 0 ]; do + echo -n "[$PUBLISH] " + + read INPUT + case $INPUT in + [Yy]*) + PUBLISH="yes" + ok=1 + ;; + [Nn]*) + PUBLISH="no" + ok=1 + ;; + esac + done +fi + +if [ "x$PUBLISH" = "xyes" ]; then + scp $RELEASENAME.tgz distfiles-master.atheme.org:/srv/distfiles + scp $RELEASENAME.tbz2 distfiles-master.atheme.org:/srv/distfiles + + echo + echo "The releases have been published, and will be available to the entire" + echo "distribution network within 15 minutes." +fi + +echo +echo "Done. If you have any bugs to report, report them against" +echo "the distfiles.atheme.org component at http://bugzilla.atheme.org" +echo "Thanks!" +echo From bb26095d634931ba7a01ec75666afb131a142ace Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 25 Apr 2008 14:24:33 +0200 Subject: [PATCH 7/8] Global server notices already exist. (: ENCAP SNOTE :) --- TODO | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/TODO b/TODO index 1d31c8b63..73b0614b5 100644 --- a/TODO +++ b/TODO @@ -40,8 +40,5 @@ [?] somehow hide channel operators like ircnet can do? [x] merge m_join.c and m_sjoin.c in one module (same functions, done in ratbox3) [x] create chmode.h and put there all declarations of chm_* - this will make some modules clean -[F] Move most use of server WALLOPS to a global mechanism. - [F] Add SNONOTICE protocol command (like in InspIRCd) to broadcast to a specific SNOMASK. - (Using ENCAP?) - [F] Adopt commands to this framework. +[?] Move oper override server WALLOPS to global server notices? From 4a8f930e5a81d7b8eaed3998bd54e186e293d700 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 25 Apr 2008 14:38:53 +0200 Subject: [PATCH 8/8] Added tag charybdis-3.0.0-rc1 for changeset 7aef7b002131 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index ce8871182..85d2c4dd8 100644 --- a/.hgtags +++ b/.hgtags @@ -1 +1,2 @@ 47f12ac9988a5face261827531851051af48968f charybdis-3.0.0-beta1 +7aef7b002131a0e536913663dd814c0b28bbfc33 charybdis-3.0.0-rc1