Commit ca54bacf authored by Imran Hussain's avatar Imran Hussain

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

parent 8021cbdd
Pipeline #605 passed with stage
in 8 minutes and 6 seconds
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment