LEVEL command now resets user level
This commit is contained in:
parent
201334bbd6
commit
5a82be7de7
3 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue