> @@ -500,8 +500,10 @@
>  
>               server = server_find_tag(logitem->servertag);
>               if (logitem->type == LOG_ITEM_TARGET &&
> -                 server != NULL && !server->ischannel(*logitem->name))
> -                     log_close(log);
> +                 server != NULL && !server->ischannel(*logitem->name)) {
> +                     if (log->temp) log_close(log);
> +                     else log_stop_logging(log);
> +             }

This is actually useless, there's if (!log->temp ..) a few lines up :)

>       log = logs_find_item(LOG_ITEM_TARGET, item->name, item->server, NULL);
> -        if (log != NULL) log_close(log);
> +        if (log != NULL) {
> +             if (log->temp) log_close(log);
> +             else log_stop_logging(log);
> +     }

but this is right .. except I don't think it should stop logging either,
after rejoining to the channel wouldn't start logging again then, or if there
was multiple channels being logged to same log it wouldn't be nice to close
the log then either. so, if (log != NULL) -> if (log != NULL && log->temp)
is what I'll do :)


Reply via email to