From 948b4e61ade01711882bd95b9f871e34f293ffaf Mon Sep 17 00:00:00 2001
From: Bram Matthys
Date: Fri, 21 Nov 2003 15:13:45 +0000
Subject: [PATCH] - Added comment regarding MLOCK and set::restrict-chanmodes
in unreal32docs.html. - Made PREFIX_AQ a ./Config question at *NIX and
enabled it by default at Win32.
---
Changes | 2 ++
Config | 39 +++++++++++++++++++++++++++++++++++++++
autoconf/configure.in | 1 +
configure | 9 +++++++++
doc/unreal32docs.html | 7 +++++--
include/config.h | 10 ----------
include/setup.h.in | 3 +++
include/win32/setup.h | 1 +
src/s_serv.c | 4 ++--
9 files changed, 62 insertions(+), 14 deletions(-)
diff --git a/Changes b/Changes
index 6827b99e6..bddd85317 100644
--- a/Changes
+++ b/Changes
@@ -2591,3 +2591,5 @@ seen. gmtime warning still there
- A few example.conf changes.
- Fixed a compile problem on alpha, reported by Hyperi (#0001374).
- Made "operator count bug" not notice all opers (log only), unless in debugmode.
+- Added comment regarding MLOCK and set::restrict-chanmodes in unreal32docs.html.
+- Made PREFIX_AQ a ./Config question at *NIX and enabled it by default at Win32.
diff --git a/Config b/Config
index 05d6f70d0..0d163a88e 100755
--- a/Config
+++ b/Config
@@ -42,6 +42,9 @@ fi
if [ "$INET6" = "1" ] ; then
ARG="$ARG--enable-inet6 "
fi
+if [ "$PREFIXAQ" = "1" ]; then
+ARG="$ARG--enable-prefixaq "
+fi
ARG="$ARG--with-listen=$LISTEN_SIZE "
ARG="$ARG--with-dpath=$DPATH "
ARG="$ARG--with-spath=$SPATH "
@@ -86,6 +89,7 @@ MAXSENDQLENGTH="3000000"
BUFFERPOOL="18"
MAXCONNECTIONS="1024"
INET6=""
+PREFIXAQ=""
EXTRAPARA=""
if [ "`eval echo -n 'a'`" = "-n a" ] ; then
c="\c"
@@ -382,6 +386,40 @@ else
fi
fi
+TEST=""
+while [ -z "$TEST" ] ; do
+ if [ "$PREFIXAQ" = "1" ] ; then
+ TEST="Yes"
+ else
+ TEST="No"
+ fi
+ echo ""
+ echo "Do you want to enable prefixes for chanadmin and chanowner?"
+ echo "This will give +a the & prefix and ~ for +q (just like +o is @)"
+ echo "Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient, PJIRC, etc.)"
+ echo "with the notable exceptions of irssi, KVIrc and CGI:IRC."
+ echo "This feature should be enabled/disabled network-wide."
+ echo $n "[$TEST] -> $c"
+ read cc
+ if [ -z "$cc" ] ; then
+ cc=$TEST
+ fi
+ case "$cc" in
+ [Yy]*)
+ PREFIXAQ="1"
+ ;;
+ [Nn]*)
+ PREFIXAQ=""
+ ;;
+ *)
+ echo ""
+ echo "You must enter either Yes or No"
+ TEST=""
+ ;;
+ esac
+done
+
+
TEST=""
while [ -z "$TEST" ] ; do
TEST="$LISTEN_SIZE"
@@ -514,6 +552,7 @@ NOSPOOF="$NOSPOOF"
DPATH="$DPATH"
SPATH="$SPATH"
INET6="$INET6"
+PREFIXAQ="$PREFIXAQ"
LISTEN_SIZE="$LISTEN_SIZE"
MAXSENDQLENGTH="$MAXSENDQLENGTH"
BUFFERPOOL="$BUFFERPOOL"
diff --git a/autoconf/configure.in b/autoconf/configure.in
index f6e4a994a..1abd6e593 100644
--- a/autoconf/configure.in
+++ b/autoconf/configure.in
@@ -337,6 +337,7 @@ AC_DEFINE_UNQUOTED(MAXCONNECTIONS, $ac_fd)
AC_ARG_WITH(spath, [ --with-spath Specify the location of the executable],
AC_DEFINE_UNQUOTED(SPATH,"$withval") BINDIR="$withval",AC_DEFINE_UNQUOTED(SPATH,"`pwd`/src/ircd") BINDIR="`pwd`/src/ircd")
AC_ARG_ENABLE(nospoof, [ --enable-nospoof Enable spoofing protection], AC_DEFINE(NOSPOOF))
+AC_ARG_ENABLE(prefixaq, [ --enable-prefixaq Enable chanadmin and chanprot prefixes], AC_DEFINE(PREFIX_AQ))
AC_ARG_ENABLE(hub, [ --enable-hub Compile as a hub server], AC_DEFINE(HUB))
CHECK_SSL
CHECK_ZLIB
diff --git a/configure b/configure
index 903e93c1e..1a5b460a5 100755
--- a/configure
+++ b/configure
@@ -823,6 +823,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-nospoof Enable spoofing protection
+ --enable-prefixaq Enable chanadmin and chanprot prefixes
--enable-hub Compile as a hub server
--enable-ssl enable ssl will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr
@@ -9489,6 +9490,14 @@ if test "${enable_nospoof+set}" = set; then
#define NOSPOOF 1
_ACEOF
+fi;
+# Check whether --enable-prefixaq or --disable-prefixaq was given.
+if test "${enable_prefixaq+set}" = set; then
+ enableval="$enable_prefixaq"
+ cat >>confdefs.h <<\_ACEOF
+#define PREFIX_AQ 1
+_ACEOF
+
fi;
# Check whether --enable-hub or --disable-hub was given.
if test "${enable_hub+set}" = set; then
diff --git a/doc/unreal32docs.html b/doc/unreal32docs.html
index 156914e11..1d0d26374 100644
--- a/doc/unreal32docs.html
+++ b/doc/unreal32docs.html
@@ -21,7 +21,7 @@
http://www.unrealircd.com
Version: 3.2
Current Version: 3.2 Beta18
- Last doc update: 2003-11-18
+ Last doc update: 2003-11-21
Head Coders: Stskeeps / codemastr / Syzop / Luke / McSkaf
Contributors: Zogg / NiQuiL / assyrian / chasm / DrBin / llthangel / Griever / nighthawk
Documentation: CKnight^ / Syzop
@@ -1796,7 +1796,10 @@ set {
set::restrict-channelmodes <modes>
Restrict users to set/unset the channelmodes listed here (don't use + or -).
For example you can set +G in modes-on-join and G in restrict-channelmodes,
- that way you can force all (new) channels to be +G and unable to do -G.
+ that way you can force all (new) channels to be +G and unable to do -G.
+ NOTE: it may still be possible to use these channelmodes trough services
+ by using MLOCK. Unfortunately we can't do much about that, you would have
+ to ask the services coders to implement a restrict-channelmodes feature too.
set::auto-join <channels>;
The channel(s) a user will be forced to join at connection. To specify more
than one channel use a comma separated list.
diff --git a/include/config.h b/include/config.h
index b0132e171..4802ce426 100644
--- a/include/config.h
+++ b/include/config.h
@@ -70,16 +70,6 @@
#undef NO_FDLIST
-/* Defining this implements a very different handling of channel modes +a and +q.
- * When set, users who are +q will have prefix ~, and +a prefix &. Chmode +a and +q
- * now will also include all of the rights given to +o users, that is +oa is no longer
- * needed, +a is fine. Additionally, due to this change, it is recommended that you only
- * enable this option if you intend to enable it on ALL servers. At this time, this feature
- * is still considered experimental.
- */
-
-#undef PREFIX_AQ
-
/*
* Defining this will allow all ircops to see people in +s channels
* By default, only net/tech admins can see this
diff --git a/include/setup.h.in b/include/setup.h.in
index fed9a2341..a906007b3 100644
--- a/include/setup.h.in
+++ b/include/setup.h.in
@@ -195,6 +195,9 @@
/* Define if you want spoof protection */
#undef NOSPOOF
+/* Define if you want +a/+q prefixes */
+#undef PREFIX_AQ
+
/* Define if you want to compile as a hub */
#undef HUB
diff --git a/include/win32/setup.h b/include/win32/setup.h
index fbafd488f..8360e5ad3 100644
--- a/include/win32/setup.h
+++ b/include/win32/setup.h
@@ -48,4 +48,5 @@
#define DOMAINNAME "irc.net"
#define NO_U_TYPES
#define NEED_U_INT32_T
+#define PREFIX_AQ
#endif
diff --git a/src/s_serv.c b/src/s_serv.c
index 4b1f72bff..d20973815 100644
--- a/src/s_serv.c
+++ b/src/s_serv.c
@@ -1615,12 +1615,12 @@ void m_info_send(aClient *sptr)
me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| * codemastr ",
me.name, RPL_INFO, sptr->name);
+ sendto_one(sptr, ":%s %d %s :| * Syzop ",
+ me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| * Luke ",
me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| * McSkaf ",
me.name, RPL_INFO, sptr->name);
- sendto_one(sptr, ":%s %d %s :| * Syzop ",
- me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :|", me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| Contributors:", me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :|", me.name, RPL_INFO, sptr->name);