#!/bin/sh MODULE=m_bopmhelper MOD_MAIL=modules@vulnscan.org MOD_REQUIRE_VERSION="Unreal3.2beta15 or higher" if [ -s ./build.settings ]; then . ./build.settings fi echo "Enter the full path to your UnrealIrcd directory (ie: /home/blah/Unreal3.2):" if [ "$DEFAULT_UPATH" != "" ]; then echo '[ Enter =' $DEFAULT_UPATH ']' fi read UPATH if [ "$UPATH" = "" ]; then UPATH="$DEFAULT_UPATH" fi if [ "$UPATH" = "" ]; then echo "Uh, you didnt't specify a path..." exit fi if [ ! -d "$UPATH" ]; then echo "That's not a valid directory" exit fi if [ ! -f "$UPATH/Unreal.nfo" ]; then echo "That's not an UnrealIrcd installation dir!" echo "I need the full path to an compiled UnrealIRCD directory!" exit fi if [ ! -f "$UPATH/include/setup.h" ]; then echo "That looks like an UnrealIrcd directory however you" echo "haven't compiled UnrealIrcd yet, you have to do that first." exit fi if [ ! -d "$UPATH/src/modules" ]; then echo "Uhhh... thats a weird UnrealIrcd directory!" exit fi RES=`grep -c beta15 "$UPATH/include/version.h"` if [ "$RES" != 0 ]; then echo "You need UnrealIRCd beta16 or later" exit fi # Update.. echo '#!/bin/sh' >build.settings echo 'DEFAULT_UPATH="'$UPATH'"' >>build.settings # Lets go cp $MODULE.c "$UPATH/src/modules" if [ $? != 0 ]; then echo Error: Copying file to "$UPATH/src/modules" failed. exit fi cd $UPATH rm -f src/modules/$UPATH.so make custommodule MODULEFILE=$MODULE if [ $? != 0 ]; then echo Compiling failed. echo "- Do you have $MOD_REQUIRE_VERSION" echo "- Do you have correct write permissions?" echo "- Maybe this version is outdated, see $MOD_URL for the latest version." echo "If all of this didnt work, mail $MOD_MAIL" exit 1 fi echo echo ==================================================================== echo "The module was succesfully compiled and installed in your modules directory." echo echo "You now need to add the following command to your UnrealIrcd" echo "config file (usually unrealircd.conf):" echo 'loadmodule "src/modules/'$MODULE'.so";' echo "(after the other loadmodule commands in the config file for example)" echo Then /rehash and the module should be loaded. echo "If you have problems you can mail $MOD_MAIL" echo ====================================================================