Release Permission plugin
you just need to add peoples xuid here : Vip_xuids=xuid_here,xuid_here,xuid_here
but not in this plugin...it needs to go in the sv_config.ini in the addon folder
[Image: b_560x95.png]

[Image: b_560x95.png]
[Image: b_560x95.png]
Reply

@Pozzuh

Yeah I guess I got a little confuzed. The !add command is from GodPlugin and is used to put xuids in permission groups. I have asked Ozone about this.
Reply

Sky just tried to help. No need to insult him.
[Image: MaEIQ.png]
Reply

(09-05-2012, 19:42)Pozzuh Wrote: Sky just tried to help. No need to insult him.

Yeah my bad. I just took his answer as an insult. I allready stated that I have to manually add them to my ini.

Im still not sure if its an addon, permission plugin, god plugin, or user error. I am unable to get into it right now.

The reason I originally thought it was a permission plugin problem was that even though I am using !add command which is from another plugin, it only controls settings of the permission plugin. If I use Moderator or Admin it works. But any custom groups will not. Custom groups I create with the permission plugin settings in my ini.

Does anyone else use custom groups with permission plugin?
Reply

i just created few custom groups, its no good as either u have to type every command manually or it just dosnt work, also a greeting plugin dosnt even regocnize the ranks just says player joined server when it should say welcome player(rank) player(name) to server.

i dunno why it acts like this...
Reply

ive added a few custom groups, including Senior Mods and VIPS, all work as expected.

Usergroups=Admin,Moderator,User,Senior_Moderator,Trainee_Moderator,VIP

//Add admin xuids here (Go ingame and use !getxuid)
Admin_xuids=
//Admins can use all commands (Do not change!).
Admin_commands=*ALL*
//Add moderator xuids here
Moderator_xuids=
//Add commands moderators can use here
Moderator_commands=!tempbanc,!tmpban
//VIP xuids
VIP_xuids=
//VIP cmds
VIP_commands=
//Trainee_Moderator_xuids
Trainee_Moderator_xuids=!kickc
//Add commands moderators can use here
Trainee_Moderator_commands=
//super_mod
Senior_Moderator_xuids=
//super_mod_commands
Senior_Moderator_commands=!tempbanc,!tp,!tmpban

//Add commands everyone can use
User_commands=
//Everyone who isn't in any other group is a user (Do not change!).
User_xuids=*EVERYONE*
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

Reply

(12-10-2012, 18:38)hillbilly Wrote: ive added a few custom groups, including Senior Mods and VIPS, all work as expected.

Usergroups=Admin,Moderator,User,Senior_Moderator,Trainee_Moderator,VIP

//Add admin xuids here (Go ingame and use !getxuid)
Admin_xuids=
//Admins can use all commands (Do not change!).
Admin_commands=*ALL*
//Add moderator xuids here
Moderator_xuids=
//Add commands moderators can use here
Moderator_commands=!tempbanc,!tmpban
//VIP xuids
VIP_xuids=
//VIP cmds
VIP_commands=
//Trainee_Moderator_xuids
Trainee_Moderator_xuids=!kickc
//Add commands moderators can use here
Trainee_Moderator_commands=
//super_mod
Senior_Moderator_xuids=
//super_mod_commands
Senior_Moderator_commands=!tempbanc,!tp,!tmpban

//Add commands everyone can use
User_commands=
//Everyone who isn't in any other group is a user (Do not change!).
User_xuids=*EVERYONE*
well... only thing i have diffrent from u is that i dont have those //lines as they shouldnt be necessary

edit: ok i think u cant make it so if u create a group for certain people (mainly to identify them) u cant let them use *all* commands... u have to put them one by one -.-
Reply

Hey guys,

Just thought I'd make a quick addition to this great plugin which is protected XUID commands, basically a friend asked if it was possible to protect specific XUID's against commands such as kicks, bans etc., so basically I have altered the plugin source to allow for this.

Essentially it looks like a group but its simply a list of assigned XUID's that get checked by the plugin along with commands you set that you want to protect, add the following to your sv_config.ini file under the [Permission] heading.

Code:
//XUID safe commands, the following id's will be protected from the commands following this line, these are comma seperated Protected_xuids= //Commands that the above xuids are protected from, E.g. !ban,!kick Protected_commands=

Source:
Code:
using System; using System.Collections.Generic; using System.Text; using Addon; //Pozzuh xuid = 0110000102fd9a03 namespace _PermissionPlugin { public class _PermissionPlugin : CPlugin { public List<string> Admins; public List<string> UserGroups; public override void OnServerLoad() { ServerPrint("Permission plugin loaded. Author: Pozzuh. Version 1.0 Beta"); initUserGroups(); firstStart(); } void firstStart() { if (GetServerCFG("Permission", "Usergroups", "x") == "x") SetServerCFG("Permission", "Usergroups", "Admin,Moderator,User"); if (GetServerCFG("Permission", "Admin_xuids", "x") == "x") SetServerCFG("Permission", "Admin_xuids", "xuid1,xuid2,xuid3"); if (GetServerCFG("Permission", "Admin_commands", "x") == "x") SetServerCFG("Permission", "Admin_commands", "*ALL*"); if (GetServerCFG("Permission", "Moderator_xuids", "x") == "x") SetServerCFG("Permission", "Moderator_xuids", "xuid1,xuid2,xuid3"); if (GetServerCFG("Permission", "Moderator_commands", "x") == "x") SetServerCFG("Permission", "Moderator_commands", "!help,!getxuid,!gettype"); if (GetServerCFG("Permission", "User_commands", "x") == "x") SetServerCFG("Permission", "User_commands", "!help,!getxuid,!gettype"); if (GetServerCFG("Permission", "User_xuids", "x") == "x") SetServerCFG("Permission", "User_xuids", "*EVERYONE*"); } void initUserGroups() { UserGroups = new List<string>(); string UserGroups_string = GetServerCFG("Permission", "Usergroups", "Admin,Moderator,User"); foreach (string Group in UserGroups_string.Split(',')) UserGroups.Add(Group); } List<string> getUsersInGroup(string groupname) { List<string> group = new List<string>(); string group_string = GetServerCFG("Permission", groupname + "_xuids", " "); if (group_string != " ") foreach (string xuid in group_string.Split(',')) group.Add(xuid); else if (groupname != "User") ServerPrint("No users set for group: " + groupname); return group; } List<string> getCommandsAllowedInGroup(string groupname) { List<string> group = new List<string>(); string group_string = GetServerCFG("Permission", groupname + "_commands", " "); if (group_string != " ") foreach (string cmd in group_string.Split(',')) group.Add(cmd); else ServerPrint("No commands set for group: " + groupname); return group; } string getUserGroup(string xuid) { foreach (string group in UserGroups) { List<string> usersInGroup = new List<string>(); usersInGroup = getUsersInGroup(group); if (usersInGroup.Contains(xuid)) return group; } return "User"; } List<string> getProtectedCommands() { List<string> commands = new List<string>(); string _commands = GetServerCFG("Permission", "Protected_commands", ""); if (!string.IsNullOrEmpty(_commands)) { foreach (string _command in _commands.Split(',')) { commands.Add(_command); } } else { ServerPrint("No protected commands were found"); } return commands; } ServerClient determinePlayer(string msg) { List<ServerClient> clients = GetClients(); // Break the message down string[] chunks = msg.Split(' '); foreach (string chunk in chunks) { // Loop through each client and see if a client number/name matches foreach (ServerClient client in clients) { if (client.ClientNum.ToString() == chunk || client.Name == chunk || client.Name.ToLower().Contains(chunk)) { return client; } } } return null; } public override ChatType OnSay(string Message, ServerClient Client) { string userIsInGroup = getUserGroup(Client.XUID); string lowMsg = Message.ToLower(); // Check if a command was issued if (!lowMsg.StartsWith("!")) return ChatType.ChatAll; if (lowMsg.StartsWith("!getxuid")) //Can't be used in the permission plugin OH THE IRONY { TellClient(Client.ClientNum, "Your xuid is: \'" + Client.XUID + "\'.", true); return ChatType.ChatNone; } if (lowMsg.StartsWith("!gettype")) //Can't be used in the permission plugin OH THE IRONY { TellClient(Client.ClientNum, "Your user type is: \'" + userIsInGroup + "\'.", true); return ChatType.ChatNone; } if (lowMsg.StartsWith("!help") || lowMsg.StartsWith("!cmdlist")) { List<string> allowed_commands = getCommandsAllowedInGroup(userIsInGroup); string msg = "You can use the following commands^1:^7 "; for (int i = 0; i < allowed_commands.Count; i++) { if (i == (allowed_commands.Count - 2)) msg += allowed_commands[i] + "^1 and^7 "; else if (i == (allowed_commands.Count - 1)) msg += allowed_commands[i] + "^1."; else msg += allowed_commands[i] + "^1,^7 "; } TellClient(Client.ClientNum, msg, true); return ChatType.ChatNone; } // Check if the user is allowed to use the command on the chosen user string protected_xuids = GetServerCFG("Permission", "Protected_xuids", ""); List<string> protected_commands = getProtectedCommands(); ServerClient against_player = determinePlayer(Message); if (against_player != null && protected_xuids.Length > 0 && protected_commands.Count > 0) { foreach (string command in protected_commands) { if (lowMsg.Split(' ')[0] == command && protected_xuids.Contains(against_player.XUID)) { TellClient(Client.ClientNum, "^1You aren't allowed to use that command against ^7" + against_player.Name, true); return ChatType.ChatNone; } } } if (userIsInGroup != "Admin") { List<string> allowed_commands = getCommandsAllowedInGroup(userIsInGroup); if (allowed_commands.Contains(lowMsg.Split(' ')[0])) return ChatType.ChatContinue; else { TellClient(Client.ClientNum, "^1You aren't allowed to use that command!", true); return ChatType.ChatNone; } } return ChatType.ChatContinue; } } }

I have also attached a tested and working DLL for the plugin, hope this helps others.

.zip   aaaPermissionPlugin.zip (Size: 3.49 KB / Downloads: 56)
I now host all my MW3 projects on my private GIT repo
Reply

Sorry for the double post, I have updated my above post as I found an issue with the update that caused un-expected behavior.

The issue is fixed now and everything above has been updated.
I now host all my MW3 projects on my private GIT repo
Reply

(01-10-2013, 12:59)SgtLegend Wrote: Sorry for the double post, I have updated my above post as I found an issue with the update that caused un-expected behavior.

The issue is fixed now and everything above has been updated.
sorry to be pain in the b*tt but is that plugin u posted compatible with teknomw3?
i host my server there mainly because of more skilled players and i find them funnier for some reason.
i do own steam version too but i dont rlly use it
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Rainbow [Release] Plugin ReservedSlot v1.3 frst_ 1 4,991 11-08-2018, 19:17
Last Post: frst_
Tongue [Release] MW3 Shop plugin Dude 56 51,165 03-25-2018, 05:18
Last Post: [email protected]
  [Release] FIXED SPEED PLUGIN hillbilly 2 5,641 06-02-2016, 20:23
Last Post: clacki
  [Release] Bots Plugin For Users Casper 22 39,809 08-22-2015, 17:45
Last Post: SnapBacks
  [Release] God Plugin v5.0 [Ingame Rcon Tool] OzonE 464 335,111 06-27-2015, 15:38
Last Post: bluedot
  [Release] Anti Hardscope Plugin 8q4s8 26 27,548 06-20-2015, 22:44
Last Post: urj88419
  [Release] ProMod Plugin zxz0O0 875 760,792 03-25-2015, 22:02
Last Post: kris
  [Release] [Discontinued] Speed Plugin Pozzuh 164 121,751 10-06-2014, 12:56
Last Post: Nekochan
  [help]how create a ping plugin clacki 3 5,071 09-13-2014, 01:23
Last Post: clacki
  Help How Compile Mw3 Plugin By VB 2010 clacki 3 5,346 06-11-2014, 11:55
Last Post: SgtLegend

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.