The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download | Blog
Personal tools
InspIRCd - 10,000 revisions reached!

Installing New And Third-Party Modules Into InspIRCd

From the makers of InspIRCd.

Jump to: navigation, search


Error-free installation

To install new modules into InspIRCd, follow this simple process:

  • Copy the new module (which should be a cpp (C++) file) into the src/modules directory of your inspircd install.
  • Run configure with the -modupdate switch to update your makefiles and dependencies:
$ ./configure -modupdate
Detecting modules ..........................................
Ok, 42 modules.
Updating Files..
Writing Makefile
Writing inspircd
Writing dynamic-build src/Makefile 
Writing src/modules/Makefile
Complete.

Note: If -modupdate fails to work, try -update instead.

  • Run make install or gmake install to build the new module
  • Add a <modules> tag to your Configuration file to load the module. Do this on all servers on your network.
  • Rehash your IRCds or use the /LOADMODULE command to load your module on all the servers.

Please note that for certain modules you may be required to make further configuration changes, please read any documentation relating to the modules before you start.

What to do if it all goes wrong

On some systems, the configure script will fail to find libraries and header files required for certain modules. Although this is a rare event, it can occur, and you need to know how to handle it when it does.

If the configure script fails to find a library or header file whilst running interactive (e.g. the ./configure with no parameters, where you enter values at the keyboard when prompted) then the script will simply prompt you for the value:

Please enter the path to the file libssl.so
[/usr/lib] ->

Simply entering the correct value will allow configure to continue normally.

If however you are performing a ./configure --update, or ./configure --modupdate, as you are installing a new module into an already configured install of InspIRCd, this is non-interactive and you must also specify paths non-interactively. Consider the following example:

$ ./configure -modupdate
Detecting modules ..........................................
Ok, 42 modules.
Updating Files..
Writing Makefile
Writing inspircd
Writing dynamic-build src/Makefile
Writing src/modules/Makefile
Executing program for module m_filter_pcre.cpp ... pcre-config --cflags
Executing program for module m_filter_pcre.cpp ... pcre-config --libs
Adding extra library path to m_filter_pcre.cpp ... /usr/lib64
Executing program for module m_mysql.cpp ... mysql_config --include
Executing program for module m_mysql.cpp ... mysql_config --libs_r
Adding extra library path to m_mysql.cpp ... /usr/lib64/mysql
Executing program for module m_pgsql.cpp ... pg_config --includedir
Evaluating perl code for module m_pgsql.cpp ... (Created and executed /tmp/filevnKefa)
Executing program for module m_pgsql.cpp ... pg_config --libdir
Executing program for module m_ssl_gnutls.cpp ... libgnutls-config --cflags
Executing program for module m_ssl_gnutls.cpp ... libgnutls-config --libs
Locating include directory for package openssl for module m_ssl_openssl.cpp... -DVERSION_OPENSSL="0.9.8d" (cached)
Locating library directory for package openssl for module m_ssl_openssl.cpp... 

Configuration failed. The following error occurred:

Could not detect openssl! Please specify the path to the directory containing libssl.so via the command line option --openssl-libs="/path/to/file"

As the configure script has stated, it cannot detect libssl.so. To fix this, simply run configure again with the command-line it asks for:

$ ./configure -modupdate --openssl-libs="/home/user/openssl/lib"
Detecting modules ..........................................
Ok, 42 modules.
Updating Files..
Writing Makefile
Writing inspircd
Writing dynamic-build src/Makefile
Writing src/modules/Makefile
Executing program for module m_filter_pcre.cpp ... pcre-config --cflags
Executing program for module m_filter_pcre.cpp ... pcre-config --libs
Adding extra library path to m_filter_pcre.cpp ... /usr/lib64
Executing program for module m_mysql.cpp ... mysql_config --include
Executing program for module m_mysql.cpp ... mysql_config --libs_r
Adding extra library path to m_mysql.cpp ... /usr/lib64/mysql
Executing program for module m_pgsql.cpp ... pg_config --includedir
Evaluating perl code for module m_pgsql.cpp ... (Created and executed /tmp/filevnKefa)
Executing program for module m_pgsql.cpp ... pg_config --libdir
Executing program for module m_ssl_gnutls.cpp ... libgnutls-config --cflags
Executing program for module m_ssl_gnutls.cpp ... libgnutls-config --libs
Locating include directory for package openssl for module m_ssl_openssl.cpp... -DVERSION_OPENSSL="0.9.8d" (cached)
Locating library directory for package openssl for module m_ssl_openssl.cpp... /home/user/openssl/lib
Composing Makefile rules for directory m_spanningtree... (9 files found)
Writing cache file for future ./configures ...
Complete.

...and there you have it! Everything worked fine.

NOTE: Once you have specified these values, they will be stored in the .config.cache file. This means that on future runs of configure, you will not be prompted again for these values, the current value will stick. To clear these values, simply remove .config.cache or issue the command:

./configure -clean

and rebuild InspIRCd.