Skip to content

Commit 914bf84

Browse files
committed
add ugly special case so that admins can't create polls on admin commands. fix #2388
1 parent 52a98d1 commit 914bf84

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ZkLobbyServer/autohost/Commands/CmdPoll.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override string Arm(ServerBattle battle, Say e, string arguments = null)
2525
var commandArgs = parts.Length > 1 ? parts[1] : null;
2626
commandToRun = battle.GetCommandByName(commandName);
2727
string reason;
28-
if (commandToRun.GetRunPermissions(battle, e.User, out reason) >= RunPermission.Vote && commandToRun.Access != AccessType.NoCheck)
28+
if (commandToRun.GetRunPermissions(battle, e.User, out reason) >= RunPermission.Vote && commandToRun.Access != AccessType.NoCheck && commandToRun.Access != AccessType.Admin && !(commandToRun.Access == AccessType.NotIngameNotAutohost && battle.IsAutohost))
2929
{
3030
return commandToRun.Arm(battle, e, commandArgs);
3131
}

0 commit comments

Comments
 (0)