Page 1 of 1

[SM]Disable exceptions in server console

Posted: Thu Mar 05, 2020 11:08 am
by Tetragromaton

Re: [SM]Disable exceptions in server console

Posted: Thu Mar 05, 2020 5:15 pm
by Ayuto
Cool stuff! :)

Instead of using ClientCommand and implementing your own admin system I would recommend using TypedClientCommand.

Syntax: Select all

from commands.typed import TypedClientCommand

@TypedClientCommand('exceptions', 'my_plugin.exceptions')
def ShowExceptionStreak(info):
SayText2('\x04 Counting \x02' + str(ExceptionStreak) + '\x04 exceptions').send(info.index)

Server owners can then grant permissions to run this command by using the following in the server console:

Code: Select all

sp auth permission player add <player> my_plugin.exceptions


See also:
http://wiki.sourcepython.com/general/config-auth.html