diff --git a/Changes b/Changes index 1f981281e..cc2162e1b 100644 --- a/Changes +++ b/Changes @@ -1691,3 +1691,4 @@ seen. gmtime warning still there - Changed the way return values work in conf3 to better report the number of errors that occurred. - Cleaned up some module code, also removed /module load|unload (just use /rehash) +- Removed makeconf diff --git a/makeconf b/makeconf deleted file mode 100755 index f478c0019..000000000 --- a/makeconf +++ /dev/null @@ -1,610 +0,0 @@ -#!/bin/sh -# $Id$ -# Defaults -# -TIME=`date +"%H:%M:%S %Z"` -DATE=`date +"%a, %b %e %Y"` -IRCDCONF="unrealircd.conf" -SERVNAME="Server.IRC.net" -COMMENT="IRC server!" -ADMIN="Admin-name" -ADMNICK="Admin" -ADMADDR="admin@no.where.com" -OPERNAME="admin" -OPERADDR="*@*" -OPERPASS="password" -NUMERIC="" -PORT="6667" -OPRT="default" -LINKPASS="linkpass" -VIRTUAL="1.2.3.4" -ENCRYPT="Yes" -FLAGS="OAZHWe" -RESTARTPASS="restartpass" -DIEPASS="diepass" -SERVICES="Services.IRC-Net.Org" - -# these are so I can use stuff like $1 without it replacing it...like by -# using $dlrsgn$uno for $1 -dlrsgn="$" -uno="1" -dos="2" - -# remove the temp file if it exists -rm -f mkconf.tmp - -# make a quick script for replacing one line with another - -cat > repl_str << __EOF__ -sed -e "s@^$dlrsgn$uno\(.*\)@$dlrsgn$dos" $IRCDCONF > mkconf.tmp -cp mkconf.tmp $IRCDCONF -rm mkconf.tmp -__EOF__ - -# mark repl_str as an executable -chmod +x repl_str -rm -f repl_str -# Checking out how to specify not to make a new line with the current OS -c='' -n='' -2>/dev/null -if [ "`eval echo -n 'a'`" = "-n a" ]; then - c='\c' -else - n='-n' -fi - -# we use a modified mkpasswd credit to Nelson Minar (minar@reed.edu) -# for creating the original mkpasswd -if test "x$CRYPT_OPER_PASSWORD" != "x" -o "x$CRYPT_LINK_PASSWORD" != "x" -o "x$CRYPT_XLINE_PASSWORD" != "x" ; then - cat > crypter.tmp.c << __EOF__ - #include - #include - int main(int argc, char *argv[]) - { - static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; - char salt[3]; - char *plaintext; - srandom(time(0)); - salt[0] = saltChars[random() % 64]; - salt[1] = saltChars[random() % 64]; - salt[2] = 0; - plaintext = argv[1]; - printf("%s", crypt(plaintext, salt)); - } -__EOF__ - cc crypter.tmp.c -o crypter.tmp -lcrypt - rm crypter.tmp.c -fi - -CONF=$IRCDCONF - -if [ -r "$CONF" ]; then - echo "$IRCDCONF found" - echo " " - echo " I don't suggest running this with the conf file already" - echo "existing, since you will lose all the data in your conf file." - echo "This script is just for creating one. If you want to recreate" - echo "a conf file, type 'recreate'." - echo $n " [exit] -> $c" - read cc - - if [ "$cc" != "recreate" ]; then - echo " " - echo " OK, do you want to edit $IRCDCONF using an editor?" - echo "If so, specify the editor you want to use. Otherwise," - echo "type 'exit'." - EDITFND="not found" - - if [ -r /usr/bin/pico ]; then - EDITFND="pico" - fi - - if [ -r /usr/bin/joe ]; then - EDITFND="joe" - fi - - if [ -r /usr/bin/vi ]; then - EDITFND="vi" - fi - - if [ -r /usr/bin/vim ]; then - EDITFND="vim" - fi - - while [ "c" = "c" ]; do - echo $n " [$EDITFND] -> $c" - read EDITOR - - if [ -z "$EDITOR" ]; then - EDITOR="$EDITFND" - fi - - if [ "$EDITOR" = "exit" ]; then - echo "Have a nice day." - exit 1 - fi - - if [ -f $EDITOR ]; then - $EDITOR $CONF - exit 1 - fi - - if [ -f /usr/bin/$EDITOR ]; then - /usr/bin/$EDITOR $CONF - exit 1 - fi - - echo " Editor not found. Specify a valid editor or" - echo "type 'exit' to quit this script." - done - - fi - - mv $CONF "$CONF.saved" - rm $CONF - echo "$IRCDCONF has been renamed to ircd.conf.saved" -else - echo "$IRCDCONF is not found. (good)" -fi - -clear -echo "|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|" -echo "| Welcome to the $IRCDCONF generator. |" -echo "|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|" -echo " " -echo "What will your server name be? (ie: $SERVNAME)" -echo $n " [$SERVNAME] -> $c" -read cc -if [ ! -z "$cc" ]; then - SERVNAME="$cc" -fi - -echo " " -echo "What is your IRC server's IP? (ie: $VIRTUAL)" -echo "Use * to bind to all interfaces" -echo $n " [$VIRTUAL] -> $c" -read cc -if [ ! -z "$cc" ]; then - VIRTUAL="$cc" -fi - -echo " " -echo "Server comment? (ie: Main Hub Server)" -echo $n " [$COMMENT] -> $c" -read cc -if [ ! -z "$cc" ]; then - COMMENT="$cc" -fi - -echo " " -echo "Main port? (ie: 6667)" -echo $n " [$PORT] -> $c" -read cc -if [ ! -z "$cc" ]; then - PORT="$cc" -fi - -echo " " -echo "What server numeric does the server have (range = 1..256)" -echo "Must NOT be the same as other servers you link with" -echo $n " [] -> $c" -read cc -if [ ! -z "$cc" ]; then - NUMERIC="$cc" -fi - -echo " " -echo "What is your real name? (ie: John Doe)" -echo $n " [$ADMIN] -> $c" -read cc -if [ ! -z "$cc" ]; then - ADMIN="$cc" -fi - -echo " " -echo "What is your IRC nickname? (ie: JD)" -echo $n " [$ADMNICK] -> $c" -read cc -if [ ! -z "$cc" ]; then - ADMNICK="$cc" -fi - -echo " " -echo "What is your e-mail address? (ie: john@doe.com)" -echo $n " [$ADMADDR] -> $c" -read cc -if [ ! -z "$cc" ]; then - ADMADDR="$cc" -fi - -echo " " -OPERNAME="$ADMNICK" -echo "What will your opername be for your O:line? (ie: johndoe)" -echo $n " [$OPERNAME] -> $c" -read cc -if [ ! -z "$cc" ]; then - OPERNAME="$cc" -fi - -echo " " -echo "What oper flags do you want to have? (ie: OAWZ)" -echo "Some flags to choose from:" -echo " o = local oper" -echo " O = global oper" -echo " N = network administrator" -echo " A = server administrator" -echo " C = co administrator" -echo " read unrealircd.doc for more info about O:line flags)" -echo $n " [$FLAGS] -> $c" -read cc -if [ ! -z "$cc" ]; then - FLAGS="$cc" -fi -#Don't ask if they use encrypted oper passes, we can tell if they do - -echo " " -echo "What will your /oper password be? (ie: snoopy67)" -echo $n " [$OPERPASS] -> $c" -read cc -if [ ! -z "$cc" ]; then - OPERPASS="$cc" -fi - -if [ "$CRYPT_OPER_PASSWORD" != "" ]; then - OPERPASS=`./crypter.tmp $OPERPASS` -fi - -echo " " -echo "What is your user@host mask on IRC? (ie: *@*.toronto.globalserve.net)" -echo $n " [$OPERADDR] -> $c" -read cc -if [ ! -z "$cc" ]; then - OPERADDR="$cc" -fi - -echo " " -echo "What do you want your die password to be?" -echo $n " [$DIEPASS] -> $c" -read cc -if [ ! -z "$cc" ]; then - DIEPASS="$cc" -fi - -if [ "$CRYPT_XLINE_PASSWORD" != "" ]; then - DIEPASS=`./crypter.tmp $cc` -fi - -echo " " -echo "What do you want your restart password to be?" -echo $n " [$RESTARTPASS] -> $c" -read cc -if [ ! -z "$cc" ]; then - RESTARTPASS="$cc" -fi -if [ "$CRYPT_XLINE_PASSWORD" != "" ]; then - RESTARTPASS=`./crypter.tmp $cc` -fi -echo " " -echo "If your running services, or linking to a network that has" -echo "services, please state the services servername." -echo "If you are running a non-services network, just type 'next'" -echo $n " [$SERVICES] -> $c" -read cc - -#if [ ! -z "$cc" ]; then -# SERVICES="$cc" -#fi - -if [ "$cc" = "next" ]; then - SERVICES="No.Services.Selected" -elif [ ! -z "$cc" ]; then - SERVICES="$cc" -fi - -cat > $CONF << __EOF__ -/* - * - * Filename: $IRCDCONF - * Created: $DATE - $TIME - * - */ - -/* Server Info */ -me { - name $SERVNAME; - info "$COMMENT"; -__EOF__ -if [ $NUMERIC != "" ]; then - echo " numeric $NUMERIC;" >> $CONF -fi -cat >> $CONF << __EOF__ -}; - -/* Admin Info */ -admin { - "$ADMIN"; - "$ADMNICK"; - "$ADMADDR"; -}; - -/* Classes */ -class clients { - pingfreq 90; - maxclients 245; - sendq 100000; -}; - -class servers { - pingfreq 300; - connfreq 600; - maxclients 5; - sendq 1000000; -}; - -/* Allow info */ -allow { - ip "*@*"; - hostname "*@*"; - class clients; -}; - -/* Die/Restart Password */ -drpass { - die "$DIEPASS"; - restart "$RESTARTPASS"; -}; - -oper $OPERNAME { - from { - userhost $OPERADDR; - }; - password "$OPERPASS"; - flags $FLAGS; - class clients; -}; - -__EOF__ - -echo "/* Links */" >> $CONF -echo " " -echo " Would you like to configure any servers for linking?" -echo "Type the servername, or type 'done' when finished." -echo $n " [done] -> $c" -read cc - -if [ -z "$cc" ]; then - cc="done" -fi - -while [ "$cc" != "done" ]; do - THESERV="$cc" - - SHOST="none" - while [ "$SHOST" = "none" ]; do - echo " " - echo "Hostname or ip for the other server? Must be specified." - echo $n " [] -> $c" - read SHOST - done - - echo " " - echo "Password to send to the other server?" - echo $n " [$LINKPASS] -> $c" - read CLP - if [ -z "$CLP" ]; then - CLP="$LINKPASS" - fi - if [ "$CRYPT_LINK_PASSWORD" != "" ]; then - CLP=`./crypter.tmp $cc` - fi - - echo " " - AUTOPORT="" - AUTOCONN="bad" - while [ "$AUTOCONN" = "bad" ]; do - echo " " - echo "Should we autconnect to this server?" - echo $n " [Yes] -> $c" - read cc - if [ -z "$cc" ]; then - cc="Yes" - fi - case "$cc" in - [Yy]*) - AUTOCONN="yes" - echo "What port should we autoconnect to?" - echo $n " [$PORT] -> $c" - read AUTOPORT - if [ -z "$AUTOPORT" ]; then - AUTOPORT="$PORT" - fi - ;; - [Nn]*) - AUTOCONN="no" - ;; - *) - echo "Please specify yes or no." - AUTOCONN="bad" - ;; - esac - done - - echo " " - HUB="bad" - while [ "$HUB" = "bad" ]; do - echo " " - echo "Will this server be a hub?" - echo $n " [Yes] -> $c" - read cc - if [ -z "$cc" ]; then - cc="Yes" - fi - case "$cc" in - [Yy]*) - HUB="Yes" - ;; - [Nn]*) - HUB="no" - ;; - *) - echo "Please specify yes or no." - HUB="bad" - ;; - esac - done - - echo "link $THESERV {" >> $CONF - USER=`echo $SHOST |sed -e 's/\(.*\)@.*/\1/'` - HOST=`echo $SHOST |sed -e 's/.*@\(.*\)/\1/'` - if [ "$USER" = "$SHOST" ]; then - echo " username *;" >> $CONF - echo " hostname $SHOST;" >> $CONF - else - echo " username $USER;" >> $CONF - echo " hostname $HOST;" >> $CONF - fi - - echo " bind-ip *;" >> $CONF - if [ "$AUTOPORT" != "" ]; then - echo " port $AUTOPORT;" >> $CONF - else - echo " port $PORT;" >> $CONF - fi - echo " password-connect \"$CLP\";" >> $CONF - echo " password-receive \"$CLP\";" >> $CONF - echo " class servers;" >> $CONF - if [ "$HUB" = "Yes" ]; then - echo " hub *;" >> $CONF - else - echo " leaf *;" >> $CONF - fi - if [ "$AUTOCONN" != "no" ]; then - echo " options {" >> $CONF - echo " autoconnect;" >> $CONF - echo " };" >> $CONF - fi - echo "};" >> $CONF - echo " " >> $CONF - echo " " - echo "Type the servername, or type 'done' when finished." - echo $n " [done] -> $c" - read cc - if [ -z "$cc" ]; then - cc="done" - fi -done - -cat >> $CONF << __EOF__ -/* Ulines */ -ulines { - $SERVICES; -}; - -/* Banned nick names */ -ban nick { mask "*C*h*a*n*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*N*i*c*k*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*M*e*m*o*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*H*e*l*p*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*O*p*e*r*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*I*n*f*o*S*e*r*v*"; reason "Reserved for services"; }; -ban nick { mask "*Admin*"; reason "Reserved for Administrator"; }; -ban nick { mask "*IRC*op*"; reason "Reserved for ircops"; }; -ban nick { mask "*Oper*"; reason "Reserved for ircops"; }; -ban nick { mask "Status"; reason "Bug in mIRC"; }; - -/* - * Include files - */ -include "badwords.channel.conf"; -include "badwords.message.conf"; -include "help.conf"; -/* - * Some modules; -*/ -loadmodule "src/modules/commands.so"; -loadmodule "src/modules/scan.so"; -loadmodule "src/modules/scan_socks.so"; -loadmodule "src/modules/scan_http.so"; -/* Ports */ -listen $VIRTUAL:$PORT; -__EOF__ - -cc="blank" -echo " " -echo " " -echo " Would you like any extra ports, other than 6667? Enter them here." -echo "Type 'done' when you are finished. Type 'default' to use 6665-6669/7000." -while [ "$cc" != "done" ]; do - echo $n " [$OPRT] -> $c" - read cc - if [ -z "$cc" ]; then - cc="$OPRT" - fi - if [ "$cc" = "default" ]; then - echo "listen $VIRTUAL:6660;" >> $CONF - echo "listen $VIRTUAL:6661;" >> $CONF - echo "listen $VIRTUAL:6662;" >> $CONF - echo "listen $VIRTUAL:6663;" >> $CONF - echo "listen $VIRTUAL:6664;" >> $CONF - echo "listen $VIRTUAL:6665;" >> $CONF - echo "listen $VIRTUAL:6666;" >> $CONF - echo "listen $VIRTUAL:6668;" >> $CONF - echo "listen $VIRTUAL:6669;" >> $CONF - echo "listen $VIRTUAL:7000;" >> $CONF - cc="done" - fi - if [ "$cc" != "done" ]; then - if [ $cc = "$PORT" ]; then - echo " No, $PORT is already in use" - echo "please use a port other than $PORT." - else - echo "listen $VIRTUAL:$cc;" >> $CONF - fi - fi - case "$OPRT" in - 6660) OPRT="done" - ;; - 6661) OPRT="6660" - ;; - 6662) OPRT="6661" - ;; - 6663) OPRT="6662" - ;; - 6664) OPRT="6663" - ;; - 6665) OPRT="6664" - ;; - 6666) OPRT="6665" - ;; - 6669) OPRT="6666" - ;; - 6668) OPRT="6669" - ;; - 6667) OPRT="6668" - ;; - *) OPRT="done" - ;; - esac -done - -# Make it so ONLY the one who created the conf can read or write. -chmod 700 $IRCDCONF - -cat << __EOF__ - - - OK, $IRCDCONF has been generated according to what you specified. -Make sure you double check for errors in $IRCDCONF. We recommend that -you take a look at your $IRCDCONF right now. Thanks for using UnrealIRCd - -__EOF__ - rm -f crypter.tmp - echo "Have a nice day." - echo "[Press enter to continue]" - read cc - more .CONFIG.RANT - echo "[Press enter when you have read all of this]" - read cc - echo "" - exit 1