Changeset 4144 for trunk/rms

Show
Ignore:
Timestamp:
07/08/05 07:35:21 (3 years ago)
Author:
emostar
Message:

Add support for protocol plugins

Location:
trunk/rms/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/rms/src/rms.cpp

    r4081 r4144  
    9595{ 
    9696  { "ADDUSER", &CRMSClient::Process_ADDUSER, 
    97     "Add user to contact list { <uin> }." }, 
     97    "Add user to contact list { <id>[.<protocol>] }." }, 
    9898  { "AR", &CRMSClient::Process_AR, 
    99     "Set your (or a user custom) auto response { [ <uin> ] }." }, 
     99    "Set your (or a user custom) auto response { [ <id>[.<protocol>] ] }." }, 
    100100  { "GROUPS", &CRMSClient::Process_GROUPS, 
    101101    "Show list of groups." }, 
     
    103103    "Print out help on commands." }, 
    104104  { "INFO", &CRMSClient::Process_INFO, 
    105     "Print out user information.  Argument is the uin, or none for personal." }, 
     105    "Print out user information.  Argument is the id and protocol, or none for personal." }, 
    106106  { "LIST", &CRMSClient::Process_LIST, 
    107107    "List users { [ <group #> ] [ <online|offline|all> ] [ <format> ] }." }, 
     
    109109    "Dump log messages { <log types> }." }, 
    110110  { "MESSAGE", &CRMSClient::Process_MESSAGE, 
    111     "Send a message { <uin> }." }, 
     111    "Send a message { <id>[.<protocol>] }." }, 
    112112  { "QUIT", &CRMSClient::Process_QUIT, 
    113113    "Close the connection.  With an argument of 1 causes the plugin to unload." }, 
    114114  { "REMUSER", &CRMSClient::Process_REMUSER, 
    115     "Remove user from contact list { <uin> }." }, 
     115    "Remove user from contact list { <id>[.<protocol>] }." }, 
    116116  { "SECURE", &CRMSClient::Process_SECURE, 
    117117    "Open/close/check secure channel { <uin> [ <open|close> ] } ." }, 
     
    121121    "Terminate the licq daemon." }, 
    122122  { "VIEW", &CRMSClient::Process_VIEW, 
    123     "View event (next or specific user) { [ <uin> ] }." }, 
     123    "View event (next or specific user) { [ <id>[.<protocol>] ] }." }, 
    124124  { "URL", &CRMSClient::Process_URL, 
    125     "Send a url { <uin> }." }, 
     125    "Send a url { <id>[.<protocol>] }." }, 
    126126  { "SMS", &CRMSClient::Process_SMS, 
    127127    "Send an sms { <uin> }." }, 
     
    174174  m_nPipe = _licqDaemon->RegisterPlugin(SIGNAL_UPDATExUSER); 
    175175  licqDaemon = _licqDaemon; 
    176  
     176   
    177177  char filename[256]; 
    178178  sprintf (filename, "%s/licq_rms.conf", BASE_DIR); 
     
    351351  default: 
    352352    break; 
     353     
     354  case SIGNAL_EVENTxID: 
     355    //XXX Catch this 
     356    break; 
    353357  } 
    354358  delete s; 
     
    403407  fflush(fs); 
    404408 
     409  m_szCheckId = 0; 
     410  m_szId = 0; 
    405411  m_nState = STATE_UIN; 
    406412  m_nLogTypes = 0; 
     
    415421{ 
    416422  sockman.CloseSocket(sock.Descriptor(), false, false); 
    417 } 
    418  
     423   
     424  if (m_szCheckId) 
     425    free(m_szCheckId); 
     426} 
     427 
     428/*--------------------------------------------------------------------------- 
     429 * CRMSClient::GetProtocol 
     430 *-------------------------------------------------------------------------*/ 
     431unsigned long CRMSClient::GetProtocol(const char *szData) 
     432{ 
     433  unsigned long nPPID = 0; 
     434  ProtoPluginsList pl; 
     435  ProtoPluginsListIter it; 
     436  licqDaemon->ProtoPluginList(pl); 
     437  for (it = pl.begin(); it != pl.end(); it++) 
     438  { 
     439    if (strcasecmp((*it)->Name(), szData) == 0) 
     440    { 
     441      nPPID = (*it)->PPID(); 
     442      break; 
     443    } 
     444  } 
     445   
     446  return nPPID; 
     447} 
     448 
     449/*--------------------------------------------------------------------------- 
     450 * CRMSClient::ParseUser 
     451 *-------------------------------------------------------------------------*/ 
     452void CRMSClient::ParseUser(const char *szData) 
     453{ 
     454  if (m_szId) 
     455    free(m_szId); 
     456     
     457  string strData(szData); 
     458  string::size_type nPos= strData.find_last_of("."); 
     459  if (nPos == string::npos) 
     460  { 
     461    m_szId = strdup(data_arg); 
     462    m_nPPID = 0; 
     463    ProtoPluginsList pl; 
     464    ProtoPluginsListIter it; 
     465    licqDaemon->ProtoPluginList(pl); 
     466    for (it = pl.begin(); it != pl.end(); it++) 
     467    { 
     468      ICQUser *u = gUserManager.FetchUser(m_szId, (*it)->PPID(), LOCK_R); 
     469      if (u) 
     470      { 
     471        gUserManager.DropUser(u); 
     472        m_nPPID = (*it)->PPID(); 
     473        break; 
     474      } 
     475    } 
     476  } 
     477  else 
     478  { 
     479    string strId(strData, 0, strData.find_last_of(".")); 
     480    string strProtocol(strData, strData.find_last_of(".")+1, strData.size()); 
     481    m_szId = strdup(strId.c_str()); 
     482    m_nPPID = GetProtocol(strProtocol.c_str()); 
     483  } 
     484} 
    419485 
    420486/*--------------------------------------------------------------------------- 
     
    517583    case STATE_UIN: 
    518584    { 
    519       m_nCheckUin = strtoul(data_line, (char**)NULL, 10); 
     585      m_szCheckId = data_line ? strdup(data_line) : 0; 
    520586      fprintf(fs, "%d Enter your password:\n", CODE_ENTERxPASSWORD); 
    521587      fflush(fs); 
     
    526592    { 
    527593      ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
    528       bool ok = (m_nCheckUin == o->Uin() && 
     594      bool ok = (strcmp(m_szCheckId, o->IdString()) == 0 && 
    529595         strcmp(o->Password(), data_line) == 0); 
     596      free(m_szCheckId); 
     597      m_szCheckId = 0; 
    530598      if (!ok) 
    531599      { 
     
    533601        gLog.Info("%sClient failed validation from %s.\n", L_RMSxSTR, 
    534602           sock.RemoteIpStr(buf)); 
    535         fprintf(fs, "%d Invalid UIN/Password.\n", CODE_INVALID); 
     603        fprintf(fs, "%d Invalid ID/Password.\n", CODE_INVALID); 
    536604        fflush(fs); 
    537605        return -1; 
     
    631699int CRMSClient::Process_INFO() 
    632700{ 
    633   unsigned long nUin = strtoul(data_arg, (char**)NULL, 10); 
    634  
    635   if (nUin == 0) nUin = gUserManager.OwnerUin(); 
     701  char *szId = strdup(data_arg); 
     702  NEXT_WORD(data_arg); 
     703  unsigned long nPPID = GetProtocol(data_arg); 
     704 
     705  //XXX Handle the case when we have the owner 
     706  if (szId == 0) 
     707    m_nUin = gUserManager.OwnerUin(); 
    636708 
    637709  // Print the user info 
    638   ICQUser *u = gUserManager.FetchUser(nUin, LOCK_R); 
     710  ICQUser *u = gUserManager.FetchUser(szId, nPPID, LOCK_R); 
    639711  if (u == NULL) 
    640712  { 
     
    643715  } 
    644716 
    645   fprintf(fs, "%d %ld Alias: %s\n", CODE_USERxINFO, u->Uin(), u->GetAlias()); 
    646   fprintf(fs, "%d %ld Status: %s\n", CODE_USERxINFO, u->Uin(), u->StatusStr()); 
    647   fprintf(fs, "%d %ld First Name: %s\n", CODE_USERxINFO, u->Uin(), u->GetFirstName()); 
    648   fprintf(fs, "%d %ld Last Name: %s\n", CODE_USERxINFO, u->Uin(), u->GetLastName()); 
    649   fprintf(fs, "%d %ld Email 1: %s\n", CODE_USERxINFO, u->Uin(), u->GetEmailPrimary()); 
    650   fprintf(fs, "%d %ld Email 2: %s\n", CODE_USERxINFO, u->Uin(), u->GetEmailSecondary()); 
     717  fprintf(fs, "%d %s Alias: %s\n", CODE_USERxINFO, u->IdString(), 
     718    u->GetAlias()); 
     719  fprintf(fs, "%d %s Status: %s\n", CODE_USERxINFO, u->IdString(), 
     720    u->StatusStr()); 
     721  fprintf(fs, "%d %s First Name: %s\n", CODE_USERxINFO, u->IdString(), 
     722    u->GetFirstName()); 
     723  fprintf(fs, "%d %s Last Name: %s\n", CODE_USERxINFO, u->IdString(), 
     724    u->GetLastName()); 
     725  fprintf(fs, "%d %s Email 1: %s\n", CODE_USERxINFO, u->IdString(), 
     726    u->GetEmailPrimary()); 
     727  fprintf(fs, "%d %s Email 2: %s\n", CODE_USERxINFO, u->IdString(), 
     728    u->GetEmailSecondary()); 
    651729 
    652730  gUserManager.DropUser(u); 
    653731 
     732  if (szId) 
     733    free(szId); 
     734     
    654735  return fflush(fs); 
    655736} 
     
    660741 * 
    661742 * Command: 
    662  *   STATUS [ status ] 
     743 *   STATUS [ status | protocol ] 
    663744 * 
    664745 * Response: 
     
    670751  if (data_arg[0] == '\0') 
    671752  { 
    672     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
    673     fprintf(fs, "%d %s\n", CODE_STATUS, o->StatusStr()); 
    674     gUserManager.DropOwner(); 
     753    ProtoPluginsList l; 
     754    ProtoPluginsListIter it; 
     755    licqDaemon->ProtoPluginList(l); 
     756    for (it = l.begin(); it != l.end(); it++) 
     757    { 
     758      ICQOwner *o = gUserManager.FetchOwner((*it)->PPID(), LOCK_R); 
     759      if (o) 
     760      { 
     761        fprintf(fs, "%d %s %s\n", CODE_STATUS, (*it)->Name(), o->StatusStr()); 
     762        gUserManager.DropOwner((*it)->PPID()); 
     763      } 
     764    } 
    675765    return fflush(fs); 
    676766  } 
     
    684774  } 
    685775 
    686   if (nStatus == ICQ_STATUS_OFFLINE) 
    687   { 
    688     fprintf(fs, "%d [0] Logging off.\n", CODE_COMMANDxSTART); 
    689     fflush(fs); 
    690     licqDaemon->icqLogoff(); 
    691     fprintf(fs, "%d [0] Event done.\n", CODE_RESULTxSUCCESS); 
    692     return fflush(fs); 
    693   } 
    694  
    695   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
    696   bool b = o->StatusOffline(); 
    697   gUserManager.DropOwner(); 
    698   unsigned long tag = 0; 
    699   if (b) 
    700   { 
    701     tag = licqDaemon->icqLogon(nStatus); 
    702     fprintf(fs, "%d [%ld] Logging on.\n", CODE_COMMANDxSTART, tag); 
    703   } 
    704   else 
    705   { 
    706     tag = licqDaemon->icqSetStatus(nStatus); 
    707     fprintf(fs, "%d [%ld] Setting status.\n", CODE_COMMANDxSTART, tag); 
    708   } 
    709   tags.push_back(tag); 
    710  
     776  ProtoPluginsList l; 
     777  ProtoPluginsListIter it; 
     778  licqDaemon->ProtoPluginList(l); 
     779  for (it = l.begin(); it != l.end(); it++) 
     780  { 
     781    if (nStatus == ICQ_STATUS_OFFLINE) 
     782    { 
     783      fprintf(fs, "%d [0] Logging off %s.\n", CODE_COMMANDxSTART, 
     784        (*it)->Name()); 
     785      fflush(fs); 
     786      licqDaemon->ProtoLogoff((*it)->PPID()); 
     787      fprintf(fs, "%d [0] Event done.\n", CODE_RESULTxSUCCESS); 
     788    } 
     789    else 
     790    { 
     791      ICQOwner *o = gUserManager.FetchOwner((*it)->PPID(), LOCK_R); 
     792      bool b = o->StatusOffline(); 
     793      gUserManager.DropOwner((*it)->PPID()); 
     794      unsigned long tag = 0; 
     795      if (b) 
     796      { 
     797        tag = licqDaemon->ProtoLogon((*it)->PPID(), nStatus); 
     798        fprintf(fs, "%d [%ld] Logging on to %s.\n", CODE_COMMANDxSTART, tag, 
     799          (*it)->Name()); 
     800      } 
     801      else 
     802      { 
     803        tag = licqDaemon->ProtoSetStatus((*it)->PPID(), nStatus); 
     804        fprintf(fs, "%d [%ld] Setting status for %s.\n", CODE_COMMANDxSTART, 
     805          tag, (*it)->Name()); 
     806      } 
     807      tags.push_back(tag); 
     808    } 
     809  } 
     810   
    711811  return fflush(fs); 
    712812} 
     
    718818int CRMSClient::Process_QUIT() 
    719819{ 
    720   fprintf(fs, "%d Aurevoir.\n", CODE_QUIT); 
     820  fprintf(fs, "%d Sayonara.\n", CODE_QUIT); 
    721821  fflush(fs); 
    722822  if (strtoul(data_arg, (char**)NULL, 10) > 0) licqRMS->m_bExit = true; 
     
    785885 *     "LIST all" is a valid call and will print all online and offline users. 
    786886 *     <format> is a printf style string using the user % symbols as 
    787  *     documented in UTILITIES.HOWTO.  The default is "%9u %-20a %3m %s" 
     887 *     documented in UTILITIES.HOWTO.  The default is "%u %P %-20a %3m %s" 
    788888 *     and prints out users as follows. 
    789889 * 
    790890 * Response: 
    791  *   CODE_LISTxUSER   5550000              AnAlias   2 Online 
    792  *     The default line contains the uin, alias, number of new messages 
    793  *     and status all column and white space deliminated.  Note that the 
    794  *     alias may contain white space. 
     891 *   CODE_LISTxUSER   5550000 Licq            AnAlias   2 Online 
     892 *     The default line contains the uin, protocol, alias, number of new  
     893 *     messages and status all column and white space deliminated.  Note that 
     894 *     the alias may contain white space. 
    795895 *   CODE_LISTxUSER ... 
    796896 *   ... 
     
    829929  if (*data_arg == '\0') 
    830930  { 
    831     strcpy(format, "%u %-20a %3m %s"); 
     931    strcpy(format, "%u %P %-20a %3m %s"); 
    832932  } 
    833933  else 
     
    858958 * 
    859959 * Command: 
    860  *     MESSAGE <uin> 
     960 *     MESSAGE <id>[.<protocol>] 
    861961 * 
    862962 * Response: 
     
    871971int CRMSClient::Process_MESSAGE() 
    872972{ 
    873 //  unsigned long nUin = strtoul(data_arg, (char**)NULL, 10); 
    874  
    875 //  if (nUin < 10000) 
    876 //  { 
    877 //    fprintf(fs, "%d Invalid UIN.\n", CODE_INVALIDxUSER); 
    878 //    return fflush(fs); 
    879 //  } 
    880  
    881973  fprintf(fs, "%d Enter message, terminate with a . on a line by itself:\n", 
    882974     CODE_ENTERxTEXT); 
    883975 
    884 //  m_nUin = nUin; 
    885   m_szId = strdup(data_arg); 
     976  ParseUser(data_arg); 
     977 
    886978  m_szText[0] = '\0'; 
    887979  m_nTextPos = 0; 
     
    893985int CRMSClient::Process_MESSAGE_text() 
    894986{ 
    895   unsigned long tag = licqDaemon->icqSendMessage(m_szId, m_szText, false, ICQ_TCPxMSG_NORMAL); 
     987  //XXX Give a tag... 
     988  unsigned long tag = licqDaemon->ProtoSendMessage(m_szId, m_nPPID, m_szText, 
     989    false, ICQ_TCPxMSG_NORMAL); 
    896990 
    897991  fprintf(fs, "%d [%ld] Sending message to %s.\n", CODE_COMMANDxSTART, 
    898992     tag, m_szId); 
    899  
    900   tags.push_back(tag); 
    901993  m_nState = STATE_COMMAND; 
    902994 
     995  if (m_nPPID == LICQ_PPID) 
     996    tags.push_back(tag); 
     997     
    903998  return fflush(fs); 
    904999} 
     
    9101005 * 
    9111006 * Command: 
    912  *   URL <uin> 
     1007 *   URL <id>[.<protocol>] 
    9131008 * 
    9141009 * Response: 
     
    9261021int CRMSClient::Process_URL() 
    9271022{ 
    928   unsigned long nUin = strtoul(data_arg, (char**)NULL, 10); 
    929  
    930   if (nUin < 10000) 
    931   { 
    932     fprintf(fs, "%d Invalid UIN.\n", CODE_INVALIDxUSER); 
    933     return fflush(fs); 
    934   } 
    935   fprintf(fs, "%d Enter URL:\n", CODE_ENTERxLINE); 
    936  
    937   m_nUin = nUin; 
     1023  ParseUser(data_arg); 
     1024   
    9381025  m_nTextPos = 0; 
    9391026 
     
    9601047int CRMSClient::Process_URL_text() 
    9611048{ 
    962   unsigned long tag = licqDaemon->icqSendUrl(m_nUin, m_szLine, m_szText, false, ICQ_TCPxMSG_NORMAL); 
    963  
    964   fprintf(fs, "%d [%ld] Sending URL to %ld.\n", CODE_COMMANDxSTART, 
    965      tag, m_nUin); 
    966  
    967   tags.push_back(tag); 
     1049  unsigned long tag = licqDaemon->ProtoSendUrl(m_szId, m_nPPID, m_szLine, 
     1050    m_szText, false, ICQ_TCPxMSG_NORMAL); 
     1051 
     1052  fprintf(fs, "%d [%ld] Sending URL to %s.\n", CODE_COMMANDxSTART, 
     1053     tag, m_szId); 
     1054 
     1055  if (m_nPPID == LICQ_PPID) 
     1056    tags.push_back(tag); 
     1057     
    9681058  m_nState = STATE_COMMAND; 
    9691059 
     
    10421132 * 
    10431133 * Command: 
    1044  *     AR [ <uin> ] 
     1134 *     AR [ <id>[.<protocol>] ] 
    10451135 * 
    10461136 * Response: 
     
    10521142int CRMSClient::Process_AR() 
    10531143{ 
    1054 /* 
    1055   if (data_arg[0] == '\0') 
    1056   { 
    1057     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
    1058     // print... 
    1059     gUserManager.DropOwner(); 
     1144  ParseUser(data_arg); 
     1145 
     1146  if (m_szId && !gUserManager.IsOnList(m_szId, m_nPPID)) 
     1147  { 
     1148    fprintf(fs, "%d Invalid User.\n", CODE_INVALIDxUSER); 
    10601149    return fflush(fs); 
    10611150  } 
    1062 */ 
    1063   unsigned long nUin = strtoul(data_arg, (char**)NULL, 10); 
    1064  
    1065   if (nUin != 0 && !gUserManager.IsOnList(nUin)) 
    1066   { 
    1067     fprintf(fs, "%d Invalid UIN.\n", CODE_INVALIDxUSER); 
    1068     return fflush(fs); 
    1069   } 
    10701151 
    10711152  fprintf(fs, "%d Enter %sauto response, terminate with a . on a line by itself:\n", 
    1072      CODE_ENTERxTEXT, nUin == 0 ? "" : "custom " ); 
    1073  
    1074   m_nUin = nUin; 
     1153     CODE_ENTERxTEXT, m_szId == 0 ? "" : "custom " ); 
     1154 
    10751155  m_szText[0] = '\0'; 
    10761156  m_nTextPos = 0; 
     
    10821162int CRMSClient::Process_AR_text() 
    10831163{ 
    1084   if (m_nUin == 0) 
    1085   { 
    1086     ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     1164  if (m_szId == 0) 
     1165  { 
     1166    ICQOwner *o = gUserManager.FetchOwner(m_nPPID, LOCK_W); 
    10871167    o->SetAutoResponse(m_szText); 
    10881168    gUserManager.DropOwner(); 
     
    10901170  else 
    10911171  { 
    1092     ICQUser *u = gUserManager.FetchUser(m_nUin, LOCK_W); 
     1172    ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 
    10931173    u->SetCustomAutoResponse(m_szText); 
    10941174    gUserManager.DropUser(u); 
     
    11361216 * 
    11371217 * Command: 
    1138  *   VIEW <uin> 
     1218 *   VIEW [ <id>[.<protocol> ] 
    11391219 * 
    11401220 * Response: 
     
    11431223int CRMSClient::Process_VIEW() 
    11441224{ 
    1145   unsigned long nUin = 0; 
    1146   char *szId = 0; 
    1147  
    11481225  if (*data_arg != '\0') 
    11491226  { 
    1150     nUin = strtoul(data_arg, (char**)NULL, 10); 
    1151     szId = strdup(data_arg); 
     1227    ParseUser(data_arg); 
    11521228  } 
    11531229  else 
     
    11591235    { 
    11601236      if(pUser->NewMessages() > 0) 
    1161         szId = strdup(pUser->IdString()); 
     1237      { 
     1238        if (m_szId) 
     1239          free(m_szId); 
     1240        m_szId = strdup(pUser->IdString()); 
     1241        m_nPPID = pUser->PPID(); 
     1242        FOR_EACH_USER_BREAK 
     1243      } 
    11621244    } 
    11631245    FOR_EACH_USER_END 
    11641246   
    1165     if (szId == 0) 
     1247    if (m_szId == 0) 
    11661248    { 
    11671249      fprintf(fs, "%d No new messages.\n", CODE_VIEWxNONE); 
     
    11701252  } 
    11711253 
    1172   ICQUser *u = gUserManager.FetchUser(szId, LICQ_PPID, LOCK_W); 
     1254  ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_W); 
    11731255  if (u == NULL) 
    11741256  { 
     
    12331315 
    12341316  gUserManager.DropUser(u); 
    1235  
    1236   if (szId) free(szId); 
     1317     
    12371318  return fflush(fs); 
    12381319} 
     
    12421323 * 
    12431324 * Command: 
    1244  *   ADDUSER <uin> 
     1325 *   ADDUSER <id> <protocol> 
    12451326 * 
    12461327 * Response: 
     
    12491330int CRMSClient::Process_ADDUSER() 
    12501331{ 
    1251   unsigned long nUin = strtoul(data_arg, (char**)NULL, 10); 
    1252  
    1253   if (nUin >= 10000) 
    1254   { 
    1255     if (licqDaemon->AddUserToList(nUin)) 
    1256     { 
    1257       fprintf(fs, "%d User added\n", CODE_ADDUSERxDONE); 
    1258     } 
    1259     else 
    1260     { 
    1261       fprintf(fs, "%d User not added\n", CODE_ADDUSERxERROR); 
    1262     } 
     1332  char *szId = strdup(data_arg); 
     1333  NEXT_WORD(data_arg); 
     1334  unsigned long nPPID = GetProtocol(data_arg); 
     1335 
     1336  if (licqDaemon->AddUserToList(szId, nPPID)) 
     1337  { 
     1338    fprintf(fs, "%d User added\n", CODE_ADDUSERxDONE); 
    12631339  } 
    12641340  else 
    12651341  { 
    1266     fprintf(fs, "%d Invalid UIN.\n", CODE_INVALIDxUSER); 
    1267   } 
    1268  
     1342    fprintf(fs, "%d User not added\n", CODE_ADDUSERxERROR); 
     1343  } 
     1344   
    12691345  return fflush(fs); 
    12701346} 
  • trunk/rms/src/rms.h

    r4081 r4144  
    9393  unsigned short data_line_pos; 
    9494  unsigned long m_nCheckUin; 
     95  char *m_szCheckId; 
    9596  unsigned long m_nLogTypes; 
    9697 
    9798  unsigned long m_nUin; 
    9899  char *m_szId; 
     100  unsigned long m_nPPID; 
    99101  char m_szText[MAX_TEXT_LENGTH + 1]; 
    100102  char m_szLine[MAX_LINE_LENGTH + 1]; 
     
    105107  bool ProcessEvent(ICQEvent *); 
    106108  bool AddLineToText(); 
    107  
     109  unsigned long GetProtocol(const char *); 
     110  void ParseUser(const char *); 
     111   
    108112  int Process_MESSAGE_text(); 
    109113  int Process_URL_url();