Changeset 10

Show
Ignore:
Timestamp:
02/12/01 22:57:28 (10 years ago)
Author:
many
Message:

changed various behaviour

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r5 r10  
     1Feb 11, 2001 
     2mc - changed Language Behaviour (Patch submitted by l@kondara.org)  
     3mc - ignoring non-alphanumerical chars before command (euro@hq.alert.sk) 
     4mc - ignoring spaces at the end of a nick (euro@hq.alert.sk) 
     5 
    16Jan 20, 2001 
    27mc - cleaned up code into subdirs  
  • trunk/TODO

    r7 r10  
    77 : head. 
    88 
     9various people: 
     10 : add https support 
     11 : add tcp support for c2c and s2c 
  • trunk/include/micq.h

    r7 r10  
    181181} srv_net_icq_pak, *SRV_NET_ICQ_PTR; 
    182182 
    183 #define CMD_ACK               0x000A  
    184 #define CMD_SENDM             0x010E 
    185 #define CMD_LOGIN             0x03E8 
    186 #define CMD_CONT_LIST         0x0406 
    187 #define CMD_SEARCH_UIN        0x041a 
    188 #define CMD_SEARCH_USER       0x0424 
    189 #define CMD_KEEP_ALIVE        0x042e 
    190 #define CMD_KEEP_ALIVE2       0x051e 
    191 #define CMD_SEND_TEXT_CODE    0x0438 
    192 #define CMD_LOGIN_1           0x044c 
    193 #define CMD_INFO_REQ          0x0460 
    194 #define CMD_EXT_INFO_REQ      0x046a 
    195 #define CMD_CHANGE_PW         0x049c 
    196 #define CMD_STATUS_CHANGE     0x04d8 
    197 #define CMD_LOGIN_2           0x0528 
    198 #define CMD_UPDATE_INFO       0x050A 
    199 #define CMD_UPDATE_EXT_INFO   0X04B0 
    200 #define CMD_ADD_TO_LIST       0X053C 
    201 #define CMD_REQ_ADD_LIST      0X0456 
    202 #define CMD_QUERY_SERVERS     0X04BA 
    203 #define CMD_QUERY_ADDONS      0X04C4 
    204 #define CMD_NEW_USER_1        0X04EC 
    205 #define CMD_NEW_USER_INFO     0x04A6 
    206 #define CMD_ACK_MESSAGES      0x0442 
    207 #define CMD_MSG_TO_NEW_USER   0x0456 
    208 #define CMD_REG_NEW_USER      0x03FC 
    209 #define CMD_VIS_LIST          0x06AE 
    210 #define CMD_INVIS_LIST        0x06A4 
    211 #define CMD_META_USER         0x064A 
    212 #define CMD_RAND_SEARCH       0x056E 
    213 #define CMD_RAND_SET          0x0564 
    214 #define CMD_AUTH_UPDATE       0x0514 
    215 #define CMD_UPDATE_LIST       0x06B8 
    216  
    217 #define SRV_ACK            0x000A 
    218 #define SRV_LOGIN_REPLY    0x005A 
    219 #define SRV_USER_ONLINE    0x006E 
    220 #define SRV_USER_OFFLINE   0x0078 
    221 #define SRV_USER_FOUND     0x008C 
    222 #define SRV_RECV_MESSAGE   0x00DC 
    223 #define SRV_END_OF_SEARCH  0x00A0 
    224 #define SRV_INFO_REPLY     0x0118 
    225 #define SRV_EXT_INFO_REPLY 0x0122 
    226 #define SRV_STATUS_UPDATE  0x01A4 
    227 #define SRV_X1             0x021C 
    228 #define SRV_X2             0x00E6 
    229 #define SRV_UPDATE_EXT     0x00C8 
    230 #define SRV_NEW_UIN        0x0046 
    231 #define SRV_NEW_USER       0x00B4 
    232 #define SRV_QUERY          0x0082 
    233 #define SRV_SYSTEM_MESSAGE 0x01C2 
    234 #define SRV_SYS_DELIVERED_MESS 0x0104 
    235 #define SRV_GO_AWAY        0x0028 
    236 #define SRV_NOT_CONNECTED  0x00F0 
    237 #define SRV_BAD_PASS       0x0064 
    238 #define SRV_TRY_AGAIN      0x00FA 
    239 #define SRV_UPDATE_FAIL    0x01EA 
    240 #define SRV_UPDATE_SUCCESS 0x01E0 
    241 #define SRV_MULTI_PACKET   0x0212 
    242 #define SRV_META_USER      0x03DE 
    243 #define SRV_RAND_USER      0x024E 
    244 #define SRV_AUTH_UPDATE    0x01F4 
    245  
    246 #define META_INFO_SET    0x3E8 
    247 #define META_INFO_REQ    0x04B0 
    248 #define META_INFO_SECURE 0x0424 
    249 #define META_INFO_PASS   0x042E 
    250 #define META_SRV_GEN    0x00C8 
    251 #define META_SRV_MORE   0x00DC 
    252 #define META_SRV_WORK   0x00D2 
    253 #define META_SRV_ABOUT   0x00E6 
    254 #define META_SRV_PASS   0x00AA 
    255 #define META_SRV_GEN_UPDATE 0x0064 
    256 #define META_SRV_ABOUT_UPDATE 0x082 
    257 #define META_SRV_OTHER_UPDATE 0x078 
    258 #define META_INFO_ABOUT 0x0406 
    259 #define META_INFO_MORE 0x03FC 
    260  
    261 #define STATUS_OFFLINE  (-1L) 
    262 #define STATUS_ONLINE  0x00 
    263 #define STATUS_INVISIBLE 0x100 
    264 #define STATUS_NA_99        0x04 
    265 #define STATUS_NA      0x05 
    266 #define STATUS_FREE_CHAT 0x20 
    267 #define STATUS_OCCUPIED_MAC 0x10 
    268 #define STATUS_OCCUPIED 0x11 
    269 #define STATUS_AWAY    0x01 
    270 #define STATUS_DND    0x13 
    271 #define STATUS_DND_99    0x02 
    272  
    273 #define AUTH_MESSAGE  0x0008 
    274  
    275 #define USER_ADDED_MESS 0x000C 
    276 #define AUTH_REQ_MESS 0x0006 
    277 #define URL_MESS        0x0004 
    278 #define WEB_MESS        0x000d 
    279 #define EMAIL_MESS      0x000e 
    280 #define MASS_MESS_MASK  0x8000 
    281 #define MRURL_MESS      0x8004 
     183#define CMD_ACK                 0x000A  
     184#define CMD_SENDM               0x010E 
     185#define CMD_LOGIN               0x03E8 
     186#define CMD_CONT_LIST           0x0406 
     187#define CMD_SEARCH_UIN          0x041a 
     188#define CMD_SEARCH_USER         0x0424 
     189#define CMD_KEEP_ALIVE          0x042e 
     190#define CMD_KEEP_ALIVE2         0x051e 
     191#define CMD_SEND_TEXT_CODE      0x0438 
     192#define CMD_LOGIN_1             0x044c 
     193#define CMD_INFO_REQ            0x0460 
     194#define CMD_EXT_INFO_REQ        0x046a 
     195#define CMD_CHANGE_PW           0x049c 
     196#define CMD_STATUS_CHANGE       0x04d8 
     197#define CMD_LOGIN_2             0x0528 
     198#define CMD_UPDATE_INFO         0x050A 
     199#define CMD_UPDATE_EXT_INFO     0X04B0 
     200#define CMD_ADD_TO_LIST         0X053C 
     201#define CMD_REQ_ADD_LIST        0X0456 
     202#define CMD_QUERY_SERVERS       0X04BA 
     203#define CMD_QUERY_ADDONS        0X04C4 
     204#define CMD_NEW_USER_1          0X04EC 
     205#define CMD_NEW_USER_INFO       0x04A6 
     206#define CMD_ACK_MESSAGES        0x0442 
     207#define CMD_MSG_TO_NEW_USER     0x0456 
     208#define CMD_REG_NEW_USER        0x03FC 
     209#define CMD_VIS_LIST            0x06AE 
     210#define CMD_INVIS_LIST          0x06A4 
     211#define CMD_META_USER           0x064A 
     212#define CMD_RAND_SEARCH         0x056E 
     213#define CMD_RAND_SET            0x0564 
     214#define CMD_AUTH_UPDATE         0x0514 
     215#define CMD_UPDATE_LIST         0x06B8 
     216 
     217#define SRV_ACK                 0x000A 
     218#define SRV_LOGIN_REPLY         0x005A 
     219#define SRV_BAD_PASSWORD        0x0064 
     220#define SRV_USER_ONLINE         0x006E 
     221#define SRV_USER_OFFLINE        0x0078 
     222#define SRV_USER_FOUND          0x008C 
     223#define SRV_RECV_MESSAGE        0x00DC 
     224#define SRV_END_OF_SEARCH       0x00A0 
     225#define SRV_INFO_REPLY          0x0118 
     226#define SRV_EXT_INFO_REPLY      0x0122 
     227#define SRV_STATUS_UPDATE       0x01A4 
     228#define SRV_X1                  0x021C 
     229#define SRV_X2                  0x00E6 
     230#define SRV_UPDATE_EXT          0x00C8 
     231#define SRV_NEW_UIN             0x0046 
     232#define SRV_NEW_USER            0x00B4 
     233#define SRV_QUERY               0x0082 
     234#define SRV_SYSTEM_MESSAGE      0x01C2 
     235#define SRV_SYS_DELIVERED_MESS  0x0104 
     236#define SRV_GO_AWAY             0x0028 
     237#define SRV_NOT_CONNECTED       0x00F0 
     238#define SRV_BAD_PASS            0x0064 
     239#define SRV_TRY_AGAIN           0x00FA 
     240#define SRV_UPDATE_FAIL         0x01EA 
     241#define SRV_UPDATE_SUCCESS      0x01E0 
     242#define SRV_MULTI_PACKET        0x0212 
     243#define SRV_META_USER           0x03DE 
     244#define SRV_RAND_USER           0x024E 
     245#define SRV_AUTH_UPDATE         0x01F4 
     246 
     247#define META_INFO_SET           0x03E8 
     248#define META_INFO_REQ           0x04B0 
     249#define META_INFO_SECURE        0x0424 
     250#define META_INFO_PASS          0x042E 
     251#define META_SRV_GEN            0x00C8 
     252#define META_SRV_MORE           0x00DC 
     253#define META_SRV_WORK           0x00D2 
     254#define META_SRV_ABOUT          0x00E6 
     255#define META_SRV_PASS           0x00AA 
     256#define META_SRV_GEN_UPDATE     0x0064 
     257#define META_SRV_ABOUT_UPDATE   0x082 
     258#define META_SRV_OTHER_UPDATE   0x078 
     259#define META_INFO_ABOUT         0x0406 
     260#define META_INFO_MORE          0x03FC 
     261 
     262#define STATUS_OFFLINE          (-1L) 
     263#define STATUS_ONLINE           0x00 
     264#define STATUS_INVISIBLE        0x100 
     265#define STATUS_NA_99            0x04 
     266#define STATUS_NA               0x05 
     267#define STATUS_FREE_CHAT        0x20 
     268#define STATUS_OCCUPIED_MAC     0x10 
     269#define STATUS_OCCUPIED         0x11 
     270#define STATUS_AWAY             0x01 
     271#define STATUS_DND              0x13 
     272#define STATUS_DND_99           0x02 
     273 
     274#define AUTH_MESSAGE            0x0008 
     275 
     276#define USER_ADDED_MESS         0x000C 
     277#define AUTH_REQ_MESS           0x0006 
     278#define URL_MESS                0x0004 
     279#define WEB_MESS                0x000d 
     280#define EMAIL_MESS              0x000e 
     281#define MASS_MESS_MASK          0x8000 
     282#define MRURL_MESS              0x8004 
    282283#define NORM_MESS               0x0001 
    283 #define MRNORM_MESS     0x8001 
    284 #define CONTACT_MESS    0x0013 
    285 #define MRCONTACT_MESS  0x8013 
    286  
    287 #define INV_LIST_UPDATE 0x01 
    288 #define VIS_LIST_UPDATE 0x02 
    289 #define CONT_LIST_UPDATE 0x00 
     284#define MRNORM_MESS            0x8001 
     285#define CONTACT_MESS           0x0013 
     286#define MRCONTACT_MESS         0x8013 
     287 
     288#define INV_LIST_UPDATE        0x01 
     289#define VIS_LIST_UPDATE        0x02 
     290#define CONT_LIST_UPDATE       0x00 
    290291 
    291292/*#define USA_COUNTRY_CODE 0x01 
  • trunk/src/icq_response.c

    r8 r10  
    983983           allocate the right amount. Oh well. It shouldn't be too much 
    984984           wasted space, I hope.                                            */ 
     985          char_conv("wc", data); 
    985986          strcpy(UIN2Contact(last_recv_uin)->LastMessage, data); 
    986987      } 
  • trunk/src/micq.c

    r9 r10  
    188188 
    189189   if(bind(sok, (struct sockaddr*)&sin, sizeof(struct sockaddr))<0) 
    190    { 
    191190     M_fdprint(aux, "Can't bind socket to free port\n"); 
    192191     return -1; 
     
    423422   if ( s < 0 ) 
    424423        return; 
    425        
    426 #if 0 
     424 
     425//#if 0       
     426if (Verbose) { 
    427427   M_print( "Cmd : %04X\t",Chars_2_Word( pak.head.cmd ) ); 
    428428   M_print( "Ver : %04X\t",Chars_2_Word( pak.head.ver ) ); 
    429429   M_print( "Seq : %08X\t",Chars_2_DW( pak.head.seq ) ); 
    430430   M_print( "Ses : %08X\n",Chars_2_DW( pak.head.session ) ); 
    431 #endif 
    432    if ( Chars_2_Word( pak.head.ver ) != ICQ_VER ) { 
    433         R_undraw(); 
    434            M_print( "Invalid server response:\tVersion: %d\n", Chars_2_Word( pak.head.ver ) ); 
    435         if ( Verbose ) { 
    436                 Hex_Dump( pak.head.ver, s ); 
    437         } 
    438         R_redraw(); 
    439         return; 
    440    } 
     431
     432//#endif 
     433//    if ( pak.head.cmd != SRV_BAD_PASS ) { 
     434//      if ( Chars_2_Word( pak.head.ver ) != ICQ_VER ) { 
     435//              R_undraw(); 
     436//              M_print( "Invalid server response:\tVersion: %d\n", Chars_2_Word( pak.head.ver ) ); 
     437//          if ( Verbose ) { 
     438//              Hex_Dump( pak.head.ver, s ); 
     439//          } 
     440//      R_redraw(); 
     441//      return; 
     442//        } 
     443//    } 
    441444  if ( Chars_2_DW( pak.head.session ) != our_session ) { 
    442445     if ( Verbose ) { 
  • trunk/src/sendmsg.c

    r9 r10  
    102102                    { 
    103103                      *tmp = 0; 
    104                       char_conv ("wc", data); 
     104                      char_conv ("cw", data); 
    105105                      strcpy (url_desc, data); 
    106106                      tmp++; 
    107107                      data = tmp; 
    108                       char_conv ("wc", data); 
     108                      char_conv ("cw", data); 
    109109                      strcpy (url_data, data); 
    110110 
     
    117117              else if (type == NORM_MESS || type == MRNORM_MESS) 
    118118                { 
    119                   char_conv ("wc", data); 
     119                  char_conv ("cw", data); 
    120120                  M_print (MESSCOL "%s", data); 
    121121                  M_print (NOCOL " "); 
  • trunk/src/ui.c

    r3 r10  
    616616           return; 
    617617        } 
     618 
     619        /* skip all non-alhphanumeric chars on the beginning 
     620         * to accept IRC like commands starting with a / 
     621         * or talker like commands starting with a . 
     622         * or whatever */ 
     623        while (!isalnum(cmd[0])) 
     624               cmd++; 
     625 
    618626         /* goto's removed and code fixed by Paul Laufer. Enjoy! */ 
    619627         if ( ( strcasecmp( cmd , "quit" ) == 0 ) || 
  • trunk/src/util.c

    r3 r10  
    589589   int i; 
    590590   BOOL non_numeric=FALSE; 
     591 
     592   /*cut off whitespace at the end (i.e. \t or space*/ 
     593   i = strlen(nick) - 1; 
     594   while (isspace(nick[i])) 
     595          i--; 
     596   nick[i+1] = '\0'; 
     597 
    591598    
    592599   for ( i=0; i< Num_Contacts; i++ )