]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Added BAN as an alias to PERMBAN.
authorsplidge <redacted>
Sun, 9 Mar 2008 16:19:40 +0000 (16:19 +0000)
committersplidge <redacted>
Sun, 9 Mar 2008 16:19:40 +0000 (16:19 +0000)
Made it clear that UNBAN is an alias for BANDEL.
Updated another couple of messages.

chanserv/chancmds/Makefile
chanserv/chancmds/ban.c [new file with mode: 0644]
chanserv/chancmds/commandlist.c
chanserv/chancmds/unban.c
chanserv/database/chanservdb_messages.c

index 28fd72b630d9860bb5f243614463c47bd18ea511..554ad6b9fcdb72fbc29f67dab16c5679803dfb8a 100644 (file)
@@ -6,5 +6,5 @@ all: Makefile chanserv_chancmds.so
 Makefile:
        ../mkcommandlist.pl chanserv_chancmds.so
 
-chanserv_chancmds.so: addchan.o adduser.o autolimit.o banclear.o bandel.o banlist.o bantimer.o chanflags.o chanlev.o chanlevhistory.o chanmode.o channelcomment.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 voice.o welcome.o commandlist.o 
+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 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 voice.o welcome.o commandlist.o 
         ld -shared -Bdynamic -o $@ $^ 
diff --git a/chanserv/chancmds/ban.c b/chanserv/chancmds/ban.c
new file mode 100644 (file)
index 0000000..b9f33db
--- /dev/null
@@ -0,0 +1,26 @@
+/* Automatically generated by refactor.pl.
+ *
+ *
+ * CMDNAME: permban
+ * CMDLEVEL: QCMD_AUTHED | QCMD_ALIAS
+ * CMDARGS: 3
+ * CMDDESC: Permanently bans a hostmask on a channel.
+ * CMDFUNC: csc_dopermban
+ * CMDPROTO: int csc_dopermban(void *source, int cargc, char **cargv);
+ * CMDHELP: Usage: BAN <channel> <hostmask> [<reason>]
+ * CMDHELP: Permanently bans the provided hostmask on the channel.  If the ban is
+ * CMDHELP: removed from the channel e.g. by a channel op or the BANTIMER feature, the
+ * CMDHELP: ban will be reapplied if a matching user joins the channel.  Bans
+ * CMDHELP: set with the PERMBAN command can be removed via BANCLEAR or BANDEL.  Any users
+ * CMDHELP: matching the hostmask will be kicked from the channel.
+ * CMDHELP: Where:
+ * CMDHELP: channel  - channel to set a ban on
+ * CMDHELP: hostmask - hostmask (nick!user@host) to ban.
+ * CMDHELP: reason   - reason for the ban.  This will be used in kick messages when kicking
+ * CMDHELP:            users matching the ban.  If this is not provided the generic message
+ * CMDHELP:            \"Banned.\" will be used.
+ * CMDHELP: BAN requires master (+m) access on the named channel.
+ * CMDHELP: BAN is an alias for PERMBAN.
+ */
+
+/* code in permban.c */
index 0146879e5162ce712c729c42a65dffe8410990bc..a49b52b518a5ea60b41830f181fc6e24238ca93b 100644 (file)
@@ -6,6 +6,7 @@
 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);
@@ -47,6 +48,7 @@ void _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>]\nThis command shows or changes the number of free slots to keep on the channel\nwhen autolimit (see CHANFLAGS) is enabled.  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("permban", 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 via 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");
@@ -76,7 +78,7 @@ void _init() {
   chanservaddcommand("suspendchan", QCMD_OPER, 2, csc_dosuspendchan, "Suspends a channel from the bot.", "");
   chanservaddcommand("suspendchanlist", QCMD_HELPER, 1, csc_dosuspendchanlist, "Lists suspended channels.", "");
   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 via BANCLEAR or BANDEL.  Any users matching the hostmask \nwill 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.\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");
@@ -89,6 +91,7 @@ void _fini() {
   chanservremovecommand("addchan", csc_doaddchan);
   chanservremovecommand("adduser", csc_doadduser);
   chanservremovecommand("autolimit", csc_doautolimit);
+  chanservremovecommand("permban", csc_dopermban);
   chanservremovecommand("banclear", csc_dobanclear);
   chanservremovecommand("bandel", csc_dobandel);
   chanservremovecommand("banlist", csc_dobanlist);
index 7ee5699925b16e1b2172cc8bd304205110a2f00a..20b14534f34670b8663607218be541a2d118922c 100644 (file)
@@ -11,6 +11,7 @@
  * CMDHELP: ban     - either a ban mask (nick!user@host), or #number (see BANLIST)
  * CMDHELP: Removing channel bans requires operator (+o) access on the named channel.
  * CMDHELP: Removing persistent bans requires master (+m) access on the named channel.
+ * CMDHELP: UNBAN is an alias for BANDEL.
  */
 
 /* This is an alias for BANDEL */
index 00c1ee1388edae29750894d9c7415cf5e681299a..eeaf75f9f3696bd6d417530399781161d25f1023 100644 (file)
@@ -53,7 +53,7 @@ char *defaultmessages[MAXMESSAGES] = {
   /* 44 */ "Username or password incorrect.",
   /* 45 */ "You are now logged in as %s.",
   /* 46 */ "User %s created, account information will be sent to \"%s\"",
-  /* 47 */ "A user with that name already exists.  Change your nick and try again.",
+  /* 47 */ "A user with that name already exists.  If you have said HELLO before, use AUTH to\nlogin, or REQUESTPASSWORD if you have forgotten the password.  Otherwise,\nplease change your nick and try again.",
   /* 48 */ "You're already on %s.",
   /* 49 */ "You're not on %s.",
   /* 50 */ "You're already opped on %s.",