]> jfr.im git - irc/quakenet/newserv.git/commit - chanserv/usercmds/commandlist.c
More chanserv refactoring
authorsplidge <redacted>
Sat, 2 Jun 2007 13:38:06 +0000 (14:38 +0100)
committersplidge <redacted>
Sat, 2 Jun 2007 13:38:06 +0000 (14:38 +0100)
commit1dd6d55d137d4c36261d33e717e4291728c61ff8
treed43352187048145cdf62e4139e3ba9972e97ba78
parentb263aa7977b043ad0c79da7b017185e67e30552d
More chanserv refactoring

The previously monolithic "chancmds.c", "usercmds.c", and "authcmds.c" files
have been split up into multiple files in new directories "chancmds",
"usercmds" and "authcmds".

Each command source file now has a comment header which contains tags
indicating the name of the command, the level required to use it, the
maximum argument count, a short description and the name of the command
function to be called.  A perl script has been added which reads these tags
and automatically generates a file called "commandlist.c" which sets up
appropriate _init() and _fini() functions for the module.  The perl script
also generates the Makefile, so if you add a command it will be added to the
Makefile automatically.  The perl script will emit warnings if tags are
incomplete and not include that file.

A perl script called "refactor.pl" has been added which assists in the
splitting up process.  This was used to generate the new individual files in
each directory.  You may find it useful if you have locally added your own
commands to one of the old monolithic files and want it to automatically
generate new individual files for you.  Note it's not perfect, in particular
it won't notice if you have defined helper functions as well as your main
command function, so don't overwrite the checked-in version of files with
ones generated by refactor.pl unless you have made changes to the relevant
command and have checked it first.

If you want to register command aliases, create a dummy .c file with
appropriate tags (see authcmds/auth.c for an example).
71 files changed:
chanserv/Makefile
chanserv/authcmds.c [deleted file]
chanserv/authcmds/Makefile [new file with mode: 0644]
chanserv/authcmds/auth.c [new file with mode: 0644]
chanserv/authcmds/commandlist.c [new file with mode: 0644]
chanserv/authcmds/email.c [new file with mode: 0644]
chanserv/authcmds/hello.c [new file with mode: 0644]
chanserv/authcmds/login.c [new file with mode: 0644]
chanserv/authcmds/newpass.c [new file with mode: 0644]
chanserv/authcmds/requestmasterpassword.c [new file with mode: 0644]
chanserv/authcmds/requestpassword.c [new file with mode: 0644]
chanserv/authcmds/setemail.c [new file with mode: 0644]
chanserv/authcmds/setmasterpassword.c [new file with mode: 0644]
chanserv/authcmds/setpassword.c [new file with mode: 0644]
chanserv/authlib.c
chanserv/chancmds.c [deleted file]
chanserv/chancmds/Makefile [new file with mode: 0644]
chanserv/chancmds/addchan.c [new file with mode: 0644]
chanserv/chancmds/adduser.c [new file with mode: 0644]
chanserv/chancmds/autolimit.c [new file with mode: 0644]
chanserv/chancmds/banclear.c [new file with mode: 0644]
chanserv/chancmds/bandel.c [new file with mode: 0644]
chanserv/chancmds/banlist.c [new file with mode: 0644]
chanserv/chancmds/bantimer.c [new file with mode: 0644]
chanserv/chancmds/chanflags.c [new file with mode: 0644]
chanserv/chancmds/chanlev.c [new file with mode: 0644]
chanserv/chancmds/chanmode.c [new file with mode: 0644]
chanserv/chancmds/channelcomment.c [new file with mode: 0644]
chanserv/chancmds/chanstat.c [new file with mode: 0644]
chanserv/chancmds/chantype.c [new file with mode: 0644]
chanserv/chancmds/clearchan.c [new file with mode: 0644]
chanserv/chancmds/commandlist.c [new file with mode: 0644]
chanserv/chancmds/delchan.c [new file with mode: 0644]
chanserv/chancmds/deopall.c [new file with mode: 0644]
chanserv/chancmds/devoiceall.c [new file with mode: 0644]
chanserv/chancmds/invite.c [new file with mode: 0644]
chanserv/chancmds/op.c [new file with mode: 0644]
chanserv/chancmds/permban.c [new file with mode: 0644]
chanserv/chancmds/recover.c [new file with mode: 0644]
chanserv/chancmds/rejoin.c [new file with mode: 0644]
chanserv/chancmds/removeuser.c [new file with mode: 0644]
chanserv/chancmds/renchan.c [new file with mode: 0644]
chanserv/chancmds/settopic.c [new file with mode: 0644]
chanserv/chancmds/suspendchan.c [new file with mode: 0644]
chanserv/chancmds/suspendchanlist.c [new file with mode: 0644]
chanserv/chancmds/tempban.c [new file with mode: 0644]
chanserv/chancmds/unbanall.c [new file with mode: 0644]
chanserv/chancmds/unbanmask.c [new file with mode: 0644]
chanserv/chancmds/unbanme.c [new file with mode: 0644]
chanserv/chancmds/unsuspendchan.c [new file with mode: 0644]
chanserv/chancmds/voice.c [new file with mode: 0644]
chanserv/chancmds/welcome.c [new file with mode: 0644]
chanserv/chanserv.h
chanserv/mkcommandlist.pl [new file with mode: 0755]
chanserv/refactor.pl [new file with mode: 0755]
chanserv/usercmds.c [deleted file]
chanserv/usercmds/Makefile [new file with mode: 0644]
chanserv/usercmds/commandlist.c [new file with mode: 0644]
chanserv/usercmds/deluser.c [new file with mode: 0644]
chanserv/usercmds/info.c [new file with mode: 0644]
chanserv/usercmds/language.c [new file with mode: 0644]
chanserv/usercmds/listflags.c [new file with mode: 0644]
chanserv/usercmds/spewdb.c [new file with mode: 0644]
chanserv/usercmds/spewemail.c [new file with mode: 0644]
chanserv/usercmds/spewpass.c [new file with mode: 0644]
chanserv/usercmds/suspenduser.c [new file with mode: 0644]
chanserv/usercmds/suspenduserlist.c [new file with mode: 0644]
chanserv/usercmds/unsuspenduser.c [new file with mode: 0644]
chanserv/usercmds/usercomment.c [new file with mode: 0644]
chanserv/usercmds/userflags.c [new file with mode: 0644]
chanserv/usercmds/whois.c [new file with mode: 0644]