[srvx-commits] CVS: services/src chanserv.c,1.296,1.297 chanserv.help,1.40,1.41
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-10-26 15:18:18
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv8747/src
Modified Files:
chanserv.c chanserv.help
Log Message:
make sure !wipeinfo doesn't work on higher-ranked users
document !wipeinfo
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.296
retrieving revision 1.297
diff -C2 -r1.296 -r1.297
*** chanserv.c 23 Oct 2002 12:37:53 -0000 1.296
--- chanserv.c 26 Oct 2002 15:18:15 -0000 1.297
***************
*** 4278,4286 ****
static MODCMD_FUNC(cmd_wipeinfo)
{
- /* TODO */
struct handle_info *victim;
! struct userData *ud;
REQUIRE_PARAMS(2);
if(!(victim = chanserv_get_handle_info(user, argv[1]))) return 0;
if(!(ud = GetTrueChannelAccess(channel->channel_info, victim)))
--- 4278,4286 ----
static MODCMD_FUNC(cmd_wipeinfo)
{
struct handle_info *victim;
! struct userData *ud, *actor;
REQUIRE_PARAMS(2);
+ actor = GetChannelAccess(channel->channel_info, user->handle_info);
if(!(victim = chanserv_get_handle_info(user, argv[1]))) return 0;
if(!(ud = GetTrueChannelAccess(channel->channel_info, victim)))
***************
*** 4289,4293 ****
return 0;
}
! if (ud->info) free(ud->info);
ud->info = NULL;
reply(CSMSG_WIPED_INFO_LINE, argv[1], channel->name);
--- 4289,4298 ----
return 0;
}
! if(ud->access >= actor->access)
! {
! reply(MSG_USER_OUTRANKED, victim->handle);
! return 0;
! }
! if(ud->info) free(ud->info);
ud->info = NULL;
reply(CSMSG_WIPED_INFO_LINE, argv[1], channel->name);
Index: chanserv.help
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.help,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** chanserv.help 21 Oct 2002 02:59:49 -0000 1.40
--- chanserv.help 26 Oct 2002 15:18:15 -0000 1.41
***************
*** 34,38 ****
" DEVOICE Remove voice from the specified user.",
" SUSPEND Suspend a user's access to a channel.",
! " UNSUSPEND Restore a user's access to a channel."
);
"BAN MANAGEMENT" ("$bBan Management Commands:$b",
--- 34,39 ----
" DEVOICE Remove voice from the specified user.",
" SUSPEND Suspend a user's access to a channel.",
! " UNSUSPEND Restore a user's access to a channel.",
! " WIPEINFO Remove a lower-ranked user's infoline."
);
"BAN MANAGEMENT" ("$bBan Management Commands:$b",
***************
*** 523,526 ****
--- 524,529 ----
"Voices the specified nick in the specified channel. If the channel is omitted, then $bvoice$b will be done in the channel where the command was given.",
"$uSee Also:$u devoice");
+ "WIPEINFO" ("/msg $C WIPEINFO <#channel> <nick|*account>",
+ "Removes the named user's infoline in the channel.");
"WLIST" ("/msg $C WLIST <#channel>",
"This command lists all users of level $bOwner$b on a channel's userlist.",
|