Changeset 61fdba7 in code for cmd.c


Ignore:
Timestamp:
Sep 3, 2015, 5:54:33 PM (10 years ago)
Author:
Mike Belopuhov <mike@…>
Branches:
master
Children:
b8da4b3
Parents:
3347cd9
Message:

Allow to beep chaps lurking in different groups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cmd.c

    r3347cd9 r61fdba7  
    9191        icb_vis(whom, arg, ICB_MAXNICKLEN, VIS_SP);
    9292
     93        /* Search in the same group first */
    9394        LIST_FOREACH(s, &ig->sess, entry) {
    9495                if (strcmp(s->nick, whom) == 0)
    9596                        break;
     97        }
     98        if (s == NULL) {
     99                /* See if we can find someone else to beep */
     100                LIST_FOREACH(ig, &groups, entry) {
     101                        if (strcmp(is->group->name, ig->name) == 0)
     102                                continue;
     103                        LIST_FOREACH(s, &ig->sess, entry) {
     104                                if (strcmp(s->nick, whom) == 0)
     105                                        break;
     106                        }
     107                        if (s != NULL)
     108                                break;
     109                }
    96110        }
    97111        if (s == NULL) {
Note: See TracChangeset for help on using the changeset viewer.