diff options
Diffstat (limited to 'MySpace/proto.cpp')
-rw-r--r-- | MySpace/proto.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/MySpace/proto.cpp b/MySpace/proto.cpp index b2f03d9..21fb0af 100644 --- a/MySpace/proto.cpp +++ b/MySpace/proto.cpp @@ -2,6 +2,7 @@ #include "proto.h"
#include "server_con.h"
#include "resource.h"
+#include "formatting.h"
#define FAILED_MESSAGE_HANDLE 99998
@@ -123,7 +124,7 @@ static DWORD CALLBACK sttFakeAckMessageFailed( LPVOID param ) int ProtoSendMessage(WPARAM wParam, LPARAM lParam) {
CCSDATA *ccs = (CCSDATA *) lParam;
char *message = (char *)ccs->lParam;
- char msg_utf[MAX_MESSAGE_SIZE];
+ char msg_utf[MAX_MESSAGE_SIZE], msg_fmt[MAX_MESSAGE_SIZE];
int uid;
if((uid = DBGetContactSettingDword(ccs->hContact, MODULE, "UID", 0)) == 0 || status == ID_STATUS_OFFLINE) {
@@ -153,13 +154,16 @@ int ProtoSendMessage(WPARAM wParam, LPARAM lParam) { }
msg_utf[MAX_MESSAGE_SIZE-1] = 0;
+ entitize(msg_utf, MAX_MESSAGE_SIZE);
+ mir_snprintf(msg_fmt, MAX_MESSAGE_SIZE, "<p><f f='Times' h='16'><c v='black'><b v='white'>%s</b></c></f></p>", msg_utf);
+
ClientNetMessage msg;
msg.add_int("bm", 1);
msg.add_int("sesskey", sesskey);
msg.add_int("t", uid);
msg.add_int("f", my_uid);
msg.add_int("cv", CLIENT_VER);
- msg.add_string("msg", msg_utf);
+ msg.add_string("msg", msg_fmt);
SendMessage(msg);
HANDLE hEvent;
|