mcabber/mcabber/hooks.c
changeset 1783 af3de54ef986
parent 1780 e4378fbab5d7
child 1784 250ad919f03f
equal deleted inserted replaced
1782:97803c87d82d 1783:af3de54ef986
   201     message_flags = HBB_PREFIX_ERR | HBB_PREFIX_IN;
   201     message_flags = HBB_PREFIX_ERR | HBB_PREFIX_IN;
   202     scr_LogPrint(LPRINT_LOGNORM, "Error message received from <%s>", bjid);
   202     scr_LogPrint(LPRINT_LOGNORM, "Error message received from <%s>", bjid);
   203   }
   203   }
   204 
   204 
   205   // Note: the hlog_write should not be called first, because in some
   205   // Note: the hlog_write should not be called first, because in some
   206   // cases scr_WriteIncomingMessage() will load the history and we'd
   206   // cases scr_write_incoming_message() will load the history and we'd
   207   // have the message twice...
   207   // have the message twice...
   208   scr_WriteIncomingMessage(bjid, wmsg, timestamp, message_flags, mucnicklen);
   208   scr_write_incoming_message(bjid, wmsg, timestamp, message_flags, mucnicklen);
   209 
   209 
   210   // We don't log the modified message, but the original one
   210   // We don't log the modified message, but the original one
   211   if (wmsg == mmsg)
   211   if (wmsg == mmsg)
   212     wmsg = bmsg;
   212     wmsg = bmsg;
   213 
   213 
   334       }
   334       }
   335     }
   335     }
   336   }
   336   }
   337 
   337 
   338   // Note: the hlog_write should not be called first, because in some
   338   // Note: the hlog_write should not be called first, because in some
   339   // cases scr_WriteOutgoingMessage() will load the history and we'd
   339   // cases scr_write_outgoing_message() will load the history and we'd
   340   // have the message twice...
   340   // have the message twice...
   341   if (encrypted == ENCRYPTED_PGP)
   341   if (encrypted == ENCRYPTED_PGP)
   342     cryptflag = HBB_PREFIX_PGPCRYPT;
   342     cryptflag = HBB_PREFIX_PGPCRYPT;
   343   else if (encrypted == ENCRYPTED_OTR)
   343   else if (encrypted == ENCRYPTED_OTR)
   344     cryptflag = HBB_PREFIX_OTRCRYPT;
   344     cryptflag = HBB_PREFIX_OTRCRYPT;
   345   scr_WriteOutgoingMessage(bjid, wmsg, cryptflag, xep184);
   345   scr_write_outgoing_message(bjid, wmsg, cryptflag, xep184);
   346 
   346 
   347   // We don't log private messages
   347   // We don't log private messages
   348   if (!nick)
   348   if (!nick)
   349     hlog_write_message(bjid, timestamp, 1, msg);
   349     hlog_write_message(bjid, timestamp, 1, msg);
   350 
   350 
   425     // Write the status change in the buddy's buffer, only if it already exists
   425     // Write the status change in the buddy's buffer, only if it already exists
   426     if (scr_buddy_buffer_exists(bjid)) {
   426     if (scr_buddy_buffer_exists(bjid)) {
   427       bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s",
   427       bn = g_strdup_printf("Buddy status has changed: [%c>%c] %s",
   428                            imstatus2char[oldstat], imstatus2char[status],
   428                            imstatus2char[oldstat], imstatus2char[status],
   429                            ((status_msg) ? status_msg : ""));
   429                            ((status_msg) ? status_msg : ""));
   430       scr_WriteIncomingMessage(bjid, bn, timestamp,
   430       scr_write_incoming_message(bjid, bn, timestamp,
   431                                HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
   431                                  HBB_PREFIX_INFO|HBB_PREFIX_NOFLAG, 0);
   432       g_free(bn);
   432       g_free(bn);
   433     }
   433     }
   434   }
   434   }
   435 
   435 
   436   roster_setstatus(bjid, rn, prio, status, status_msg, timestamp,
   436   roster_setstatus(bjid, rn, prio, status, status_msg, timestamp,