diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 11:21:23 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 11:21:23 +0000 |
commit | fc70234c12fc3f9825484bdba094f306d0779c88 (patch) | |
tree | dd85db29df2bf15e61b29c4763e0d6e0f3c47f4b /MySpace/proto.cpp | |
parent | ff7aec36581526087e368e4bf6b2e8be7ccfa46e (diff) |
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
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;
|