Commit 3a1f2541 authored by Andrew Price's avatar Andrew Price
Browse files

Use the correct mask and shift to get attacker protection

Ref: #12
parent a940af45
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg)

	/* what are the protection levels */
	int prot_vi = (victim.record.chatprivs & CP_PROTMASK) >> CP_PROTSHIFT;
	int prot_at = (attacker.record.chatprivs & CM_PROTMASK) >> CM_PROTSHIFT;
	int prot_at = (attacker.record.chatprivs & CP_PROTMASK) >> CP_PROTSHIFT;
	if (!cp_test(&attacker, CP_PROTECT)) prot_at = 0;
	if (prot_vi == 0 && cm_test(&victim, CM_PROTECTED)) prot_vi = 1;