Addon Details

Watch - Add Favorite


1 out of 1 users claim this version works for them.
Does this version work for you?
2
w00ts
w00t!2

clients_reader - Version 1.0

posted on 2010-10-05 08:33:36
by Punisher-vip



Description

This is python library which can read Mani Admin Plugin's admins. It read clients.txt and can recognize admins by: steam ID, IP, Nick+Password. Also it can understand if client got nicks, ids and names more than 1 for each client. So here is an exaple to how to use it with python plugins: [code] import es, clients_reader as ma def player_activate(event_var): if ma.isAdmin(event_var['userid']) > 0: es.msg('Admin Has joined the game!') def player_chat(event_var): if ma.hasGroup('chat') > 0: es.msg('#green', event_var['text']) if event_var['text'] == '!admins': es.msg('Current admins are:') for userid in es.getUseridList(): if ma.isAdmin(userid): es.msg('#green', es.getplayername(userid)) [/code] Other available functions: ma.get_clients() -> reload clients.txt # Clietns would be reloaded on map change and on first import clients_reader ma.isAdmin(userid): -> int 0 - not n admin 1 - admin by steam 2 - admin by ip 3 - admin by nick+password ma.hasFlag(userid, flag): -> int -1 - not an admin 0 - do not have flag 1 - have flag in admin group 2 - have flag in immune group ma.hasGroup(userid, group): -> int -1 - not an admin 0 - do not have flag 1 - have admin group 2 - have immune group ma.AdminName(userid): 0 - not an admin -> int list of names -> list ma.AdminFlags(userid): 0 - not an admin -> int list of flags -> list ma.ImmuneFlags(userid): 0 - not an admin -> int list of flags -> list ma.AdminImmuneGroups(userid): 0 - not an admin -> int list of immune groups -> list ma.AdminAdminGroups(userid): 0 - not an admin -> int list of admin groups -> list

Installation

Extract files to your server. Create scripts with clients_reader module

Version Notes For 1.0

Updated on: 2010-10-05 08:33:36 EST by Punisher-vip (View Zip Contents)


( Previous Versions )