Exemple #1
0
int __ircenv___start_all_irclist (IRCENV * ircenv)
{
    IRCLIST * iterator;
    IRC * irc;

    iterator = ircenv->__list_irc;
    while (iterator != NULL)
    {
        irc = (IRC *)(iterator->item);
        irc->init(irc);
        iterator = iterator->next;
    }
    return 0;
}
Exemple #2
0
int __ircenv___start_irclist (IRCENV * ircenv, int id)
{
    IRCLIST * iterator;
    IRC * irc;

    iterator = ircenv->__list_irc;
    while (iterator != NULL)
    {
        irc = (IRC *)(iterator->item);
        if (irc->id == id) break;
        iterator = iterator->next;
    }
    if (iterator != NULL)
    {
        irc->init(irc);
        return 0;
    }
    return -1;
}