*.dump
chanservlog
Makefile
-*/Makefile
+autobuild.mk
+chanserv/*/commandlist.c
all: authext.so
authext.so: authext.o
- ld -shared -Bdynamic -o $@ $^
all: authhash.so
authhash.so: authhash.o
- ld -shared -Bdynamic -o $@ $^
all: bans.so
bans.so: bans.o
- ld -shared -Bdynamic -o $@ $^
INCPATH=../
@endif@
+CFLAGS=
+
@include@ @includel@$(INCPATH)configure.mk@includel@
@sinclude@ @includel@$(INCPATH)settings.mk@includel@
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
all: carrot.so
carrot.so: carrot.o
- ld -shared -Bdynamic -o $@ $^
all: chandump.so
chandump.so: chandump.o
- ld -shared -Bdynamic -o $@ $^
all: chanfix.so\r
\r
chanfix.so: chanfix.o\r
- ld -shared -Bdynamic -o $@ $^\r
all: chanindex.so
chanindex.so: chanindex.o
- ld -shared -Bdynamic -o $@ $^
all: channel.so
channel.so: channel.o channelalloc.o channelhandlers.o chanuserhash.o channelbans.o
- ld -shared -Bdynamic -o $@ $^
all: chanprofile.so
chanprofile.so: chanprofile.o
- ld -shared -Bdynamic -o $@ $^
all: chansearch.so
chansearch.so: chansearch.o
- ld -shared -Bdynamic -o $@ $^
@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 $@ $^
+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@
+++ /dev/null
-/* 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);
-}
+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 $@ $^
+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@
+
+++ /dev/null
-/* 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);
-}
+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
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);
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/;
}
print MF "\n";
-print MF "\t ld -shared -Bdynamic -o \$\@ \$\^ \n";
close MF;
+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 $@ $^
+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@
+++ /dev/null
-/* 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);
-}
all: chanstats.so
chanstats.so: chanstatsalloc.o chanstats.o
- ld -shared -Bdynamic -o $@ $^
all: clonehistogram.so
clonehistogram.so: clonehistogram.o
- ld -shared -Bdynamic -o $@ $^
all: control.so
control-lite.so: control-lite.o
- ld -shared -Bdynamic -o $@ $^
control.so: control.o
- ld -shared -Bdynamic -o $@ $^
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
all: countusers.so
countusers.so: countusers.o
- ld -shared -Bdynamic -o $@ $^
all: fishjoin.so
fishjoin.so: fishjoin.o
- ld -shared -Bdynamic -o $@ $^
all: fsck.so
fsck.so: fsck.o
- ld -shared -Bdynamic -o $@ $^
all: geoip.so
geoip.so: geoip.o libGeoIP/GeoIP.o
- ld -shared -Bdynamic -o $@ $^
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
all: helpmod2.so
helpmod2.so: $(TARGETS)
- ld -shared -warn-common -Bdynamic -o helpmod2.so $(TARGETS)
clean:
rm -f *~ *.o *.so
all: horse.so
horse.so: horse.o
- ld -shared -Bdynamic -o $@ $^
all: irc.so
irc.so: irc.o
- ld -shared -Bdynamic -o $@ $^
all: jupe.so jupe_commands.so
jupe.so: jupe.o
- ld -shared -Bdynamic -o $@ $^
jupe_commands.so: jupe_commands.o
- ld -shared -Bdynamic -o $@ $^
@include@ @includel@../build.mk@includel@
+
CFLAGS+=$(INCMYSQL)
+LDFLAGS+=$(LIBMYSQL)
.PHONY: all
all: lameisp.so
lameisp.so: lameisp.o
- ld -shared -Bdynamic ${LIBMYSQL} -o $@ $^
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 $@ $^
all: lpart.so
lpart.so: lpart.o
- ld -shared -Bdynamic -o $@ $^
@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 $@ $^
@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 $@ $^
all: nick.so
nick.so: nick.o nickalloc.o nickhelpers.o nickhandlers.o
- ld -shared -Bdynamic -o $@ $^
all: nickrate.so
nickrate.so: nickrate.o
- ld -shared -Bdynamic -o $@ $^
all: nodecount.so\r
\r
nodecount.so: nodecount.o\r
- ld -shared -Bdynamic -o $@ $^\r
@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 $@ $^
all: nsmstats.so\r
\r
nsmstats.so: nsmstats.o\r
- ld -shared -Bdynamic -o $@ -lm $^\r
@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 $@ $^
@include@ @includel@../build.mk@includel@
+
CFLAGS+=$(INCPGSQL)
+LDFLAGS+=$(LIBPGSQL)
.PHONY: all
all: pqsql.so
pqsql.so: pqsql.o
- ld -shared -Bdynamic ${LIBPGSQL} -o $@ $^
@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 $@ $^
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
all: qrequest.so
qrequest.so: qrequest.o
- ld -shared -Bdynamic -o $@ $^
all: rannounce.so
rannounce.so: rannounce.o
- ld -shared -Bdynamic -o $@ $^
@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 $@ $^
@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} $^
all: server.so
server.so: server.o
- ld -shared -Bdynamic -o $@ $^
all: serverlist.so\r
\r
serverlist.so: serverlist.o\r
- ld -shared -Bdynamic -o $@ $^\r
all: settime.so
settime.so: settime.o
- ld -shared -Bdynamic -o $@ $^
all: spawnuser.so
spawnuser.so: spawnuser.o
- ld -shared -Bdynamic -o $@ $^
all: splitlist.so splitlist_commands.so
splitlist.so: splitlist.o
- ld -shared -Bdynamic -o $@ $^
splitlist_commands.so: splitlist_commands.o
- ld -shared -Bdynamic -o $@ $^
all: testmod.so
testmod.so: testmod.o
- ld -shared -Bdynamic -o $@ $^
all: ticketauth.so
ticketauth.so: ticketauth.o
- ld -shared -Bdynamic -o $@ $^
@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 $@ $^
all: tutorbot.so
tutorbot.so: tutorbot.o
- ld -shared -Bdynamic -o $@ $^
all: versionscan.so
versionscan.so: versionscan.o
- ld -shared -Bdynamic -o $@ $^