310
inbound_action (session *sess, char *chan, char *from, char *text, int fromme, int id)
310
inbound_action (session *sess, char *chan, char *from, char *ip, char *text, int fromme, int id)
312
312
session *def = sess;
313
313
server *serv = sess->server;
314
314
struct User *user;
315
315
char nickchar[2] = "\000";
317
int privaction = FALSE;
324
326
/* it's a private action! */
325
328
/* find a dialog tab for it */
326
329
sess = find_dialog (serv, from);
327
330
/* if non found, open a new one */
328
331
if (!sess && prefs.autodialog)
329
sess = inbound_open_dialog (serv, from);
333
/* but only if it wouldn't flood */
334
if (flood_check (from, ip, serv, current_sess, 1))
335
sess = inbound_open_dialog (serv, from);
337
sess = serv->server_session;
341
sess = find_session_from_nick (from, serv);
342
/* still not good? */
344
sess = serv->front_session;
353
369
user->lasttalk = time (0);
372
inbound_make_idtext (serv, idtext, sizeof (idtext), id);
374
if (!fromme && !privaction)
358
376
if (is_hilight (from, text, sess, serv))
360
EMIT_SIGNAL (XP_TE_HCHANACTION, sess, from, text, nickchar, NULL, 0);
378
EMIT_SIGNAL (XP_TE_HCHANACTION, sess, from, text, nickchar, idtext, 0);
366
EMIT_SIGNAL (XP_TE_UACTION, sess, from, text, nickchar, NULL, 0);
384
EMIT_SIGNAL (XP_TE_UACTION, sess, from, text, nickchar, idtext, 0);
385
else if (!privaction)
386
EMIT_SIGNAL (XP_TE_CHANACTION, sess, from, text, nickchar, idtext, 0);
387
else if (sess->type == SESS_DIALOG)
388
EMIT_SIGNAL (XP_TE_DPRIVACTION, sess, from, text, idtext, NULL, 0);
368
EMIT_SIGNAL (XP_TE_CHANACTION, sess, from, text, nickchar, NULL, 0);
390
EMIT_SIGNAL (XP_TE_PRIVACTION, sess, from, text, idtext, NULL, 0);