]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Large reorganisation of all Makefiles, including new configure script.
authorChris Porter <redacted>
Mon, 17 Mar 2008 02:35:34 +0000 (02:35 +0000)
committerChris Porter <redacted>
Mon, 17 Mar 2008 02:35:34 +0000 (02:35 +0000)
67 files changed:
.hgignore
authext/Makefile.in
authhash/Makefile.in
bans/Makefile.in
build.mk.in
carrot/Makefile.in
chandump/Makefile.in
chanfix/Makefile.in
chanindex/Makefile.in
channel/Makefile.in
chanprofile/Makefile.in
chansearch/Makefile.in
chanserv/Makefile.in
chanserv/authcmds/Makefile.in
chanserv/authcmds/chanserv_authcmds.c [moved from chanserv/authcmds/init.c with 100% similarity]
chanserv/authcmds/commandlist.c [deleted file]
chanserv/authtracker/Makefile.in
chanserv/chancmds/Makefile.in
chanserv/chancmds/chanserv_chancmds.c [moved from chanserv/chancmds/init.c with 100% similarity]
chanserv/chancmds/commandlist.c [deleted file]
chanserv/database/Makefile.in
chanserv/mkcommandlist.pl
chanserv/newsearch/Makefile.in
chanserv/usercmds/Makefile.in
chanserv/usercmds/chanserv_usercmds.c [moved from chanserv/usercmds/init.c with 100% similarity]
chanserv/usercmds/commandlist.c [deleted file]
chanstats/Makefile.in
clonehistogram/Makefile.in
control/Makefile.in
core/Makefile.in
countusers/Makefile.in
fishjoin/Makefile.in
fsck/Makefile.in
geoip/Makefile.in
helpmod/Makefile.in
helpmod2/Makefile.in
horse/Makefile.in
irc/Makefile.in
jupe/Makefile.in
lameisp/Makefile.in
localuser/Makefile.in
lpart/Makefile.in
lua/Makefile.in
newsearch/Makefile.in
nick/Makefile.in
nickrate/Makefile.in
nodecount/Makefile.in
noperserv/Makefile.in
nsmstats/Makefile.in
nterfacer/Makefile.in
pqsql/Makefile.in
proxyscan/Makefile.in
qabot/Makefile.in
qrequest/Makefile.in
rannounce/Makefile.in
regexgline/Makefile.in
request/Makefile.in
server/Makefile.in
serverlist/Makefile.in
settime/Makefile.in
spawnuser/Makefile.in
splitlist/Makefile.in
testmod/Makefile.in
ticketauth/Makefile.in
trojanscan/Makefile.in
tutorbot/Makefile.in
versionscan/Makefile.in

index 5f8ee3ba609b3f32e3934fe1ab24f3906ac6f593..33ec064b9e46b2e09c39e50f0b9cbf38eed11526 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -20,4 +20,5 @@ newserv.core
 *.dump
 chanservlog
 Makefile
-*/Makefile
+autobuild.mk
+chanserv/*/commandlist.c
index 97fbb7e521fee576c44b331d33c0be62bdf7af4c..6478bf493f270840197c21cff599d5622e5e0bb9 100644 (file)
@@ -4,4 +4,3 @@
 all: authext.so
 
 authext.so: authext.o
-       ld -shared -Bdynamic -o $@ $^
index 935794fb3fd9719adefbcf0bf9d4da6d2cf21504..f2dd03c40f3798b7ed4b5bc34c9da1cd846cbefb 100644 (file)
@@ -4,4 +4,3 @@
 all: authhash.so
 
 authhash.so: authhash.o
-       ld -shared -Bdynamic -o $@ $^
index 2f33ad410288e5653208ed72b52134e1fe40ee24..fb5f4b7dbfbae94420b6837474a8aeab1d12b4eb 100644 (file)
@@ -4,4 +4,3 @@
 all: bans.so
 
 bans.so: bans.o
-       ld -shared -Bdynamic -o $@ $^
index e15ef6a46f32082c5a1cf5a54d3570f1e174378a..ff5611cb0c9175f3a36b0b71bce92d3b4a79835c 100644 (file)
@@ -2,6 +2,8 @@
 INCPATH=../
 @endif@
 
+CFLAGS=
+
 @include@ @includel@$(INCPATH)configure.mk@includel@
 @sinclude@ @includel@$(INCPATH)settings.mk@includel@
 
@@ -9,5 +11,11 @@ INCPATH=../
 BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/+ /-/" @shellend@
 @endif@
 
+.SUFFIXES: .so
+
+.o.so:
+       ld -shared -Bdynamic $(LDFLAGS) -o $@ @srcs@
+
 CC=gcc
-CFLAGS+=-Wall -g -fPIC -export-dynamic -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=$(BUILDID)
+CFLAGS+=-Wall -g -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=$(BUILDID)
+CFLAGS+=-fPIC -export-dynamic
index 84bb1717f7c15e750f3f4b3df7cb93e8a44690ff..5087938e8c0fa7b3a87e833a2d91395864581aa5 100644 (file)
@@ -4,4 +4,3 @@
 all: carrot.so
 
 carrot.so: carrot.o
-       ld -shared -Bdynamic -o $@ $^
index a73193faeaa476870e9e3647b5404a2ad108d991..52a67397353af03f776bcc36638050004a305608 100644 (file)
@@ -4,4 +4,3 @@
 all: chandump.so  
 
 chandump.so: chandump.o
-       ld -shared -Bdynamic -o $@ $^
index b67253112942d27e5602550f06cc23043171acd9..48d21ff198d2bc56789a71b929e0c4dda57e8428 100644 (file)
@@ -3,4 +3,3 @@
 all: chanfix.so\r
 \r
 chanfix.so: chanfix.o\r
-       ld -shared -Bdynamic -o $@ $^\r
index ea6b37080845581e2f61a7ae0fbab97479f04cfc..c44442067f9e9710bb63e1191ff4da1c3fe1598b 100644 (file)
@@ -4,4 +4,3 @@
 all: chanindex.so
 
 chanindex.so: chanindex.o
-       ld -shared -Bdynamic -o $@ $^
index d88351b4b11508d82b634896ddb956e1a13b1b15..56c678a0af23d52d4e57d8385ef516a5a8fec4bc 100644 (file)
@@ -4,4 +4,3 @@
 all: channel.so  
 
 channel.so: channel.o channelalloc.o channelhandlers.o chanuserhash.o channelbans.o
-       ld -shared -Bdynamic -o $@ $^
index e96ea6006dd950c043d613c17b4959e8e8f90bb9..e63229ebf035ac2ed28f4ec530385461d3dc94ad 100644 (file)
@@ -4,4 +4,3 @@
 all: chanprofile.so
 
 chanprofile.so: chanprofile.o
-       ld -shared -Bdynamic -o $@ $^
index 5b1df23e24bcd00d31969df60b275e49c1004990..53a618af271df56ad87ab792aa79ad657f224d01 100644 (file)
@@ -4,4 +4,3 @@
 all: chansearch.so
 
 chansearch.so: chansearch.o
-       ld -shared -Bdynamic -o $@ $^
index ceedfce8a611502e00107f9fca5132cfc899bdf1..3201612a7a5a1df8a79d0a971378901b67030049 100644 (file)
@@ -1,31 +1,31 @@
 @include@ @includel@../build.mk@includel@
-CFLAGS+=${INCPGSQL} ${INCPCRE}
+@include@ @includel@build.mk@includel@
 
 CSDIRS=database chancmds usercmds authcmds authtracker newsearch
 
-.PHONY: all dirs clean
+.PHONY: all dirs $(CSDIRS) clean
 all: chanserv.so chanserv_protect.so chanserv_grep.so chanserv_chansearch.so chanserv_relay.so dirs
 
-dirs:
-       for i in $(CSDIRS) ; do $(MAKE) -C $$i all ; done
+dirs: $(CSDIRS)
        ln -sf */*.so .
 
+$(CSDIRS):
+       cd $@ && $(MAKE) BUILDID=$(BUILDID) all
+
 clean:
        rm -f */*.o */*.so
 
+distclean:
+       rm -f */autobuild.mk */Makefile
+
 chanserv.so: chanservdb_updates.o chanserv.o chanservuser.o chanservnetevents.o chanservprivs.o chanservlog.o chanservstdcmds.o \
                chanservdump.o chanservschedule.o chanservcrypto.o authlib.o q9snprintf.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
 
 chanserv_protect.so: chanserv_protect.o
-       ld -shared -Bdynamic -o $@ $^
 
 chanserv_grep.so: chanservgrep.o
-       ld -shared -Bdynamic ${LIBPCRE} -o $@ $^
 
 chanserv_chansearch.so: chanserv-chansearch.o
-       ld -shared -Bdynamic -o $@ $^
 
 chanserv_relay.so: chanserv_relay.o
-       ld -shared -Bdynamic -o $@ $^
 
index d39fb9af4b932703d5c530b967f78f3a177dae84..2fd22b30a5b1d2e1fea6aef71c33b758d0dddcf7 100644 (file)
@@ -1,11 +1,11 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
-# Automatically generated Makefile, do not edit.
 
-.PHONY: all Makefile
-all: Makefile chanserv_authcmds.so
+.PHONY: all
+all: autobuild.mk chanserv_authcmds.so
 
-Makefile:
+autobuild.mk: *.c
        ../mkcommandlist.pl chanserv_authcmds.so
 
-chanserv_authcmds.so: auth.o authhistory.o challenge.o challengeauth.o email.o getpassword.o hello.o login.o newpass.o requestpassword.o reset.o sendpassword.o setemail.o setpassword.o commandlist.o init.o 
-        ld -shared -Bdynamic -o $@ $^ 
+@sinclude@ @includel@autobuild.mk@includel@
diff --git a/chanserv/authcmds/commandlist.c b/chanserv/authcmds/commandlist.c
deleted file mode 100644 (file)
index df14920..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Automatically generated by mkcommandlist.pl, do not edit. */
-
-#include "../chanserv.h"
-
-/* Prototypes */
-int csa_doauth(void *source, int cargc, char **cargv);
-int csa_doauthhistory(void *source, int cargc, char **cargv);
-int csa_dochallenge(void *source, int cargc, char **cargv);
-int csa_dochallengeauth(void *source, int cargc, char **cargv);
-int csa_doemail(void *source, int cargc, char **cargv);
-int csa_dogetpw(void *source, int cargc, char **cargv);
-int csa_dohello(void *source, int cargc, char **cargv);
-int csa_doauth(void *source, int cargc, char **cargv);
-int csa_donewpw(void *source, int cargc, char **cargv);
-int csa_doreqpw(void *source, int cargc, char **cargv);
-int csa_doreset(void *source, int cargc, char **cargv);
-int csa_dosendpw(void *source, int cargc, char **cargv);
-int csa_dosetmail(void *source, int cargc, char **cargv);
-int csa_dosetpw(void *source, int cargc, char **cargv);
-void authcmds_init(void);
-void authcmds_fini(void);
-
-
-void _init() {
-  authcmds_init();
-  chanservaddcommand("auth", QCMD_SECURE | QCMD_NOTAUTHED, 2, csa_doauth, "Authenticates you on the bot.", "Usage: AUTH <username> <password>\nAuthenticates you on the bot, where:\nusername - your username\npassword - your password\nIf you do not have a username and password, see HELLO.\nNote: due to the sensitive nature of this command, you must send the message\nto Q@CServe.quakenet.org when using it.\nNote: the preferred way to authenticate is to use the /AUTH command.\n");
-  chanservaddcommand("authhistory", QCMD_AUTHED, 1, csa_doauthhistory, "View auth history for an account.", "Usage: AUTHHISTORY\nDisplays details of the last 10 logins with your account.  Details include\nhostmask, login time, disconnect time and reason.\n");
-  chanservaddcommand("challenge", QCMD_SECURE | QCMD_NOTAUTHED, 0, csa_dochallenge, "Returns a challenge for use in challengeauth.", "Usage: challenge\nSupplies you with a challenge and a list of algorithms accepted\nfor challenge response authentication, see CHALLENGEAUTH help\nfor more details.\n");
-  chanservaddcommand("challengeauth", QCMD_SECURE | QCMD_NOTAUTHED, 3, csa_dochallengeauth, "Authenticates you on the bot using challenge response.", "Usage: challengeauth <username> <response> <hmac algorithm>\nAuthenticates using challenge response.\nTo generate the response from the challenge, calculate the following:\n  HMAC(challenge){k}\nwhere HMAC is the hash message authentication code as described in\nRFC 2104, k is HEXDIGEST(<lower case username>:HEXDIGEST(<password>))\nand HEXDIGEST is the hash function used in the MAC construction.\nFor example code see the website.\n");
-  chanservaddcommand("email", QCMD_SECURE | QCMD_AUTHED, 3, csa_doemail, "Change your email address.", "Usage: EMAIL <password> <email> <email>\nChanges your register email address.  Confirmation of the change will be sent\nboth old and new addresses.  Where:\npassword - your password\nemail    - new email address.  Must be entered exactly the same way twice to avoid\n           mistakes.\nNote: due to the sensitive nature of this command, you must send the message \nto Q@CServe.quakenet.org when using it.\n");
-  chanservaddcommand("getpassword", QCMD_OPER, 2, csa_dogetpw, "Gets a users password", "Usage: getpassword <username>\nFetches the password for the specified username.\n");
-  chanservaddcommand("hello", QCMD_NOTAUTHED, 2, csa_dohello, "Creates a new user account.", "Usage: HELLO <email> <email>\nCreates a new user account for yourself.  Your current nickname will be used\nfor the name of the account, and may only contain letters, numbers and \nhyphens (-).  An email containing password details will be sent to the email\naddress supplied.  Where:\nemail    - your email address.  Must be entered the same way both times.\n");
-  chanservaddcommand("login", QCMD_SECURE | QCMD_NOTAUTHED | QCMD_ALIAS, 2, csa_doauth, "Authenticates you on the bot.", "Usage: LOGIN <username> <password>\nAuthenticates you on the bot, where:\nusername - your username\npassword - your password\nIf you do not have a username and password, see HELLO.\nNote: due to the sensitive nature of this command, you must send the message\nto Q@CServe.quakenet.org when using it.\nNote: the preferred way to authenticate is to use the /AUTH command.\n");
-  chanservaddcommand("newpass", QCMD_SECURE | QCMD_AUTHED, 3, csa_donewpw, "Change your password.", "Usage: NEWPASS <oldpassword> <newpassword> <newpassword>\nChanges your account password.  Your new password must be at least 6 characters\nlong, contain at least one number and one letter, and may not contain sequences\nof letters or numbers.  Your new password will be sent to your registered email\naddress.  Where:\noldpassword - your existing account password\nnewpassword - your desired new password.  Must be entered the same both times.\nNote: due to the sensitive nature of this command, you must send the message to\nQ@CServe.quakenet.org when using it.\n");
-  chanservaddcommand("requestpassword", QCMD_NOTAUTHED, 1, csa_doreqpw, "Requests the current password by email.", "Usage: REQUESTPASSWORD <email>\nSends your current password to your registered email address, where:\nemail    - your registered email address\n");
-  chanservaddcommand("reset", QCMD_NOTAUTHED, 2, csa_doreset, "Restores the old details on an account after a change.", "Usage: RESET <username> <code>\nRestores your old email address and password if any of these\nhave recently changed, where the following parameters are:\nusername - your username\ncode     - the code received in the RESET email.\n");
-  chanservaddcommand("sendpassword", QCMD_HELPER, 1, csa_dosendpw, "Sends the users current password by email.", "Usage: SENDPASSWORD <username>\nSends the password for the specified account to the specified users email address.\n");
-  chanservaddcommand("setemail", QCMD_OPER, 2, csa_dosetmail, "Set the email address.", "Usage: setemail <username> <email address>\nSets the email address for the specified username.\n");
-  chanservaddcommand("setpassword", QCMD_OPER, 2, csa_dosetpw, "Set a new password.", "Usage: setpassword <username> <password>\nSets the password for the specified username.\n");
-}
-
-void _fini() {
-  authcmds_fini();
-  chanservremovecommand("auth", csa_doauth);
-  chanservremovecommand("authhistory", csa_doauthhistory);
-  chanservremovecommand("challenge", csa_dochallenge);
-  chanservremovecommand("challengeauth", csa_dochallengeauth);
-  chanservremovecommand("email", csa_doemail);
-  chanservremovecommand("getpassword", csa_dogetpw);
-  chanservremovecommand("hello", csa_dohello);
-  chanservremovecommand("login", csa_doauth);
-  chanservremovecommand("newpass", csa_donewpw);
-  chanservremovecommand("requestpassword", csa_doreqpw);
-  chanservremovecommand("reset", csa_doreset);
-  chanservremovecommand("sendpassword", csa_dosendpw);
-  chanservremovecommand("setemail", csa_dosetmail);
-  chanservremovecommand("setpassword", csa_dosetpw);
-}
index af9f585758f6307e30b1c0f2e79dfaacb5883960..2aa7518f990fd7d89619cddba64461c63b4363e4 100644 (file)
@@ -1,7 +1,9 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
+
 .PHONY: all
 all: chanserv_authtracker.so
 
 chanserv_authtracker.so: authtracker.o authtracker_hooks.o authtracker_query.o authtracker_db.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
         
index 0a0fbd9d2ab338c54038e5eca95f151215a9a6c0..3079ee5d4001d245694ba65fd7aaab9829c23d49 100644 (file)
@@ -1,11 +1,12 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
-# Automatically generated Makefile, do not edit.
 
-.PHONY: all Makefile
-all: Makefile chanserv_chancmds.so
+.PHONY: all
+all: autobuild.mk chanserv_chancmds.so
 
-Makefile:
+autobuild.mk: *.c
        ../mkcommandlist.pl chanserv_chancmds.so
 
-chanserv_chancmds.so: addchan.o adduser.o autolimit.o ban.o banclear.o bandel.o banlist.o bantimer.o chanflags.o chanlev.o chanlevhistory.o chanmode.o channelcomment.o chanophistory.o chanstat.o chantype.o clearchan.o delchan.o deopall.o devoiceall.o giveowner.o invite.o op.o permban.o recover.o rejoin.o removeuser.o renchan.o requestowner.o rollbackchan.o settopic.o suspendchan.o suspendchanlist.o tempban.o unban.o unbanall.o unbanmask.o unbanme.o unsuspendchan.o users.o voice.o welcome.o commandlist.o init.o 
-        ld -shared -Bdynamic -o $@ $^ 
+@sinclude@ @includel@autobuild.mk@includel@
+
diff --git a/chanserv/chancmds/commandlist.c b/chanserv/chancmds/commandlist.c
deleted file mode 100644 (file)
index 5d393b4..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Automatically generated by mkcommandlist.pl, do not edit. */
-
-#include "../chanserv.h"
-
-/* Prototypes */
-int csc_doaddchan(void *source, int cargc, char **cargv);
-int csc_doadduser(void *source, int cargc, char **cargv);
-int csc_doautolimit(void *source, int cargc, char **cargv);
-int csc_dopermban(void *source, int cargc, char **cargv);
-int csc_dobanclear(void *source, int cargc, char **cargv);
-int csc_dobandel(void *source, int cargc, char **cargv);
-int csc_dobanlist(void *source, int cargc, char **cargv);
-int csc_dobantimer(void *source, int cargc, char **cargv);
-int csc_dochanflags(void *source, int cargc, char **cargv);
-int csc_dochanlev(void *source, int cargc, char **cargv);
-int csc_dochanlevhistory(void *source, int cargc, char **cargv);
-int csc_dochanmode(void *source, int cargc, char **cargv);
-int csc_dochannelcomment(void *source, int cargc, char **cargv);
-int csc_dochanophistory(void *source, int cargc, char **cargv);
-int csc_dochanstat(void *source, int cargc, char **cargv);
-int csc_dochantype(void *source, int cargc, char **cargv);
-int csc_doclearchan(void *source, int cargc, char **cargv);
-int csc_dodelchan(void *source, int cargc, char **cargv);
-int csc_dodeopall(void *source, int cargc, char **cargv);
-int csc_dodevoiceall(void *source, int cargc, char **cargv);
-int csc_dogiveowner(void *source, int cargc, char **cargv);
-int csc_doinvite(void *source, int cargc, char **cargv);
-int csc_doop(void *source, int cargc, char **cargv);
-int csc_dopermban(void *source, int cargc, char **cargv);
-int csc_dorecover(void *source, int cargc, char **cargv);
-int csc_dorejoin(void *source, int cargc, char **cargv);
-int csc_doremoveuser(void *source, int cargc, char **cargv);
-int csc_dorenchan(void *source, int cargc, char **cargv);
-int csc_dorequestowner(void *source, int cargc, char **cargv);
-int csc_dorollbackchan(void *source, int cargc, char **cargv);
-int csc_dosettopic(void *source, int cargc, char **cargv);
-int csc_dosuspendchan(void *source, int cargc, char **cargv);
-int csc_dosuspendchanlist(void *source, int cargc, char **cargv);
-int csc_dotempban(void *source, int cargc, char **cargv);
-int csc_dobandel(void *source, int cargc, char **cargv);
-int csc_dounbanall(void *source, int cargc, char **cargv);
-int csc_dounbanmask(void *source, int cargc, char **cargv);
-int csc_dounbanme(void *source, int cargc, char **cargv);
-int csc_dounsuspendchan(void *source, int cargc, char **cargv);
-int csc_dousers(void *source, int cargc, char **cargv);
-int csc_dovoice(void *source, int cargc, char **cargv);
-int csc_dowelcome(void *source, int cargc, char **cargv);
-void chancmds_init(void);
-void chancmds_fini(void);
-
-
-void _init() {
-  chancmds_init();
-  chanservaddcommand("addchan", QCMD_OPER, 4, csc_doaddchan, "Adds a new channel to the bot.", "Usage: addchan <channel> [<owner> [<flags> [<type>]]]\nAdds the given channel to the bot, where:\nowner - can be either nickname on the network or #authname.  If not supplied,\n        the channel will belong to the user issuing the ADDCHAN command.\nflags - can be any valid chanflags (see CHANFLAGS).  If not specified this \n        defaults to +j.\ntype  - is a channel type as per old Q and is now obsolete.\n");
-  chanservaddcommand("adduser", QCMD_AUTHED, 20, csc_doadduser, "Adds one or more users to a channel as +aot.", "Usage: ADDUSER <channel> [<flags>] <user1> [<user2> [<user3> [...]]]\nAdds the named user(s) to the channel, where:\nchannel - the channel to use\nflags   - the list of flags to add for each user, introduced by + (for example\n          +gv).  See CHANLEV for valid flags.  If no flags are specified, \n          +aot is used.  This command cannot be used to add masters (+m) or\n          owners (+n).\nuser<n> - either a user's current nickname on the network or #accountname. Up to\n          18 users can be specified.\nADDUSER requires master (+m) access on the named channel.\n");
-  chanservaddcommand("autolimit", QCMD_AUTHED, 2, csc_doautolimit, "Shows or changes the autolimit threshold on a channel.", "Usage: AUTOLIMIT <channel> [<threshold>]\nThe autolimit feature maintains a user limit (+l) on the channel which is\nregularly updated to keep a fixed number of spaces free on the channel for\npeople to join.  This is useful since it prevents a large number of \"clones\"\njoining at the same time.  However, if the number of free spaces is too small\nit's possible that legitimate users won't be able to join.  This command allows\nyou to adjust the number of free spaces to maintain when autolimit is enabled.  \nTo actually turn the autolimit feature on or off, see CHANFLAGS.  Where:\nchannel   - the channel to use.\nthreshold - specifies the new threshold.  If not specified, the current threshold \n            is displayed.\nViewing the current threshold requires operator (+o) access on the named channel.\nUpdating the threshold requires master (+m) access on the named channel.\n");
-  chanservaddcommand("ban", QCMD_AUTHED | QCMD_ALIAS, 3, csc_dopermban, "Permanently bans a hostmask on a channel.", "Usage: BAN <channel> <hostmask> [<reason>]\nPermanently bans the provided hostmask on the channel.  If the ban is\nremoved from the channel e.g. by a channel op or the BANTIMER feature, the\nban will be reapplied if a matching user joins the channel.  Bans\nset with the PERMBAN command can be removed with BANCLEAR or BANDEL.  Any users\nmatching the hostmask will be kicked from the channel.\nWhere:\nchannel  - channel to set a ban on\nhostmask - hostmask (nick!user@host) to ban.\nreason   - reason for the ban.  This will be used in kick messages when kicking\n           users matching the ban.  If this is not provided the generic message\n           \"Banned.\" will be used.\nBAN requires master (+m) access on the named channel.\nBAN is an alias for PERMBAN.\n");
-  chanservaddcommand("banclear", QCMD_AUTHED, 1, csc_dobanclear, "Removes all bans from a channel including persistent bans.", "Usage: BANCLEAR <channel>\nRemoves all temporary and persistent bans from a channel, where:\nchannel - the channel to use\nBANCLEAR requires master (+m) access on the named channel.\n");
-  chanservaddcommand("bandel", QCMD_AUTHED, 2, csc_dobandel, "Removes a single ban from a channel.", "Usage: BANDEL <channel> <ban>\nRemoves the specified persistent or channel ban, where:\nchannel - the channel to use\nban     - either a ban mask (nick!user@host), or #number (see BANLIST)\nRemoving channel bans requires operator (+o) access on the named channel.\nRemoving persistent bans requires master (+m) access on the named channel.\n");
-  chanservaddcommand("banlist", QCMD_AUTHED, 1, csc_dobanlist, "Displays all persistent bans on a channel.", "Usage: BANLIST <channel>\nDisplays a list of persistent and channel bans on the named channel.  Each ban\nis identified by a number which can be passed to a subsequent BANDEL command.\nNote that the numbers can change if bans are added to or removed from the \nchennel. Where:\nchannel - the channel to use\nBANLIST requires operator (+o) access on the named channel.\n");
-  chanservaddcommand("bantimer", QCMD_AUTHED, 2, csc_dobantimer, "Shows or changes the time after which bans are removed.", "Usage: BANTIMER <channel> [<duration>]\nTo help keep channels clear of the clutter of too many bans, Q can automatically\nremove channel bans after a specified time.  This command is used to alter that\ntime period, disable the feature, or show the current setting, where:\nchannel  - the channel to use\nduration - how long to remove channel bans after.  If duration is 0 then channel\n           bans will not be automatically removed.  If duration is not specified,\n           the current setting will be displayed.  Suffixes can m (minutes), \n           h (hours), d (days), w (weeks), M (months) and y (years) can be used \n           to specify the duration, for example 3d, 1w, 1h30m.\nViewing the current setting requires operator (+o) access on the named channel.\nChanging the setting requires master (+m) access on the named channel.\n");
-  chanservaddcommand("chanflags", QCMD_AUTHED, 2, csc_dochanflags, "Shows or changes the flags on a channel.", "Usage: CHANFLAGS <channel> [<changes>]\nShows or changes the status of channel flags, where:\nchannel - channel to use\nchanges - changes to apply to the channel flags in the usual +/- format, e.g. +c\n          to set +c and -c to remove it.\nViewing the current flags requires operator (+o) access on the named channel.\nChanging the flags requires master (+m) access on the named channel.\nValid channel flags are:\n +a AUTOOP     Automatically ops any user who has op access when they join the\n               channel.  Same effect as giving all ops the +a chanlev flag.\n +b BITCH      Prevents users who don't have operator access on the channel\n               from being opped (automatically deops them)\n +c AUTOLIMIT  Enables automatic limit feature - updates the channel limit at\n               regular intervals to keep a certain number of free spaces.  This\n               can mitigate the effect of join floods.  See AUTOLIMIT.\n +e ENFORCE    Enforces bans on the channel.  Any user who is banned will be\n               kicked automatically.\n +f FORCETOPIC Prevents channel ops from changing the topic.  The SETTOPIC\n               command must be used instead.\n +g AUTOVOICE  Automatically voices any user who has voice access when they join\n               the channel.  Same effect as giving all voices the +g chanlev flag.\n +j JOINED     Causes Q to remain on the channel.  Cannot be removed.\n +k KNOWNONLY  Any user who joins the channel who is not known (+k) will be kicked.  \n               Unless channel mode +i is set they will be banned as well.\n +p PROTECT    Any user with voice (+v) or operator (+o) access will have that \n               status enforced on the channel at all times.  Same effect as giving\n               all ops and voices the +p chanlev flag.\n +t TOPICSAVE  Saves the topic when it changes.  Such saved topics can be restored\n               via settopic, or when the bot rejoins when a channel has been left\n               empty.\n +v VOICEALL   Automatically grants voice (+v) on the channel to any user who enters,\n               unless they have quiet (+q) chanlev flag.\n +w WELCOME    Sends the welcome message to users joining the channel.  See WELCOME.\nNote: Previous versions of Q included the facility to enforce limits and keys using\n+k and +l chanflags.  This functionality is now available via the CHANMODE command.\n");
-  chanservaddcommand("chanlev", QCMD_AUTHED, 3, csc_dochanlev, "Shows or modifies user access on a channel.", "Usage: CHANLEV <channel> [<user> [<change>]]\nDisplays or alters the access of known users on a channel, where:\nchannel - the channel to use\nuser    - the user to list or modify.  user can be specified as either an active\n          nickname on the network or #accountname.  If user is not specified then\n          all known users are listed.\nchange  - lists the flags to add or remove, with + to add or - to remove.  For\n          example, +ao to add a and o flags, or -gv to remove g and v flags.  This \n          can be used to add or remove users from the channel.  If change is not\n          specified then the current access of the named user is displayed.\nDisplaying known user information requires you to be known (+k) on the named channel.\nAdjusting flags for other users requires master (+m) access on the named channel.\nAdding or removing the +m flag for other users requires owner (+n) access on the \n named channel.\nYou may always remove your own flags, except +qdb flags (which are not visible to you).\nAdding or removing personal flags requires you to be known (+k) on the named channel.\nNote that channel owners (+n) can grant +n to channel masters but they must use \nthe GIVEOWNER command for this.\nThe access level flags determine which commands a user is allowed to use on a channel.\nHolding an access flag also grants access to any action requiring a lesser flag (e.g.\n+m users can perform actions requiring operator (+o) status even if they do not\nactually have +o set).  The access flags are listed in descending order.\nValid flags are:\nAccess level flags - these control the user's overall privilege level on the channel:\n +n OWNER     Can add or remove masters and all other flags (except personal flags)\n +m MASTER    Can add or remove all access except master or owner\n +o OP        Can get ops on the channel\n +v VOICE     Can get voice on the channel\n +k KNOWN     Known on the channel - can get invites to the channel via INVITE\nPunishment flags - these restrict the user on the channel in some way:\n +q DEVOICE   Not allowed to be voiced on the channel\n +d DEOP      Not allowed to be opped on the channel\n +b BANNED    Banned from the channel\nExtra flags - these control specific behaviour on the channel:\n +a AUTOOP    Ops the user automatically when they join the channel (the user \n              must also hold +o in order to have this flag)\n +g AUTOVOICE Voices the user automatically when they join the channel (the \n              user must also hold +v in order to have this flag)\n +p PROTECT   If the user has +o or +v, this makes sure they will always have\n              that status, they will be reopped/voiced if deopped/voiced\n +t TOPIC     Can use SETTOPIC to alter the topic on the channel\nPersonal flags - these control user personal preferences and can only be changed\n                 by the user concerned.  They are not visible to other users.\n +w NOWELCOME Prevents the welcome message being sent when you join the channel.\n +j AUTOINV   Invites you to the channel automatically when you authenticate.\nNote that non-sensible combinations of flags are not allowed.  After making a \nchange the current status of the named user on the channel will be confirmed.\n");
-  chanservaddcommand("chanlevhistory", QCMD_HELPER, 2, csc_dochanlevhistory, "View user access changes on a channel.", "Usage: chanlevhistory <channel> [<duration>]\nShows you recent modifications to a channels user access entries.\nDefault duration is one hour.\n");
-  chanservaddcommand("chanmode", QCMD_AUTHED, 4, csc_dochanmode, "Shows which modes are forced or denied on a channel.", "Usage: CHANMODE <channel> [<modes>]\nShows or changes the list of channel modes being enforced on the channel, where:\nchannel  - the channel to use\nmodes    - the list of modes to allow or deny.  Modes specified with + will be\n           enforced on the channel at all times, those specified with - will not\n           be allowed on the channel.  If modes are not specified the current\n           setting will be displayed.  If +k or +l modes are included, the actual\n           key or limit to be enforced must also be specified, for example \n           \"-il+ntk mykey\", or \"+nstl-Cc 20\".  If you do not want any modes\n           enforced, \"CHANMODE <channel> +\" will clear the list.\nViewing the enforced modes requires operator (+o) access on the named channel.\nUpdating the enforced modes requires master (+m) access on the named channel.\nNote: unlike similar commands that work on flags, specifying modes REPLACES\nthe list of modes to be enforced rather than changing the existing list.  This \nis because - modes are valid as well as + modes.  Thus whenever you specify \nthe modes argument you must provide the complete list of desired modes each\ntime.\nNote: if autolimit is enabled (see CHANFLAGS) it will cause a +l limit mode\nto be enforced, with the value updating periodically as users join and leave.\nThis +l forcing cannot be changed or overridden without disabling the autolimit\nfunction using the CHANFLAGS command.\n");
-  chanservaddcommand("channelcomment", QCMD_OPER, 2, csc_dochannelcomment, "Shows or changes the staff comment for a channel.", "Usage: channelcomment <channel> [<comment>]\nSets or views a comment for a channel.\n");
-  chanservaddcommand("chanophistory", QCMD_AUTHED, 1, csc_dochanophistory, "Displays a list of who has been opped on a channel recently with account names.", "Usage: CHANOPHISTORY <channel>\nDisplays a list of users who have recently been opped on a channel by the\nservice, along with the account name responsible for the opping.  Usually\nthis is the account the user being opped was using, but in the case of the \nOP command being used to op other users, the account used by the user issuing\nthe OP command will be shown.  Where:\nchannel  - the channel to use\nCHANOPHISTORY requires operator (+o) access on the named channel.\n");
-  chanservaddcommand("chanstat", QCMD_AUTHED, 2, csc_dochanstat, "Displays channel activity statistics.", "Usage: CHANSTAT <channel> [RESET]\nShows some statistics about a channel, including total number of joins and \nmaximum channel size.  Two sets of statistics are displayed, a lifetime\ncounter, and a trip meter counter which can be reset.  Where:\nchannel - channel to display statistics for.\nCHANSTAT requires master (+m) access on the named channel.\n");
-  chanservaddcommand("chantype", QCMD_OPER, 2, csc_dochantype, "Shows or changes a channel's type.", "Usage: chantype <channel> [<channel type>]\nViews or changes the channel type for the specified channel.\n");
-  chanservaddcommand("clearchan", QCMD_AUTHED, 1, csc_doclearchan, "Removes all modes from a channel.", "Usage: CLEARCHAN <channel>\nRemoves all channel modes (such as keys, limits, invite only, etc.) from\nthe named channel.  Modes being enfored (see CHANMODE) will not be removed.\nWhere:\nchannel - channel to remove modes from\nCLEARCHAN requires master (+m) access on the named channel.\n");
-  chanservaddcommand("delchan", QCMD_OPER, 2, csc_dodelchan, "Removes a channel from the bot.", "Usage: delchan <channel> [<reason>]\nRemoves a channel from the bot, reason is optional.\n");
-  chanservaddcommand("deopall", QCMD_AUTHED, 1, csc_dodeopall, "Deops all users on channel.", "Usage: DEOPALL <channel>\nDeops every user in the channel.  Registered channel operators (+o on CHANLEV) \nwho are protected (via the +p flag in CHANLEV or CHANFLAGS) will not be deopped.\nWhere:\nchannel - channel to use\nDEOPALL requires master (+m) access on the named channel.\n");
-  chanservaddcommand("devoiceall", QCMD_AUTHED, 1, csc_dodevoiceall, "Devoices all users on a channel.", "Usage: DEVOICEALL <channel>\nDevoices all users in the channel.  Registered voices (+v on CHANLEV) who are \nprotected (+p flag set in CHANLEV or CHANFLAGS) will not be devoiced.\nDEVOICEALL requires master (+m) access on the named channel.\n");
-  chanservaddcommand("giveowner", QCMD_AUTHED, 3, csc_dogiveowner, "Gives total control over a channel to another user.", "Usage: GIVEOWNER <channel> <user> [<code>]\nGives complete control (+n flag) to the named user on the channel.  The new owner\nwill have full control over the channel, including the ability to remove the\nexisting owner(s).  As a precaution the named user must already have master (+m) \naccess on the channel.  Use this command with extreme caution.  Where:\nchannel - channel to use\nuser    - user to give owner to, either a nickname on the network or #accountname.\ncode    - a unique code used to authorize the operation.  If the code is not \n          supplied, the appropriate code will be provided together with a \n          warning about the dangers of this command.  If the wrong code is\n          entered owner access will not be granted.\nGIVEOWNER requires owner (+n) access on the named channel.\n");
-  chanservaddcommand("invite", QCMD_AUTHED, 1, csc_doinvite, "Invites you to a channel.", "Usage: INVITE <channel>\nInvites you to the named channel, where:\nchannel - channel to be invited to.\nINVITE requires you to be known (+k) on the named channel.\n");
-  chanservaddcommand("op", QCMD_AUTHED, 20, csc_doop, "Ops you or other users on channel(s).", "Usage: OP [<channel> [<user1> [<user2> [...]]]\nOps you on one or more channels, or ops other named users on a given channel.\nThis command cannot be used to op users who are otherwise prevented from getting\nops, e.g. via the +d chanlev flag (see CHANLEV) or bitch mode (see CHANFLAGS).\nWhere:\nchannel - channel to use.  If no channel is specified, you will be given ops on\n          every channel where you have appropriate access and are not already\n          opped.\nuser<n> - user(s) to op instead of yourself.  Each user must be specified as the\n          current nickname of a user on the named channel.\nOP requires operator access (+o) on the named channel.  If this command is used\nto op other users, a notice will be sent to other channel operators on the \nchannel identifying you, unless you have master (+m) access.\n");
-  chanservaddcommand("permban", QCMD_AUTHED, 3, csc_dopermban, "Permanently bans a hostmask on a channel.", "Usage: PERMBAN <channel> <hostmask> [<reason>]\nPermanently bans the provided hostmask on the channel.  If the ban is\nremoved from the channel e.g. by a channel op or the BANTIMER feature, the\nban will be reapplied if a matching user joins the channel.  Bans\nset with the PERMBAN command can be removed with BANCLEAR or BANDEL.  Any users\nmatching the hostmask will be kicked from the channel.\nWhere:\nchannel  - channel to set a ban on\nhostmask - hostmask (nick!user@host) to ban.\nreason   - reason for the ban.  This will be used in kick messages when kicking\n           users matching the ban.  If this is not provided the generic message\n           \"Banned.\" will be used.\nPERMBAN requires master (+m) access on the named channel.\n");
-  chanservaddcommand("recover", QCMD_AUTHED, 1, csc_dorecover, "Recovers a channel (same as deopall, unbanall, clearchan).", "Usage: RECOVER <channel>\nThis command resets the named channel if undesired modes, bans or ops have been\nset.  This has the same effect as DEOPALL followed by UNBANALL followed by\nCLEARCHAN on the channel, where:\nchannel - channel to recover\nRECOVER requires master (+m) access on the named channel.\n");
-  chanservaddcommand("rejoin", QCMD_OPER, 1, csc_dorejoin, "Makes the bot rejoin a channel.", "Usage: rejoin <channel>\nMakes the bot rejoin the specified channel.\n");
-  chanservaddcommand("removeuser", QCMD_AUTHED, 20, csc_doremoveuser, "Removes one or more users from a channel.", "Usage: REMOVEUSER <channel> <user1> [<user2> [<user3> [...]]]\nRemoves any flags the named user(s) have on the channel.  This command\ncannot be used to remove owners (+n) from the channel, and cannot be used\nto remove masters (+m) unless the user issuing the command is an owner.\nWhere:\nchannel - channel to use\nuser<n> - a user to remove.  Can either be a nickname on the network\n          or #authname.  Up to 18 users can be specified.\nREMOVEUSER requires master (+m) access on the named channel.\n");
-  chanservaddcommand("renchan", QCMD_OPER, 2, csc_dorenchan, "Renames a channel on the bot.", "Usage: renchan <old channel> <new channel>\nMoves the bot from one channel to another, preserving flags.\n");
-  chanservaddcommand("requestowner", QCMD_AUTHED, 1, csc_dorequestowner, "Requests ownership of a channel on which there are no owners.", "Usage: requestowner <channel>\nRequests owner (+n) access to the named channel.  In order to use this command,\nthere must be no owners left on the channel, and you must have the highest\naccess level of the remaining users.  Where:\nchannel - the channel to request ownership of\n");
-  chanservaddcommand("rollbackchan", QCMD_OPER, 3, csc_dorollbackchan, "Roll back access changes on a channel.", "Usage: rollbackchan <channel> [<username>] <duration>\nReverts a channel's user access entries to a point in the past.\nIf username is specified only changes to that user will be made.\n");
-  chanservaddcommand("settopic", QCMD_AUTHED, 2, csc_dosettopic, "Changes the topic on a channel.", "Usage: SETTOPIC <channel> [<topic>]\nChanges the topic on the channel, where:\nchannel - channel to use\ntopic   - new topic.  If no topic is set, the stored topic will be reset (this\n          feature is useful if some users can no longer see the topic due to a \n          netsplit).\nSETTOPIC requires topic (+t) or master (+m) access on the named channel.\n");
-  chanservaddcommand("suspendchan", QCMD_OPER, 2, csc_dosuspendchan, "Suspends a channel from the bot.", "Usage: suspendchan <channel> [<reason>]\nSuspends the specified channel, with an optional reason.\n");
-  chanservaddcommand("suspendchanlist", QCMD_HELPER, 1, csc_dosuspendchanlist, "Lists suspended channels.", "Usage: suspendchanlist <pattern>\nLists all suspended channels that match the specified pattern.\n");
-  chanservaddcommand("tempban", QCMD_AUTHED, 4, csc_dotempban, "Bans a hostmask on a channel for a specified time period.", "Usage: TEMPBAN <channel> <hostmask> <duration> [<reason>]\nTemporarily bans the provided hostmask on the channel.  If the ban is\nremoved from the channel e.g. by a channel op or the BANTIMER feature, the\nban will be reapplied if a matching user joins the channel.  When the time \nexpires the ban will be removed automatically.  Bans set with the TEMPBAN \ncommand can be removed before they expire with BANCLEAR or BANDEL.  Any users \nmatching the hostmask will be kicked from the channel.\nWhere:\nchannel  - channel to set a ban on\nhostmask - hostmask (nick!user@host) to ban.\nduration - length of time to apply the ban for.  Suffixes m (minutes), h (hours),\n           d (days), w (weeks), M (months) and y (years) can be used to specify \n           the duration, for example 3d, 5h, 1h30m, 1M.\nreason   - reason for the ban.  This will be used in kick messages when kicking\n           users matching the ban.  If this is not provided the generic message\n           \"Banned.\" will be used.\nTEMPBAN requires master (+m) access on the named channel.\n");
-  chanservaddcommand("unban", QCMD_AUTHED | QCMD_ALIAS, 2, csc_dobandel, "Removes a single ban from a channel.", "Usage: UNBAN <channel> <ban>\nRemoves the specified persistent or channel ban, where:\nchannel - the channel to use\nban     - either a ban mask (nick!user@host), or #number (see BANLIST)\nRemoving channel bans requires operator (+o) access on the named channel.\nRemoving persistent bans requires master (+m) access on the named channel.\nUNBAN is an alias for BANDEL.\n");
-  chanservaddcommand("unbanall", QCMD_AUTHED, 1, csc_dounbanall, "Removes all bans from a channel.", "Usage: UNBANALL <channel>\nRemoves all the channel bans set on the named channel.  This does not affect\npersistent bans set via the TEMPBAN and PERMBAN commands, see BANCLEAR or\nBANDEL for more information on removing those bans.  Where:\nchannel - channel to use\nUNBANALL requires master (+m) access on the named channel.\n");
-  chanservaddcommand("unbanmask", QCMD_AUTHED, 2, csc_dounbanmask, "Removes bans matching a particular mask from a channel.", "Usage: UNBANMASK <channel> <mask>\nRemoves any bans on the channel which are overlapped by the named mask.  Can\nremove both channel bans and registered bans.  Where:\nchannel - channel to use\nmask    - mask to remove.  Any ban subsumed by this mask will be removed.  For\n          example, UNBANMASK *!*@*.isp.net would remove *!*@host1.isp.net and \n          *!*@host2.isp.net and *!user@*.isp.net.\nUNBANMASK requires operator (+o) access on the named channel.\nRemoving registered bans requires master (+m) access on the named channel.\n");
-  chanservaddcommand("unbanme", QCMD_AUTHED, 1, csc_dounbanme, "Removes any bans affecting you from a channel.", "Usage: UNBANME <channel>\nThis command removes any channel bans which affect you from a channel.  It does\nnot affect persistent bans set by PERMBAN and TEMPBAN.  Where:\nchannel - channel to use\nUNBANME requires operator (+o) access on the named channel.\n");
-  chanservaddcommand("unsuspendchan", QCMD_OPER, 1, csc_dounsuspendchan, "Unsuspends a channel from the bot.", "Usage: unsuspendchan <channel>\nUnsuspends specified channel.\n");
-  chanservaddcommand("users", QCMD_AUTHED, 1, csc_dousers, "Displays a list of users on the channel.", "Usage: USERS <channel>\nDisplays a list of users on the named channel along with their usernames and flags\non the channel, where:\nchannel - channel to use\nUSERS requires operator (+o) access on the named channel.\n");
-  chanservaddcommand("voice", QCMD_AUTHED, 20, csc_dovoice, "Voices you or other users on channel(s).", "Usage: VOICE [<channel> [<user1> [<user2> [...]]]\nGrants voice to you on one or more channels, or grants voice to one or more\nother users on a particular channel.  This command cannot be used to grant\nvoice to users who would otherwise be prevented from obtaining voice, e.g.\nthe quiet (+q) chanlev flag.  Where:\nchannel - channel to use.  If no channel is specified, you will be granted voice\n          on every channel where you have appropriate access and are not already \n          voiced.\nuser<n> - other users to grant voice to.  Must be specified as the nickname\n          of users who are on the named channel.\nVoicing yourself requires voice (+v) access on the relevant channels.\nVoicing other users requires operator (+o) access on the named channel.  If this \ncommand is used to voice other users, a notice will be sent to channel operators\non the channel identifying you, unless you have master (+m) access.\n");
-  chanservaddcommand("welcome", QCMD_AUTHED, 2, csc_dowelcome, "Shows or changes the welcome message on a channel.", "Usage: WELCOME <channel> [<message>]\nThis shows the current welcome message set on a channel and allows it to be\nchanged.  In order to be displayed to users, the feature must be enabled\nby the +w chanflag (see CHANFLAGS).  Where:\nchannel - channel to use\nmessage - welcome message to set.  If this is not provided the existing welcome\n          message is displayed.\nDisplaying the message requires operator (+o) access on the named channel.\nChanging the message requires master (+m) access on the named channel.\n");
-}
-
-void _fini() {
-  chancmds_fini();
-  chanservremovecommand("addchan", csc_doaddchan);
-  chanservremovecommand("adduser", csc_doadduser);
-  chanservremovecommand("autolimit", csc_doautolimit);
-  chanservremovecommand("ban", csc_dopermban);
-  chanservremovecommand("banclear", csc_dobanclear);
-  chanservremovecommand("bandel", csc_dobandel);
-  chanservremovecommand("banlist", csc_dobanlist);
-  chanservremovecommand("bantimer", csc_dobantimer);
-  chanservremovecommand("chanflags", csc_dochanflags);
-  chanservremovecommand("chanlev", csc_dochanlev);
-  chanservremovecommand("chanlevhistory", csc_dochanlevhistory);
-  chanservremovecommand("chanmode", csc_dochanmode);
-  chanservremovecommand("channelcomment", csc_dochannelcomment);
-  chanservremovecommand("chanophistory", csc_dochanophistory);
-  chanservremovecommand("chanstat", csc_dochanstat);
-  chanservremovecommand("chantype", csc_dochantype);
-  chanservremovecommand("clearchan", csc_doclearchan);
-  chanservremovecommand("delchan", csc_dodelchan);
-  chanservremovecommand("deopall", csc_dodeopall);
-  chanservremovecommand("devoiceall", csc_dodevoiceall);
-  chanservremovecommand("giveowner", csc_dogiveowner);
-  chanservremovecommand("invite", csc_doinvite);
-  chanservremovecommand("op", csc_doop);
-  chanservremovecommand("permban", csc_dopermban);
-  chanservremovecommand("recover", csc_dorecover);
-  chanservremovecommand("rejoin", csc_dorejoin);
-  chanservremovecommand("removeuser", csc_doremoveuser);
-  chanservremovecommand("renchan", csc_dorenchan);
-  chanservremovecommand("requestowner", csc_dorequestowner);
-  chanservremovecommand("rollbackchan", csc_dorollbackchan);
-  chanservremovecommand("settopic", csc_dosettopic);
-  chanservremovecommand("suspendchan", csc_dosuspendchan);
-  chanservremovecommand("suspendchanlist", csc_dosuspendchanlist);
-  chanservremovecommand("tempban", csc_dotempban);
-  chanservremovecommand("unban", csc_dobandel);
-  chanservremovecommand("unbanall", csc_dounbanall);
-  chanservremovecommand("unbanmask", csc_dounbanmask);
-  chanservremovecommand("unbanme", csc_dounbanme);
-  chanservremovecommand("unsuspendchan", csc_dounsuspendchan);
-  chanservremovecommand("users", csc_dousers);
-  chanservremovecommand("voice", csc_dovoice);
-  chanservremovecommand("welcome", csc_dowelcome);
-}
index 76e09790784fc58b979984b795c99028f9080505..afa8d83c285cecb7891d39de260dffd58a6dc1c6 100644 (file)
@@ -1,9 +1,10 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
 
 .PHONY: all
 all: chanservdb.so
 
 chanservdb.so: chanservdb.o chanservdb_alloc.o chanservdb_hash.o chanservdb_messages.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
         
 chanservdb_messages.o: chanservdb_messages.c ../chanserv_messages.h
index c57d19e8929540985d289086b6b1012bc0304973..61432bdd80f38c35a99a3605f014f7b4d95bbd18 100755 (executable)
@@ -24,12 +24,16 @@ unless (@ARGV) {
 
 my $smallname;
 $smallname=$modname;
-$smallname=~s/^chanserv_//;
 $smallname=~s/\.so$//;
 
+my $cname;
+$cname=$smallname . ".c";
+$smallname=~s/^chanserv_//;
+
+
 for (@filelist) {
   next if (/commandlist.c/);
-  next if (/init.c/);
+  next if ($_ eq $cname);
   
   my $fname = $_;
   my ($cn, $cl, $ca, $cd, $cf, $cp, $ch);
@@ -127,21 +131,15 @@ print CL "}\n";
 
 close CL;
 
-open MF,">Makefile";
+open MF,">autobuild.mk";
 
-print MF "# Automatically generated Makefile, do not edit.\n\n";
-
-print MF ".PHONY: all Makefile\n";
-
-print MF "all: Makefile $modname\n\n";
-
-print MF "Makefile:\n";
-print MF "\t../mkcommandlist.pl $modname\n";
+print MF "# Automatically generated Makefile, do not edit.\n";
 
 print MF "\n$modname: ";
 
 push @files,"commandlist.c";
-push @files,"init.c";
+
+push @files,$cname;
 
 foreach (@files) {
   s/.c$/.o/;
@@ -149,6 +147,5 @@ foreach (@files) {
 }
 
 print MF "\n";
-print MF "\t ld -shared -Bdynamic -o \$\@ \$\^ \n";
 
 close MF;
index 4d926af496cd83a1d92ddbf96304ee83a117c3d2..98f1ca0f79965fa06e8135a262e78bc28fc3d3bc 100644 (file)
@@ -1,8 +1,9 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
 
 .PHONY: all
 all: chanserv_newsearch.so
 
 chanserv_newsearch.so: cs-newsearch.o formats.o 
-       ld -shared -Bdynamic -o $@ $^
         
index 3ee74b04cc1859b9bb07b0cd8d8a46991c06119a..e3ced3d01ef24a60f7fe52d8d128b37537d8e2c0 100644 (file)
@@ -1,11 +1,11 @@
+INCPATH=../../
+@include@ @includel@../../build.mk@includel@
 @include@ @includel@../build.mk@includel@
-# Automatically generated Makefile, do not edit.
 
-.PHONY: all Makefile
-all: Makefile chanserv_usercmds.so
+.PHONY: all
+all: autobuild.mk chanserv_usercmds.so
 
-Makefile:
+autobuild.mk: *.c
        ../mkcommandlist.pl chanserv_usercmds.so
 
-chanserv_usercmds.so: accounthistory.o cleanupdb.o deluser.o domainmode.o info.o language.o listflags.o maillock.o rollbackaccount.o spewdb.o spewdomain.o spewemail.o spewpass.o suspenduser.o suspenduserlist.o unsuspenduser.o usercomment.o userflags.o whoami.o whois.o commandlist.o init.o 
-        ld -shared -Bdynamic -o $@ $^ 
+@sinclude@ @includel@autobuild.mk@includel@
diff --git a/chanserv/usercmds/commandlist.c b/chanserv/usercmds/commandlist.c
deleted file mode 100644 (file)
index 922cb08..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Automatically generated by mkcommandlist.pl, do not edit. */
-
-#include "../chanserv.h"
-
-/* Prototypes */
-int csa_doaccounthistory(void *source, int cargc, char **cargv);
-int csu_docleanupdb(void *source, int cargc, char **cargv);
-int csu_dodeluser(void *source, int cargc, char **cargv);
-int csu_dodomainmode(void *source, int cargc, char **cargv);
-int csu_doinfo(void *source, int cargc, char **cargv);
-int csu_dolanguage(void *source, int cargc, char **cargv);
-int csu_dolistflags(void *source, int cargc, char **cargv);
-int csu_domaillock(void *source, int cargc, char **cargv);
-int csa_dorollbackaccount(void *source, int cargc, char **cargv);
-int csu_dospewdb(void *source, int cargc, char **cargv);
-int csu_dospewdomain(void *source, int cargc, char **cargv);
-int csu_dospewemail(void *source, int cargc, char **cargv);
-int csu_dospewpass(void *source, int cargc, char **cargv);
-int csu_dosuspenduser(void *source, int cargc, char **cargv);
-int csu_dosuspenduserlist(void *source, int cargc, char **cargv);
-int csu_dounsuspenduser(void *source, int cargc, char **cargv);
-int csu_dousercomment(void *source, int cargc, char **cargv);
-int csu_douserflags(void *source, int cargc, char **cargv);
-int csu_dowhoami(void *source, int cargc, char **cargv);
-int csu_dowhois(void *source, int cargc, char **cargv);
-void usercmds_init(void);
-void usercmds_fini(void);
-
-
-void _init() {
-  usercmds_init();
-  chanservaddcommand("accounthistory", QCMD_OPER, 1, csa_doaccounthistory, "View password/email history for an account.", "Usage: accounthistory <account>\nShows password/email history for the specified account.\n");
-  chanservaddcommand("cleanupdb", QCMD_DEV, 0, csu_docleanupdb, "Clean up database.", "Usage: cleanupdb\nCleans up inactive accounts, unused accounts and inactive channels.\n");
-  chanservaddcommand("deluser", QCMD_OPER, 2, csu_dodeluser, "Removes a user from the bot.", "Usage: deluser <username>\nRemoves the specified username from the bot.\n");
-  chanservaddcommand("domainmode", QCMD_OPER, 4, csu_dodomainmode, "Set/Unset Mail Domain Modes", "Usage: domainmode <domain> [<flags>]\nViews or modifies the domainmode flags for specified domain.\nFlags consist of:\n  +b          don't allow email addresses from this domain.\n  +u <limit>  don't allow more than <limit> accounts to share\n              email addresses on this domain.\n  +l <limit>  don't allow more than <limit> accounts with\n              email addresses on this domain.\nNote that domains are hierarchical, so setting +b on org will\nprevent operations from quakenet.org, fish.quakenet.org, etc.\n");
-  chanservaddcommand("info", QCMD_AUTHED | QCMD_OPER, 2, csu_doinfo, "Shows or changes info line.", "Usage: INFO [<channel>] [<info line>]\nShows or updates your current info line, which can be configured to be displayed\nwhen you join a channel.  Where:\nchannel   - channel to set info line on.  If no channel is specified, your default\n            info line will be used.  If a channel is specified you must be known\n            (+k) on the channel.\ninfo line - new info line to set.  If not specified, the current info line will be\n            displayed.  If \"none\" is specified, the info line will be cleared.\n");
-  chanservaddcommand("language", QCMD_AUTHED | QCMD_OPER, 1, csu_dolanguage, "Shows or changes your current language.", "Usage: language [<language code>]\nShows your currently selected language and a list of others\nby default, changes your language when you specify a language code.\n");
-  chanservaddcommand("listflags", QCMD_OPER, 1, csu_dolistflags, "List users with the specified user flags.", "Usage: listflags <flags>\nShows a list of all users with the specified user flags.\n");
-  chanservaddcommand("maillock", QCMD_OPER, 3, csu_domaillock, "Set/unset/list mail lock patterns", "Usage: maillock <-list|-add|-del> <pattern> [<reason>]\nManipulates the list of mail lock patterns.\nAny email address matching the pattern will be refused in HELLO/EMAIL.\nA reason is optional for -list, but recommended.\n");
-  chanservaddcommand("rollbackaccount", QCMD_OPER, 2, csa_dorollbackaccount, "Roll back password/email changes on an account.", "Usage: rollbackaccount <username> <duration>\nRolls back an account to a previous point, reverting password and email changes.\n");
-  chanservaddcommand("spewdb", QCMD_OPER, 1, csu_dospewdb, "Search for a user in the database.", "Usage: spewdb <pattern>\nDisplays all users with usernames that match the specified pattern.\n");
-  chanservaddcommand("spewdomain", QCMD_OPER, 1, csu_dospewdomain, "Spew Mail Domains.", "Usage: spewdomain <pattern>\nDisplays all mail domains that match the specified pattern.\n");
-  chanservaddcommand("spewemail", QCMD_OPER, 1, csu_dospewemail, "Search for an e-mail in the database.", "Usage: spewdb <pattern>\nDisplays all users with email addresses that match the supplied pattern.\n");
-  chanservaddcommand("spewpass", QCMD_OPER, 1, csu_dospewpass, "Search for a password in the database.", "Usage: spewpass <pattern>\nDisplays all users with a password that matches the specified pattern.\n");
-  chanservaddcommand("suspenduser", QCMD_OPER, 1, csu_dosuspenduser, "Suspend/Delay GLINE/Instantly GLINE a user.", "Usage: suspenduser <username> [<duration>] <reason>\n                   -nokill <username> [<duration>] <reason>\n                   -gline <username> [<duration>] <reason>\n                   -instantgline <username> [<duration>] <reason>\n                   -password <password> [<duration>] <reason>\n                   -email <email address> [<duration>] <reason>\nSuspends one or more users, either based on username, email\naddress or password.\nBy default the user will be immediately disconnected unless\nnokill is specified.\ngline will gline the user at some random period of time after\nthey auth, instantgline will gline them the moment they auth.\n");
-  chanservaddcommand("suspenduserlist", QCMD_HELPER, 1, csu_dosuspenduserlist, "Lists suspended/locked users.", "Usage: suspenduserlist <username or pattern>\nDisplays all suspend users with usernames matching the specified pattern,\nor the single user with the specified username.\n");
-  chanservaddcommand("unsuspenduser", QCMD_OPER, 1, csu_dounsuspenduser, "Unsuspend a user.", "Usage: unsuspenduser <username>\nUnsuspends the specified user.\n");
-  chanservaddcommand("usercomment", QCMD_OPER, 2, csu_dousercomment, "Shows or changes staff comment for a user.", "Usage: usercomment <username> [<comment>]\nShows or changes the staff comment for the specified user.\n");
-  chanservaddcommand("userflags", QCMD_AUTHED, 2, csu_douserflags, "Shows or changes user flags.", "Usage: USERFLAGS <flags>\nChanges your current user flags, where:\nflags - changes to apply, in the usual flag letters preceded by +/- format.\nValid user flags are:\n +n NOTICE  - causes the bot to sent you NOTICEs.  If this flag is not set the\n              bot will communicate using PRIVMSG.\n");
-  chanservaddcommand("whoami", QCMD_AUTHED, 0, csu_dowhoami, "Displays information about you", "Usage: WHOAMI\nDisplays various information about your account.\n");
-  chanservaddcommand("whois", QCMD_AUTHED, 1, csu_dowhois, "Displays information about a user.", "Usage: WHOIS <user>\nDisplays information about a user, where:\nuser  - user to request information for, either the nickname of an active user on\n        the network or #accountname.\n");
-}
-
-void _fini() {
-  usercmds_fini();
-  chanservremovecommand("accounthistory", csa_doaccounthistory);
-  chanservremovecommand("cleanupdb", csu_docleanupdb);
-  chanservremovecommand("deluser", csu_dodeluser);
-  chanservremovecommand("domainmode", csu_dodomainmode);
-  chanservremovecommand("info", csu_doinfo);
-  chanservremovecommand("language", csu_dolanguage);
-  chanservremovecommand("listflags", csu_dolistflags);
-  chanservremovecommand("maillock", csu_domaillock);
-  chanservremovecommand("rollbackaccount", csa_dorollbackaccount);
-  chanservremovecommand("spewdb", csu_dospewdb);
-  chanservremovecommand("spewdomain", csu_dospewdomain);
-  chanservremovecommand("spewemail", csu_dospewemail);
-  chanservremovecommand("spewpass", csu_dospewpass);
-  chanservremovecommand("suspenduser", csu_dosuspenduser);
-  chanservremovecommand("suspenduserlist", csu_dosuspenduserlist);
-  chanservremovecommand("unsuspenduser", csu_dounsuspenduser);
-  chanservremovecommand("usercomment", csu_dousercomment);
-  chanservremovecommand("userflags", csu_douserflags);
-  chanservremovecommand("whoami", csu_dowhoami);
-  chanservremovecommand("whois", csu_dowhois);
-}
index d8e4bcd50ea2d867b73c6421b73511c5cb2bf6bc..3472e054e7f62c0efad3e0c8516c73efdfe9f0af 100644 (file)
@@ -4,4 +4,3 @@
 all: chanstats.so  
 
 chanstats.so: chanstatsalloc.o chanstats.o
-       ld -shared -Bdynamic -o $@ $^
index ab4bb0c2e476070d5b14246724311189d85a1430..1a32dd31f7efff9eddf59f2041f35ec6f5605bfd 100644 (file)
@@ -4,4 +4,3 @@
 all: clonehistogram.so
 
 clonehistogram.so: clonehistogram.o
-       ld -shared -Bdynamic -o $@ $^
index de5afe57083954da554cb225360a400d3210c6c7..63c1954ba8ff222a192e51350d4ca231a561fb2c 100644 (file)
@@ -4,7 +4,5 @@
 all: control.so
 
 control-lite.so: control-lite.o
-       ld -shared -Bdynamic -o $@ $^
 
 control.so: control.o
-       ld -shared -Bdynamic -o $@ $^
index afb644646d8e344d49cf5dac3b939e921d7a7d08..8cd6ce4444463533411fe99546c2152c7369ae9d 100644 (file)
@@ -15,5 +15,5 @@ epoll:
        ln -s events-epoll.c events.c
 
 .PHONY: all
-all: events.c main.o events.o schedule.o hooks.o error.o modules.o config.o schedulealloc.o
+all: events.c main.o events.o schedule.o hooks.o error.o modules.o config.o schedulealloc.o nsmalloc.o
 
index b6ce3746636decd3e057f35ad0876ed16754eec7..78cb129c22fc10a823f583366c928c95db5b37a5 100644 (file)
@@ -4,4 +4,3 @@
 all: countusers.so
 
 countusers.so: countusers.o
-       ld -shared -Bdynamic -o $@ $^
index 6b688be0d577a9b375a5539e5009e801a5fad5c2..e9b7d0e071154b9c5e72c911584381f9daea323b 100644 (file)
@@ -4,4 +4,3 @@
 all: fishjoin.so
 
 fishjoin.so: fishjoin.o
-       ld -shared -Bdynamic -o $@ $^
index 28309cf27e9f8c45e1f29e1760ea7435a0391820..c36580c7e7691e45c72bc2cf6dd0961e8810f016 100644 (file)
@@ -4,4 +4,3 @@
 all: fsck.so
 
 fsck.so: fsck.o
-       ld -shared -Bdynamic -o $@ $^
index a056186cabc3be4f0cca5cb2160a28cc493437ac..8cd94d26844e9e84545c387d9873759b1a555cf1 100644 (file)
@@ -4,4 +4,3 @@
 all: geoip.so
 
 geoip.so: geoip.o libGeoIP/GeoIP.o
-       ld -shared -Bdynamic -o $@ $^
index 16225a7331d07a83dd8391add84828c5dd0c4926..beb55414c5a690deb1183c07e14281dc5f61b754 100644 (file)
@@ -4,4 +4,3 @@
 all: helpmod.so
 
 helpmod.so: helpmod.o helpmod_user.o helpmod_entries.o helpmod_alias.o
-       ld -shared -warn-common -Bdynamic -o helpmod.so helpmod.o helpmod_user.o helpmod_entries.o helpmod_alias.o
index 8fd9cb88a11764324cc1848184b920bea399a704..d4409431ecbd44e223986f9a2ac5658954c16640 100644 (file)
@@ -7,7 +7,6 @@ TARGETS=huser.o hhooks.o hconf.o hgen.o hchannel.o hban.o hchanban.o hlamer.o ht
 all: helpmod2.so
 
 helpmod2.so: $(TARGETS)
-       ld -shared -warn-common -Bdynamic -o helpmod2.so $(TARGETS)
 
 clean:
        rm -f *~ *.o *.so
index 1fad3cb456cc5fb13796e66656f98c8e032b7217..95091b05f1270a2f38e60655dac836680238f678 100644 (file)
@@ -4,4 +4,3 @@
 all: horse.so
 
 horse.so: horse.o
-       ld -shared -Bdynamic -o $@ $^
index 401352bd5b3ea0c75baf48d1c0b9893168b9fd12..7a4753fd5201682d7f15c6b0ecc10e3e7977627f 100644 (file)
@@ -4,4 +4,3 @@
 all: irc.so  
 
 irc.so: irc.o
-       ld -shared -Bdynamic -o $@ $^
index 8c33075eb4d2812acbd266c159ec3d590e4e208e..e2dd8b2ed9d4c1d2d3a116f12d337f531f6089f5 100644 (file)
@@ -5,7 +5,5 @@ CFLAGS=-g
 all: jupe.so jupe_commands.so
 
 jupe.so: jupe.o
-       ld -shared -Bdynamic -o $@ $^
 
 jupe_commands.so: jupe_commands.o
-       ld -shared -Bdynamic -o $@ $^
index 1e27eefd4afb0c84d35ce6326d6a43f0df24e81b..c85d9237b43baa55790b2c6e0f634ddeaed681de 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCMYSQL)
+LDFLAGS+=$(LIBMYSQL)
 
 .PHONY: all
 all: lameisp.so
 
 lameisp.so: lameisp.o
-       ld -shared -Bdynamic ${LIBMYSQL} -o $@ $^
index 851a0900eb98e7412914fbcc376c5e6beb0e593b..ea3fe19707eef03a3f5e7dc71e1a7ec035c3428a 100644 (file)
@@ -4,11 +4,8 @@
 all: localuser.so localuserchannel.so localuserstats.so
 
 localuser.so: localuser.o
-       ld -shared -Bdynamic -o $@ $^
 
 localuserchannel.so: localuserchannel.o
-       ld -shared -Bdynamic -o $@ $^
 
 localuserstats.so: localuserstats.o
-       ld -shared -Bdynamic -o $@ $^
 
index b92a82a2254f7003de9a62d58eeeb18c5e12dac0..95001df6d23d0ba6bbc5f7184688efab13507d39 100644 (file)
@@ -4,4 +4,3 @@
 all: lpart.so
 
 lpart.so: lpart.o
-       ld -shared -Bdynamic -o $@ $^
index 705e3d78fd3b887e892f632196d2859d2f0d8e32..ddfdf2bd905fc6ce23a0b537d279d7318860bfb5 100644 (file)
@@ -1,12 +1,12 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCLUA) $(INCPGSQL)
+LDFLAGS+=$(LIBLUA) $(LIBPGSQL)
 
 .PHONY: all
 all: lua.so nterfacer_lua.so
 
 lua.so: lua.o luacommands.o luacontrol.o luabot.o lualocal.o luadebug.o luadb.o luasocket.o luacrypto.o
-       ld -shared -Bdynamic -o $@ $^ ${LIBLUA}
 
 nterfacer_lua.so: nterfacer_lua.o
-       ld -shared -Bdynamic -o $@ $^
 
index b49bdfdcb54d1ccc5e852e6619aa739b8ecb8428..d6f7f577ae1b780f72262fe0a9ef4ab86973a03f 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPCRE)
+LDFLAGS+=$(LIBPCRE)
 
 .PHONY: all
 all: newsearch.so
 
 newsearch.so: newsearch.o formats.o ns-not.o ns-and.o ns-or.o ns-eq.o ns-match.o ns-hostmask.o ns-realname.o ns-modes.o ns-nick.o ns-ident.o ns-regex.o ns-host.o ns-channel.o ns-lt.o ns-gt.o ns-timestamp.o ns-country.o ns-authname.o ns-ip.o ns-kill.o ns-gline.o ns-exists.o ns-services.o ns-size.o ns-name.o ns-topic.o ns-oppct.o ns-hostpct.o ns-authedpct.o ns-length.o ns-kick.o ns-authts.o ns-channels.o ns-server.o ns-authid.o ns-notice.o
-       ld -shared -Bdynamic $(LIBPCRE) -o $@ $^
index cfc40b8aeff238613b4b67e2ca118bf0fc96aa81..3ec98618ba51f67dd622b312ee615c5aa224f6c3 100644 (file)
@@ -4,4 +4,3 @@
 all: nick.so  
 
 nick.so: nick.o nickalloc.o nickhelpers.o nickhandlers.o
-       ld -shared -Bdynamic -o $@ $^
index 984275aae41bc4c2ba25180764ff47745f2c476b..9b2123205194f410e9b656c0f7fcd409047d3611 100644 (file)
@@ -4,4 +4,3 @@
 all: nickrate.so
 
 nickrate.so: nickrate.o
-       ld -shared -Bdynamic -o $@ $^
index 431dc2bf17629888009a339e72db45adc7025548..1cbb341b53b42c124e68aaf142acd337ca1eb72c 100644 (file)
@@ -3,4 +3,3 @@
 all: nodecount.so\r
 \r
 nodecount.so: nodecount.o\r
-       ld -shared -Bdynamic -o $@ $^\r
index f049d679715287fa32a31539ee0b719591f1c8cd..40951872550ca32033279650a646f668225c2995 100644 (file)
@@ -1,14 +1,13 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPGSQL)
+LDFLAGS+=$(LIBPGSQL)
 
 .PHONY: all
 all: noperserv.so noperserv_commands.so noperserv_fakeuser.so
 
 noperserv.so: noperserv.o noperserv_db.o noperserv_hooks.o noperserv_policy.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
 
 noperserv_commands.so: noperserv_commands.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
 
 noperserv_fakeuser.so: noperserv_fakeuser.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
index 404b437b376b0fca534d00dd848328cb09be4d32..be11d111e11ce65a45e73288631b99e80222bdb8 100644 (file)
@@ -4,4 +4,3 @@
 all: nsmstats.so\r
 \r
 nsmstats.so: nsmstats.o\r
-       ld -shared -Bdynamic -o $@ -lm $^\r
index ec1f9e59ccb1a3732d82e3d54286e36b6061f9da..bca9c81bcc1f797f60f4e5e2862b8910a38aacd7 100644 (file)
@@ -1,23 +1,19 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPCRE)
+LDFLAGS+=$(LIBPCRE)
 
 .PHONY: all
 all: nterfacer.so nterfacer_control.so nterfacer_relay.so nterfacer_chanstats.so nterfacer_country.so nterfacer_spamscan2.so
 
 nterfacer.so: nterfacer.o logging.o esockets.o library.o
-       ld -shared -Bdynamic -o $@ $^
 
 nterfacer_control.so: nterfacer_control.o
-       ld -shared -Bdynamic -o $@ $^
 
 nterfacer_relay.so: nterfacer_relay.o
-       ld -shared -Bdynamic ${LIBPCRE} -o $@ $^
 
 nterfacer_chanstats.so: nterfacer_chanstats.o
-       ld -shared -Bdynamic -o $@ $^
 
 nterfacer_country.so: nterfacer_country.o
-       ld -shared -Bdynamic -o $@ $^
 
 nterfacer_spamscan2.so: nterfacer_spamscan2.o
-       ld -shared -Bdynamic ${LIBPCRE} -o $@ $^
index fa8a9ef22e13aeacbf3f3a88699bb6776f243e8a..d9f243b141e6c27c4f5900288f4208f2bacd4a2c 100644 (file)
@@ -1,9 +1,10 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPGSQL)
+LDFLAGS+=$(LIBPGSQL)
 
 .PHONY: all
 all: pqsql.so
 
 pqsql.so: pqsql.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
 
index 6771c0f645a0042c5cbace272b0eb93302066e29..4e58dc630eada1e2585be11e11d66985b8f1451d 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPGSQL)
+LDFLAGS+=$(LIBPGSQL)
 
 .PHONY: all
 all: proxyscan.so  
 
 proxyscan.so: proxyscan.o proxyscanalloc.o proxyscanconnect.o proxyscancache.o proxyscanqueue.o proxyscanhandlers.o proxyscandb.o
-       ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
index a81887eaec0f762c0ec4e38db705d1ca4d157a04..7b1df32429ef7d351e6251a20923f346a47ae053 100644 (file)
@@ -4,4 +4,3 @@
 all: qabot.so\r
 \r
 qabot.so: qabot.o qabot_bot.o qabot_chancommands.o qabot_commands.o qabot_dbase.o qabot_help.o\r
-       ld -shared -Bdynamic -o $@ $^\r
index cd856cfa8cfa72a28addaaccdbcf80537264ee6f..26b269090b0cac0f48217537db923867c6ee3d6f 100644 (file)
@@ -4,4 +4,3 @@
 all: qrequest.so
 
 qrequest.so: qrequest.o
-       ld -shared -Bdynamic -o $@ $^
index 5113a06c123c59b99991e1398903a317efacd9b8..71babd9bc29a85ca1d232c87a54d6648fbfe7675 100644 (file)
@@ -4,4 +4,3 @@
 all: rannounce.so
 
 rannounce.so: rannounce.o
-       ld -shared -Bdynamic -o $@ $^
index b0459f81f9d377d352bd90481a182cf1645e3ea7..b4ee2bd6516c13fc302ec57542f5ee939aba5091 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCMYSQL) $(INCPCRE)
+LDFLAGS+=$(LIBMYSQL) $(LIBPCRE)
 
 .PHONY: all
 all: regexgline.so
 
 regexgline.so: regexgline.o
-       ld -shared -Bdynamic ${LIBMYSQL} ${LIBPCRE} -o $@ $^
index 6f590af52a92b808744b2bd20d970937f79f81e6..2e1b6aa878c10c88fa4aa6d38dc3722476b4e09a 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCPGSQL)
+LDFLAGS+=$(LIBPGSQL)
 
 .PHONY: all
 all: request.so
 
 request.so: lrequest.o request.o request_block.o sqrequest.o user.o 
-       ld -shared -Bdynamic -o $@ ${LIBPGSQL} $^
index e7dddbb253da51ac490d8cf15afa1cfe418609dd..4c7b2ef92abadbae3f4da1ee29834030b0416a6a 100644 (file)
@@ -4,4 +4,3 @@
 all: server.so  
 
 server.so: server.o
-       ld -shared -Bdynamic -o $@ $^
index c020b53328fdb773128aa4378910e8ba1b084122..8351fa993355bd33bfa5d73d6c0d36a41d4abc3e 100644 (file)
@@ -5,4 +5,3 @@ CFLAGS=-g -Wall
 all: serverlist.so\r
 \r
 serverlist.so: serverlist.o\r
-       ld -shared -Bdynamic -o $@ $^\r
index 3776b37f337f3256f68847148db69691c7bbd1ff..ce41dd889a15b50465d6f543519382ead27da2b6 100644 (file)
@@ -4,4 +4,3 @@
 all: settime.so
 
 settime.so: settime.o
-       ld -shared -Bdynamic -o $@ $^
index 71af31868d4b09c1af6b6a611aa73235ec8d53e9..f96af81a9eeb562b1a2678b2600734dfcacc0e41 100644 (file)
@@ -4,4 +4,3 @@
 all: spawnuser.so
 
 spawnuser.so: spawnuser.o
-       ld -shared -Bdynamic -o $@ $^
index 5d28fe4efc5709991c549ef5961a10f190ca95f0..bde831f404afd4198da3cb857f6ff7bdcbab3c53 100644 (file)
@@ -3,7 +3,5 @@
 all: splitlist.so splitlist_commands.so
 
 splitlist.so: splitlist.o
-       ld -shared -Bdynamic -o $@ $^
 
 splitlist_commands.so: splitlist_commands.o
-       ld -shared -Bdynamic -o $@ $^
index b109ebe59d64be8ab2491cdd747a1cadb2bbb567..9c348278251f287fd8cb684364acb555abfbe5e3 100644 (file)
@@ -4,4 +4,3 @@
 all: testmod.so  
 
 testmod.so: testmod.o
-       ld -shared -Bdynamic -o $@ $^
index 986744db104a4d6d6199cf32a3bd315e19f26e9e..3a2ea0f22849e6ec6cd9c2bd4469cc75a9b713a2 100644 (file)
@@ -4,4 +4,3 @@
 all: ticketauth.so
 
 ticketauth.so: ticketauth.o
-       ld -shared -Bdynamic -o $@ $^
index 0b3daf4113925578757d99284c0c8dbc401065ed..2d4fb881cca6335896d28dd8008a3afc4e96aa6e 100644 (file)
@@ -1,8 +1,9 @@
 @include@ @includel@../build.mk@includel@
+
 CFLAGS+=$(INCMYSQL) $(INCPCRE)
+LDFLAGS+=$(LIBMYSQL) $(LIBPCRE)
 
 .PHONY: all
 all: trojanscan.so
 
 trojanscan.so: trojanscan.o
-       ld -shared -Bdynamic ${LIBMYSQL} ${LIBPCRE} -o $@ $^
index 2e7bf1b7632934a8f876a15c6c1b5999766f43ca..5fa7e7bcaa32fd00b1fe2b37b35c78638cc428b5 100644 (file)
@@ -4,4 +4,3 @@
 all: tutorbot.so
 
 tutorbot.so: tutorbot.o
-       ld -shared -Bdynamic -o $@ $^
index e2477b332f57b804e1f2bf663fe9c930f868ad82..5599dab6856de8316e005dc8316e3c125f381b48 100644 (file)
@@ -4,4 +4,3 @@
 all: versionscan.so
 
 versionscan.so: versionscan.o
-       ld -shared -Bdynamic -o $@ $^