Donate Share

GameServ IRC Services

Tracker: Patches

5 Only allow admins to use "stats" command - ID: 1960364
Last Update: Comment added ( nsanders )

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!");
}


Nate ( nsanders ) - 2008-05-08 15:56

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-05-14 21:32
Sender: nsanders


File Added: stats_admin_only.diff


Log in to comment.

Attached File ( 1 )

Filename Description Download
stats_admin_only.diff Patch to change the "stats" command to admin only Download

Change ( 1 )

Field Old Value Date By
File Added 277833: stats_admin_only.diff 2008-05-14 21:32 nsanders