LEVEL command now resets user level

This commit is contained in:
Mark 2005-04-15 19:57:42 +00:00
parent 201334bbd6
commit 5a82be7de7
3 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,8 @@ Anything we add/remove/fix/change is in here (even our rants)
Fish (F), Mark (M), DeadNotBuried (D)
===============================================================================
* NeoStats * Version 3.0.a3-dev
- LEVEL command now resets user level so that users can cause NeoStats to
recheck their access rights after any settings changes. (M).
- Prevent ability to disable debug mode if DEBUG enabled to avoid all the
overrides necessary in code. (M)
- StatServ: Add FLATMAP option to prevent display of network layout in MAP

View file

@ -292,7 +292,7 @@ static int ss_server_del (CmdParams *cmdparams)
}
node = hash_lookup(serverstathash, cmdparams->av[1]);
if (node) {
ss = (serverstat *ss)hnode_get( node );
ss = (serverstat *)hnode_get( node );
hash_delete (serverstathash, node);
hnode_destroy (node);
ns_free (ss);

View file

@ -414,10 +414,14 @@ static int ns_cmd_level( CmdParams *cmdparams )
{
SET_SEGV_LOCATION();
if( cmdparams->ac < 1 ) {
/* Force recalc user level */
cmdparams->source->user->ulevel = -1;
irc_prefmsg( ns_botptr, cmdparams->source, __( "Your level is %d", cmdparams->source ), UserLevel( cmdparams->source ) );
} else {
Client * otheruser;
otheruser = FindUser( cmdparams->av[0] );
/* Force recalc user level */
otheruser->user->ulevel = -1;
if( !otheruser ) {
irc_prefmsg( ns_botptr, cmdparams->source, __( "User %s not found", cmdparams->source ), cmdparams->av[0] );
return NS_FAILURE;