This patch let you receive webpanel messages sent from 
http://web.icq.com/wwp/1,,,00.html?Uin=XXXXXX
where XXX is the uin

TODO: (some else, because i don't know how)
        Display the message in the client.

Regards,
        Juan.
-- 
Buenos Aires, Argentina
Index: src/icqd-srv.cpp
===================================================================
RCS file: /cvsroot/licq/licq/src/icqd-srv.cpp,v
retrieving revision 1.30
diff -u -1 -b -p -r1.30 icqd-srv.cpp
--- src/icqd-srv.cpp	16 Apr 2002 13:37:36 -0000	1.30
+++ src/icqd-srv.cpp	22 Apr 2002 18:31:52 -0000
@@ -25,2 +25,4 @@
 
+const unsigned long PAGER_UIN = 10;
+
 //-----icqAddUser----------------------------------------------------------
@@ -1319,3 +1321,3 @@ void CICQDaemon::ProcessMessageFam(CBuff
 
-    if (nUin < 10000) {
+    if (nUin < 10000 && nUin != PAGER_UIN) {
       gLog.Warn("%sMessage through server with strange Uin: %04lx\n", L_WARNxSTR, nUin);
@@ -1607,3 +1609,47 @@ void CICQDaemon::ProcessMessageFam(CBuff
       }
+      case 0:
+      {	char **szFields = new char*[6]; // name, ?. ?, email,?,message
+	char *msg;
+	
+        packet.UnpackUnsignedShortBE();
+
+	// i don't know what these are
+	packet.UnpackUnsignedShortBE();
+	packet.UnpackUnsignedShortBE();
+	packet.UnpackUnsignedShortBE();
+	packet.UnpackUnsignedShortBE();
+	
+	msg = packet.UnpackString();
+
+        if (!ParseFE(msg, &szFields, 6))
+        {	 char *buf;
+        	 gLog.Warn("%sInvalid WebPanel message\n%s\n", L_WARNxSTR,
+                             packet.print(buf));
+                 delete  []buf;
+                 
+        }
+        else
+        {	gLog.Info ("%s WebPanel Message from\"%s\" %s",L_SRVxSTR,
+                 		szFields[0],szFields[3]);
+        	// translating string with Translation Table
+        	gTranslator.ServerToClient(szFields[0]);  // name
+        	gTranslator.ServerToClient(szFields[3]);  // email
+        	gTranslator.ServerToClient(szFields[5]);  // msg
+
+        	 CEventWebPanel *e = new CEventWebPanel( szFields[0],
+        	 	szFields[3],szFields[4],0,timeSent,0);
 
+        	 ICQOwner *o = gUserManager.FetchOwner(LOCK_W);
+        	 if (AddUserEvent(o, e))
+                 {	gUserManager.DropOwner();
+                 	e->AddToHistory(NULL, D_RECEIVER);
+                 	m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL);
+                 }
+                 else
+                 	gUserManager.DropOwner();
+        }
+        delete msg;
+      	delete szFields;
+      	break;
+      }
       default:

Reply via email to