Menu

#2 Only allow admins to use "stats" command

open
nobody
None
5
2008-05-08
2008-05-08
Nate
No

I prefer not being able to allow players to see what each others have for gold/items. I think it adds more fun when two people fight each other. As such, I made a very minor patch to restrict the stats command to admin only. Ideally this is something that should go in gameserv.conf -- and I'm sure I'll get to that later.

*** backup-unmodified/do_stats.cpp 2008-05-06 10:41:46.000000000 -0500
--- do_stats.cpp 2008-05-07 15:30:29.000000000 -0500
***************
*** 36,41 ****
showstats(u, user->stats->getName().c_str());
}
}
! else
showstats(u, nick);
}
--- 36,45 ----
showstats(u, user->stats->getName().c_str());
}
}
! else if (isAdmin(user))
! {
showstats(u, nick);
+ }
+ else
+ notice(s_GameServ, u, "You lack the ability to peer into your enemies soul!");
}

Discussion

  • Nate

    Nate - 2008-05-14

    Patch to change the "stats" command to admin only

     
  • Nate

    Nate - 2008-05-14

    Logged In: YES
    user_id=148537
    Originator: YES

    File Added: stats_admin_only.diff

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.