X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fm_privmsg.c;h=a47656e6c1d2f908ca42f58a2f50ec2813a6f422;hb=698f3048f5f4d26aa51629f60fbbab08068e2129;hp=c2b09ae125202eeff64cee56c4e4d41751a24951;hpb=c3727b053aa20cecf3984cc0c9c23b0140edf52c;p=ircu2.10.12-pk.git diff --git a/ircd/m_privmsg.c b/ircd/m_privmsg.c index c2b09ae..a47656e 100644 --- a/ircd/m_privmsg.c +++ b/ircd/m_privmsg.c @@ -115,15 +115,15 @@ int m_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) ClrFlag(sptr, FLAG_TS8); - if (feature_bool(FEAT_IDLE_FROM_MSG)) - cli_user(sptr)->last = CurrentTime; - if (parc < 2 || EmptyString(parv[1])) return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE); if (parc < 3 || EmptyString(parv[parc - 1])) return send_reply(sptr, ERR_NOTEXTTOSEND); + if (feature_bool(FEAT_IDLE_FROM_MSG) && (!cli_user(sptr)->lastmsg || strcmp(cli_user(sptr)->lastmsg, parv[parc - 1]))) + cli_user(sptr)->last = CurrentTime; + count = unique_name_vector(parv[1], ',', vector, MAXTARGETS); ccount = 0; @@ -211,15 +211,15 @@ int mo_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) ClrFlag(sptr, FLAG_TS8); - if (feature_bool(FEAT_IDLE_FROM_MSG)) - cli_user(sptr)->last = CurrentTime; - if (parc < 2 || EmptyString(parv[1])) return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE); if (parc < 3 || EmptyString(parv[parc - 1])) return send_reply(sptr, ERR_NOTEXTTOSEND); + if (feature_bool(FEAT_IDLE_FROM_MSG) && (!cli_user(sptr)->lastmsg || strcmp(cli_user(sptr)->lastmsg, parv[parc - 1]))) + cli_user(sptr)->last = CurrentTime; + count = unique_name_vector(parv[1], ',', vector, MAXTARGETS); for (i = 0; i < count; ++i) {