Commit ca54bacf authored by Imran Hussain's avatar Imran Hussain
Browse files

Fix #12: ignore the old protection flags in favour for the new system

parent 8021cbdd
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -68,8 +68,10 @@ 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 & 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;

    /* ignore the old protection flags in favour for the new def/att system */
	//if (!cp_test(&attacker, CP_PROTECT)) prot_at = 0;
	//if (prot_vi == 0 && cm_test(&victim, CM_PROTECTED)) prot_vi = 1;

	/* attacker was stronger, success */
	if (prot_at >= prot_vi) success = 1;