+ /* If an EUID was specified, throw away all messages except the correct one. */
+ if (mode == MSGS_EUID) {
+ long correct_msgnum;
+ int found_match = 0;
+
+ if ((num_msgs > 0) && (search_string) ) {
+ correct_msgnum = locate_message_by_euid(search_string, &CC->room);
+ if ( (num_msgs > 0) && (correct_msgnum >= 0L) ) {
+ for (i=0; i<num_msgs; ++i) {
+ if (msglist[i] == correct_msgnum) {
+ found_match = 1;
+ }
+ }
+ }
+ }
+ if (found_match) {
+ msglist[0] = correct_msgnum;
+ num_msgs = 1;
+ } else {
+ num_msgs = 0; /* didn't find the right one ... dump the rest */
+ }
+ mode = MSGS_ALL; /* treat it like 'read all' from now on */
+ }
+