From fc70234c12fc3f9825484bdba094f306d0779c88 Mon Sep 17 00:00:00 2001 From: sje Date: Sun, 1 Jul 2007 11:21:23 +0000 Subject: format text, incoming & outgoing updater support encrypt password in db git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@229 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/proto.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'MySpace/proto.cpp') 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, "

%s

", 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; -- cgit v1.2.3