Skip to content

Instantly share code, notes, and snippets.

@AubreyHewes
Created January 21, 2015 23:24
Show Gist options
  • Save AubreyHewes/261748ad940a0be64f28 to your computer and use it in GitHub Desktop.
Save AubreyHewes/261748ad940a0be64f28 to your computer and use it in GitHub Desktop.
Compile and Install BitchX on Ubuntu
#!/bin/sh
####################################################################################
#
# Download Compile and Install BitchX on Ubuntu
#
####################################################################################
# download bitchx source
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic)
DOWNLOAD_URL=$(curl -s http://bitchx.sourceforge.net |\
grep "http://sourceforge.net" |\
sed -e "s|.*href=\"||g" |\
sed -e "s|\".*||g" |\
grep "/download" | uniq) # should only be one
if [ "${DOWNLOAD_URL}" = "" ]; then
echo "ERROR: Could not find DOWNLOAD_URL from http://bitchx.sourceforge.net"
exit 255;
fi
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic)
VERSION=$(echo ${DOWNLOAD_URL} | sed -e "s|.*ircii-pana/bitchx-||g" | sed -e "s|\/.*||g")
if [ "${VERSION}" = "" ]; then
echo "ERROR: Could not find VERSION from ${DOWNLOAD_URL}"
exit 255;
fi
echo "Will try to download and install version ${VERSION}";
DOWNLOAD_URL=http://downloads.sourceforge.net/project/bitchx/ircii-pana/bitchx-${VERSION}/bitchx-${VERSION}.tar.gz
echo "Downloading: ${DOWNLOAD_URL}"
curl -L -s "${DOWNLOAD_URL}" -o bitchx-${VERSION}.tar.gz
# install required dev libraries
sudo apt-get install libssl-dev ncurses-dev
# unpack source
tar -xzf bitchx-${VERSION}.tar.gz
# go to source dir
cd bitchx-${VERSION}
# configure
./configure --prefix=/usr --with-ssl --with-plugins --enable-ipv6
# build
make
# install (change to "make install_local" for local installation; in your own $HOME)
sudo make install
# remove src + build
cd $OLDPWD && rm -rf bitchx-${VERSION}*
# done use "BitchX" to run...
@vt887
Copy link

vt887 commented Oct 31, 2023

The fix is pretty easy:

--- commands.c	2014-11-04 05:54:23.000000000 -0500
+++ commands.c	2023-10-31 08:34:17.876041504 -0400
@@ -118,7 +118,7 @@

 static	void	oper_password_received (char *, char *);

-int	no_hook_notify = 0;
+// int	no_hook_notify = 0;
 int	load_depth = -1;

 extern char	cx_function[];
 
 --- modules.c	2010-06-26 04:18:34.000000000 -0400
+++ modules.c	2023-10-31 08:23:31.312250180 -0400
@@ -83,7 +83,7 @@
 extern int (*dcc_input_func)  (int, int, char *, int, int);
 extern int (*dcc_close_func) (int, unsigned long, int);

-int (*serv_open_func) (int, unsigned long, int);
+int (*serv_open2_func) (int, unsigned long, int);
 extern int (*serv_output_func) (int, int, char *, int);
 extern int (*serv_input_func)  (int, char *, int, int, int);
 extern int (*serv_close_func) (int, unsigned long, int);
@@ -631,7 +631,7 @@
 	global_table[USERHOSTBASE]		= (Function_ptr) BX_userhostbase;


-	global_table[SERV_OPEN_FUNC]		= (Function_ptr) &serv_open_func;
+	global_table[SERV_OPEN_FUNC]		= (Function_ptr) &serv_open2_func;
 	global_table[SERV_OUTPUT_FUNC]		= (Function_ptr) &serv_output_func;
 	global_table[SERV_INPUT_FUNC]		= (Function_ptr) &serv_input_func;
 	global_table[SERV_CLOSE_FUNC]		= (Function_ptr) &serv_close_func;
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment