|
|
| |
session_t *s = session_find(session); // session pointer | session_t *s = session_find(session); // session pointer |
log_window_t *lw; | log_window_t *lw; |
char *ruid; |
|
|
char *fuid; /* file uid */ |
|
char *ruid; /* strange variable name (ofcorz uid) */ |
|
char *cuid = NULL; /* conference uid */ |
| |
/* olewamy jesli to irc i ma formatke irssi like, czekajac na irc-protocol-message */ | /* olewamy jesli to irc i ma formatke irssi like, czekajac na irc-protocol-message */ |
if (session_check(s, 0, "irc") && logs_log_format(s) == LOG_FORMAT_IRSSI) | if (session_check(s, 0, "irc") && logs_log_format(s) == LOG_FORMAT_IRSSI) |
return 0; | return 0; |
| |
class &= ~EKG_NO_THEMEBIT; | class &= ~EKG_NO_THEMEBIT; |
|
|
|
if (class != EKG_MSGCLASS_SENT && class != EKG_MSGCLASS_SENT_CHAT) { |
|
int recipients_count = array_count((char **) rcpts); |
|
|
|
if (recipients_count > 0) { |
|
struct conference *c = conference_find_by_uids(s, uid, (const char **) rcpts, recipients_count, 0); |
|
|
|
if (c) cuid = c->name; |
|
else debug("logs_handler() smth strange happen (c == NULL) && recipients_count > 0 [%d]\n", recipients_count); |
|
} |
|
} |
|
|
ruid = (class >= EKG_MSGCLASS_SENT) ? rcpts[0] : uid; | ruid = (class >= EKG_MSGCLASS_SENT) ? rcpts[0] : uid; |
| |
lw = logs_log_find(session, ruid, 1)->lw; |
if (cuid) fuid = cuid; |
|
else fuid = ruid; |
|
|
|
lw = logs_log_find(session, fuid, 1)->lw; |
| |
if (!lw) { | if (!lw) { |
debug("[LOGS:%d] logs_handler, shit happen\n", __LINE__); | debug("[LOGS:%d] logs_handler, shit happen\n", __LINE__); |