here i send the start of the code to get URL's through server.
i didn't finished because i don't wan't to copy/paste the msg-thought-server 
code (and in the other hand i don't know how to create a helper function in 
c++ without adding it to the class) so needs some work (report the event to 
user). 

also i think that it would be nice to break CICQDaemon::ProcessMessageFam
into smaller pieces (the   switch(mFormat) ). (and i don't know if it would 
be better for maintaince to put every family into different files)(sory, but 
i am a big fan of 25 lines functions. )

Regards,
        Juan.

RCS file: /extra/cvsroot/licq/src/icqd-srv.cpp,v
retrieving revision 1.7
diff -u -1 -b -p -r1.7 icqd-srv.cpp
--- icqd-srv.cpp        2001/12/07 18:05:16     1.7
+++ icqd-srv.cpp        2001/12/10 19:33:10
@@ -1089,3 +1089,4 @@ void CICQDaemon::ProcessMessageFam(CBuff
       msgTxt.UnpackUnsignedLongBE();
-      if (msgTxt.UnpackUnsignedShort()==0x001)//0x001=normal message
+      short type = msgTxt.UnpackUnsignedShort();
+      if ( type==0x001)//0x001=normal message
        {
@@ -1132,2 +1133,14 @@ void CICQDaemon::ProcessMessageFam(CBuff
       }
+      else if( type == 0x0004 )
+      {        nMsgLen = msgTxt.UnpackUnsignedShort();
+        nMsgLen -= 1;
+        char* szMessage = new char[nMsgLen+1];
+        for (int i = 0; i < nMsgLen; ++i)
+               szMessage[i] = msgTxt.UnpackChar();
+       szMessage[nMsgLen] = '\0';
+
+
+       delete [] szMessage;
+       break;
+      }
     }

_______________________________________________
Licq-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/licq-devel

Reply via email to