Diouf's team-mate Rodolph Austin had already been dismissed for fouling Ashley Barnes and Brighton substitute Inigo Calderon was also shown a red card by referee Graham Scott in the npower Championship clash.
Gus Poyet's Brighton booked their place in the play-offs but the dismissals proved the main talking point.
Diouf made his crazy gesture moments after stroking home a 74th-minute equaliser from the penalty spot. McDermott plans to appeal against Austin's red card but he refused to excuse Diouf and said: "I can't understand him and maybe he can't understand himself.
"What he did is not clever. He has got to learn because he is going to miss three games now. He is really upset but he has to be accountable for his actions. These things are dotted around his career. He can be a match-winner and I've told him he has to let his football do the talking.
"If you run 50 yards and make a gesture, that is not a heat of the moment thing. I believe 100 per cent he can learn from this - he has to.
"Austin just bumped into their player so no way was it a sending-off offence and we will appeal against it."