Thread: [MW3] Server Addons [Update 08.02.2012] | ||
Join Date: Mar 2010 Posts: 220 |
AdminPlugin Idea: Plugins using commands which depend on admin checks, currently don't have many options on working with admin functionality. The Idea was to give Plugin developers more freedom on using admins by simplyfying that and extending the abilitys of the addon.dll. General Features: - Classes which derive from AdminPlugin get all features from the addon + the additional admin features - seperated admin.cfg (autogenerated with admin-examples if the admin.cfg is missing) Command Features: - !admins (list the names of all admins) - !addadmin <name> <xuid> (simply add a admin) - !reloadadmins (if you edit the admin.cfg file while the server is still running, you can call this command to update the admin table) Classes: - ServerAdmin (Class which holds information of an admin, similar to ServerClient) - Admin (Main Class holding the AdminPlugin Features) ServerAdmin Functions: - allowedToUse(command) Check if the admin is allowed to use the command - isImmuneToCmd(command) Check if the admin is immun against the command Admin Functions: - LoadAdmins() loads the admin.cfg and initializes all admins - GetAdmins() returns a list of ServerAdmins representing the admins defined in the admin.cfg - GetAdminFromClient(ServerClient) returns the Admin-Information of the Client - AddAdmin(name, xuid) add a new admin (which is also added in the admin.cfg) - isAdmin(ServerClient) check if the client is a admin - OnSayAfterAP(Message, ServerClient) this overrideable function is called after the AdminPlugin checked for admin related commands - The OnSay Function is sealed inside the AdminPlugin to ensure that derived classes don't get the event before the AdminPlugin Because i limit the usage of the AdminPlugin for derived classes only and sealing the OnSay Function, i ensure that AdminPlugin comes first regardless of the Plugin-Names. Additional Information: - the admin.cfg file is saved under admin\admin.cfg - just make a derived project, start the server and run loadAdmins() to generate the default admin.cfg Changelog: - v0.1.1 Beta | initial release Requirements: - @Nukem's Server Addon v1.190+ Usage: To Use the AdminPlugin, you have to set it as a reference in your Project. This is a simple Example how to use my Plugin: TEXT Code:
This Version is Beta and yet not tested on Linux. EDIT: I'm currently installing a Linux virtual machine and mw3-server to test the AdminPlugin on Linux. I hope there are some developers willing to try my Plugin ^^ Only registered and activated users can see links. __________________ |
|
TreffNix is offline |