I've just fixed the problem with Version 2.0 with it deleting wrong messages:
In Instant Message.plSearch for
for ($a = 0; $a < @messages; $a++) {
if($FORM{"message$a"} != 1) { print FILE "$messages[$a]"; }
}
fclose(FILE);
if($INFO{'caller'} == 1) { $yySetLocation = qq~$scripturl?action=im~; }
***Please check the code you edit is within the Del_Some_Im sub- lots of subs have similar code!
and replace it with:
for ($a = 0; $a < @messages; $a++) {
chomp $messages[$a];
# ONLY delete MSG with correct ID
($musername, $msub, $mdate, $mmessage, $messageid, $mip) = split(/\|/,$messages[$a]);
if($FORM{"message$messageid"} != 1) { print FILE "$messages[$a]\n"; }
}
fclose(FILE);
if($INFO{'caller'} == 1) { $yySetLocation = qq~$scripturl?action=im~; }
and search for:
if($imnew eq "") { $imdummy = "|"; }
if($FORM{"message$a"} != 1) { print FILE "$messages[$a]\n"; } else { print TRANSFER "$messages[$a]$imdummy|$source\n"; }
and replace with:
if($imnew eq "") { $imdummy = "|"; }
if($FORM{"message$imessageid"} != 1) { print FILE "$messages[$a]\n"; } else { print TRANSFER "$messages[$a]$imdummy|$source\n"; }
and find
<td class="$windowcss" bgcolor="$windowbg" align="center" rowspan="2"><input type="checkbox" name="message$counter" class="$windowcss" bgcolor="$color{'windowbg'}" value="1" style="cursor:pointer;"></td>
swapping i for
<td class="$windowcss" bgcolor="$windowbg" align="center" rowspan="2"><input type="checkbox" name="message$messageid" class="$windowcss" bgcolor="$color{'windowbg'}" value="1" style="cursor:pointer;"></td>
and find 3 lines later:
<td class="$windowcss" bgcolor="$windowbg" align="center"><font size=2><input type="checkbox" name="message$counter" class="$windowcss" bgcolor="$color{'windowbg'}" value="1" style="cursor:pointer;"></font></td>
swapping it for:
<td class="$windowcss" bgcolor="$windowbg" align="center"><font size=2><input type="checkbox" name="message$messageid" class="$windowcss" bgcolor="$color{'windowbg'}" value="1" style="cursor:pointer;"></font></td>
your code might be alittle different, because mines pretty heavily edited, but the changes are small, about a word in each case. Look for it and do it by hand.