]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/chanserv.c
Various changes to support authname being stored inside the authext.
[irc/quakenet/newserv.git] / chanserv / chanserv.c
index a4d05fba7e06588f7113d46ddf63b5912d15c64b..09bcd4254abd309aa86fb9c0db89a19f98748cd9 100644 (file)
@@ -18,67 +18,6 @@ int chanserv_init_status;
 sstring **chantypes;
 sstring *cs_quitreason;
 
-const flag rcflags[] = {
-  { 'a', QCFLAG_AUTOOP },
-  { 'b', QCFLAG_BITCH },
-  { 'c', QCFLAG_AUTOLIMIT },
-  { 'e', QCFLAG_ENFORCE },
-  { 'f', QCFLAG_FORCETOPIC },
-  { 'g', QCFLAG_AUTOVOICE },
-  { 'i', QCFLAG_INFO },
-  { 'j', QCFLAG_JOINED },
-  { 'k', QCFLAG_KNOWNONLY },
-  { 'p', QCFLAG_PROTECT },
-  { 's', QCFLAG_NOINFO },
-  { 't', QCFLAG_TOPICSAVE },
-  { 'v', QCFLAG_VOICEALL },
-  { 'w', QCFLAG_WELCOME },
-  { 'z', QCFLAG_SUSPENDED },
-  { '\0', 0 } };   
-
-const flag rcuflags[] = {
-  { 'a', QCUFLAG_AUTOOP },
-  { 'b', QCUFLAG_BANNED },
-  { 'd', QCUFLAG_DENY },
-  { 'g', QCUFLAG_AUTOVOICE },
-  { 'i', QCUFLAG_INFO },
-  { 'j', QCUFLAG_AUTOINVITE },
-  { 'k', QCUFLAG_KNOWN },
-  { 'm', QCUFLAG_MASTER },
-  { 'n', QCUFLAG_OWNER },
-  { 'o', QCUFLAG_OP },
-  { 'p', QCUFLAG_PROTECT },
-  { 'q', QCUFLAG_QUIET },
-  { 's', QCUFLAG_NOINFO },
-  { 't', QCUFLAG_TOPIC },
-  { 'v', QCUFLAG_VOICE },
-  { 'w', QCUFLAG_HIDEWELCOME },
-  { '\0', 0 } };
-
-const flag ruflags[] = {
-  { 'a',  QUFLAG_ADMIN },
-  { 'd',  QUFLAG_DEV },
-  { 'D',  QUFLAG_CLEANUPEXEMPT },
-  { 'g',  QUFLAG_GLINE },
-  { 'G',  QUFLAG_DELAYEDGLINE },
-  { 'h',  QUFLAG_HELPER },
-  { 'i',  QUFLAG_INFO },
-  { 'L',  QUFLAG_NOAUTHLIMIT },
-  { 'n',  QUFLAG_NOTICE },
-  { 'o',  QUFLAG_OPER },
-  { 'p',  QUFLAG_PROTECT },
-  { 'q',  QUFLAG_STAFF },
-  { 's',  QUFLAG_NOINFO },
-  { 'T',  QUFLAG_TRUST },
-  { 'z',  QUFLAG_SUSPENDED },
-  { '\0', 0 } };
-
-const flag mdflags[] = {
-  { 'l', MDFLAG_LIMIT },
-  { 'b', MDFLAG_BANNED },
-  { 'u', MDFLAG_ACTLIMIT },
-  { '\0', 0 } };
-
 void chanservfreestuff();
 void chanservfinishinit(int hooknum, void *arg);
 
@@ -116,7 +55,7 @@ void _init() {
     chanservcommandinit();
     chanservaddcommand("showcommands", 0, 1, cs_doshowcommands, "Lists available commands.","Usage: SHOWCOMMANDS [<mask>]\nPrints a list of commands currently available to you, where:\nmask - Mask of commands to list (* or ? are wildcards).  If no mask is specified,\n       all available commands are displayed.");
     chanservaddcommand("quit", QCMD_DEV, 1, cs_doquit, "Makes the bot QUIT and \"reconnect\".","");
-    chanservaddcommand("setquitreason", QCMD_DEV, 1, cs_doquit, "Sets the reason to be sent when quitting due to an unload.","");
+    chanservaddcommand("setquitreason", QCMD_DEV, 1, cs_dosetquitreason, "Sets the reason to be sent when quitting due to an unload.","");
     chanservaddcommand("rename", QCMD_DEV, 1, cs_dorename, "Changes the bot's name.","");
     chanservaddcommand("rehash", QCMD_DEV, 0, cs_dorehash, "Reloads all text from database.","");
     /* Make "HELP" take 2 arguments so things like "HELP chanflags #channel" work.  Any junk after the command will go into arg 2 and be ignored. */
@@ -227,6 +166,7 @@ void _fini() {
 
   chanservremovecommand("showcommands", cs_doshowcommands);
   chanservremovecommand("quit", cs_doquit);
+  chanservremovecommand("setquitreason", cs_dosetquitreason);
   chanservremovecommand("rename", cs_dorename);
   chanservremovecommand("rehash", cs_dorehash);
   chanservremovecommand("help", cs_dohelp);