[srvx-commits] CVS: services/src chanserv.c,1.249,1.250 chanserv.help,1.35,1.36
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-07-25 03:00:12
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv5517/src
Modified Files:
chanserv.c chanserv.help
Log Message:
Update ban reasons in eject_user() when a previously existing ban is encountered.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.249
retrieving revision 1.250
diff -C2 -r1.249 -r1.250
*** chanserv.c 25 Jul 2002 01:27:03 -0000 1.249
--- chanserv.c 25 Jul 2002 03:00:07 -0000 1.250
***************
*** 225,228 ****
--- 225,229 ----
#define CSMSG_KICK_BAN_DONE "Kickbanned $b%s$b from %s."
#define CSMSG_BAN_DONE "Banned $b%s$b from %s."
+ #define CSMSG_REASON_CHANGE "Reason for ban $b%s$b changed."
#define CSMSG_BAN_EXTENDED "Extended ban for $b%s$b expires in %s."
#define CSMSG_BAN_REMOVED "Matching ban(s) for $b%s$b removed."
***************
*** 3345,3351 ****
if(match_ircglobs(bData->mask, ban))
{
/* The ban is redundant; there is already a ban
with the same effect in place. */
! if(bData->expires && !irccasecmp(bData->mask, ban))
{
int reset = 0;
--- 3346,3365 ----
if(match_ircglobs(bData->mask, ban))
{
+ int exact = !irccasecmp(bData->mask, ban);
/* The ban is redundant; there is already a ban
with the same effect in place. */
!
! if(exact)
! {
! if(bData->reason) free(bData->reason);
! bData->reason = strdup(reason);
!
! chanserv_notice(user, CSMSG_REASON_CHANGE, ban);
! if(!bData->expires)
! {
! return 0;
! }
! }
! if(exact && bData->expires)
{
int reset = 0;
Index: chanserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.help,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** chanserv.help 24 Jul 2002 23:58:50 -0000 1.35
--- chanserv.help 25 Jul 2002 03:00:09 -0000 1.36
***************
*** 108,112 ****
"/msg $C ADDBAN <#channel> <mask|nick> [Reason]",
"${command/ADDBAN/access}",
! "Adds a ban to the channels permanent ban list, remaining in effect until removed with the DELBAN command.",
"$uSee Also:$u bans, delban, mdelban");
"ADDCOOWNER" ("$bADDCOOWNER$b",
--- 108,112 ----
"/msg $C ADDBAN <#channel> <mask|nick> [Reason]",
"${command/ADDBAN/access}",
! "Adds a ban to the channels permanent ban list, remaining in effect until removed with the DELBAN command. If it exactly matches an existing ban already in the list, the reason will be updated. If the existing ban was a timed ban, it will be extended into a permanent ban.",
"$uSee Also:$u bans, delban, mdelban");
"ADDCOOWNER" ("$bADDCOOWNER$b",
***************
*** 149,153 ****
"/msg $C ADDTIMEDBAN <#channel> <mask|nick> <Duration> [Reason]",
"${command/ADDTIMEDBAN/access}",
! "Adds an automatically expiring ban to the channel ban list. This command behaves in the exact same fashion as ADDBAN with the exception that the bans are automatically removed after the user-supplied duration. Timed bans can be removed with the DELBAN command, as with permanent bans.",
"$uSee Also:$u addban, bans, delban, durations");
"ALLOWREGISTER" ("$bALLOWREGISTER$b",
--- 149,153 ----
"/msg $C ADDTIMEDBAN <#channel> <mask|nick> <Duration> [Reason]",
"${command/ADDTIMEDBAN/access}",
! "Adds an automatically expiring ban to the channel ban list. This command behaves in the exact same fashion as ADDBAN with the exception that the bans are automatically removed after the user-supplied duration. If it exactly matches an existing ban already in the list, the reason will be updated. If the existing ban was a timed ban, it will be extended. Timed bans can be removed with the DELBAN command, as with permanent bans.",
"$uSee Also:$u addban, bans, delban, durations");
"ALLOWREGISTER" ("$bALLOWREGISTER$b",
|