Changeset 2851

Show
Ignore:
Timestamp:
03/06/10 19:16:56 (5 months ago)
Author:
kuhlmann
Message:

options are per server, not per connection, so rename ConnectionPref?{Str,Val} to ServerPref?{Str,Val} and update documentation accordingly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • climm/doc/climmcmds.7

    r2849 r2851  
    10061006will be used. 
    10071007.TP 
    1008 .BI webaware \ boolean\ connection[ICQ] 
     1008.BI webaware \ boolean\ server[ICQ] 
    10091009Whether the current status should be visible on the web site. 
    10101010.TP 
    1011 .BI hideip \ boolean\ connection[ICQ] 
     1011.BI hideip \ boolean\ server[ICQ] 
    10121012Whether to hide the (local) IP address towards other users. 
    10131013.TP 
    1014 .BI dcauth \ boolean\ connection[ICQ] 
     1014.BI dcauth \ boolean\ server[ICQ] 
    10151015Whether authorized contacts can see the (remote) IP address. 
    10161016.TP 
    1017 .BI dccont \ boolean\ connection[ICQ] 
     1017.BI dccont \ boolean\ server[ICQ] 
    10181018Whether contacts can see the (remote) IP address. 
    10191019.TP 
    1020 .BI countaway \ boolean\ connection 
     1020.BI countaway \ boolean\ server 
    10211021If set, incoming messages will be counted and their originators shown 
    10221022if the status is manually changed to anything other than 
     
    10341034.IR invisible ). 
    10351035.TP 
    1036 .BI s5_use \ boolean\ connection 
     1036.BI s5_use \ boolean\ server 
    10371037Enable the use of a socks 5 proxy. New for 0.6.4. 
    10381038.TP 
    1039 .BI s5_host \ string\ connection 
     1039.BI s5_host \ string\ server 
    10401040Connect to socks 5 proxy on the given host. New for 0.6.4. 
    10411041.TP 
    1042 .BI s5_port \ integer\ connection 
     1042.BI s5_port \ integer\ server 
    10431043Connect to socks 5 proxy listening on the given port number. New for 0.6.4. 
    10441044.TP 
    1045 .BI s5_name \ string\ connection 
     1045.BI s5_name \ string\ server 
    10461046Identify as the given user to the socks 5 proxy. New for 0.6.4. 
    10471047.TP 
    1048 .BI s5_pass \ string\ connection 
     1048.BI s5_pass \ string\ server 
    10491049Authenticate with the given password to the socks 5 proxy. New for 0.6.4. 
    10501050.TP 
    1051 .BI oscar_dc_port \ integer\ connection[ICQ] 
    1052 Define the minimum port to listen for incoming direct connection when using 
     1051.BI oscar_dc_port \ integer\ server[ICQ] 
     1052Define the minimum port to listen for incoming direct connections when using 
    10531053the oscar protocol. If the given port is in used, the port number actually 
    10541054used is increased until a free one is found. New for 0.6.4. 
    10551055.TP 
    1056 .BI oscar_dc_mode \ integer\ connection[ICQ] 
     1056.BI oscar_dc_mode \ integer\ server[ICQ] 
    10571057.RS 
    10581058This integer is for flags how to handle direct connections: 
     
    10791079.RE 
    10801080.TP 
    1081 .BI logstream \ boolean\ connection 
     1081.BI logstream \ boolean\ server 
    10821082Log all data sent over the connection to the server into a file in 
    10831083BASEDIR/debug/. 
    10841084.TP 
    1085 .BI privacylist \ string\ connection[XMPP] 
     1085.BI privacylist \ string\ server[XMPP] 
    10861086After login, select the given privacy list as the active list for this 
    10871087session. If the list is empty, select no privacy list as active. Otherwise, 
     
    11991199New for 0.5. 
    12001200.TP 
    1201 .BI optconnection \ [<option>\ [<value>]] 
    1202 Set or display connection option 
     1201.BI optserv \ [<option>\ [<value>]] 
     1202Set or display server option 
    12031203.IR option . 
    1204 New for 0.5. 
     1204Renamed for 0.7.1, old name new in 0.5. 
    12051205.TP 
    12061206.BI optglobal \ [<option>\ [<value>]] 
  • climm/include/connection.h

    r2847 r2851  
    115115Connection    *ServerFindChild   (const Server *parent, const Contact *cont, UWORD type); 
    116116const char    *ServerStrType     (Server *conn); 
     117val_t          ServerPrefVal     (Server *conn, UDWORD flag); 
     118const char    *ServerPrefStr     (Server *conn, UDWORD flag); 
    117119 
    118120Connection    *ConnectionC       (UWORD type DEBUGPARAM); 
     
    122124const char    *ConnectionServerType  (UWORD type); 
    123125UWORD          ConnectionServerNType (const char *type, char del); 
    124 val_t          ConnectionPrefVal (Server *conn, UDWORD flag); 
    125 const char    *ConnectionPrefStr (Server *conn, UDWORD flag); 
    126126 
    127127#define ConnectionC(t)       ConnectionC (t DEBUGARGS) 
  • climm/src/connection.c

    r2748 r2851  
    491491 * Query an option for a contact group 
    492492 */ 
    493 val_t ConnectionPrefVal (Server *serv, UDWORD flag) 
     493val_t ServerPrefVal (Server *serv, UDWORD flag) 
    494494{ 
    495495    val_t res = 0; 
     
    504504 * Query an option for a contact group 
    505505 */ 
    506 const char *ConnectionPrefStr (Server *serv, UDWORD flag) 
     506const char *ServerPrefStr (Server *serv, UDWORD flag) 
    507507{ 
    508508    const char *res = 0; 
  • climm/src/io/io_socks5.c

    r2843 r2851  
    108108static void io_socks5_open (Connection *conn, Dispatcher *d) 
    109109{ 
    110     const char *socks5server = ConnectionPrefStr (conn->serv, CO_S5HOST); 
    111     UDWORD      socks5port   = ConnectionPrefVal (conn->serv, CO_S5PORT); 
     110    const char *socks5server = ServerPrefStr (conn->serv, CO_S5HOST); 
     111    UDWORD      socks5port   = ServerPrefVal (conn->serv, CO_S5PORT); 
    112112    char *origserver = conn->server; 
    113113    UDWORD origport = conn->port, origip = conn->ip; 
     
    151151        if (rc != IO_CONNECTED) 
    152152            return io_socks5_seterr (d, rc, d->next->funcs->f_err (conn,  d->next)); 
    153         if (ConnectionPrefVal (conn->serv, CO_S5NAME) && ConnectionPrefVal (conn->serv, CO_S5PASS)) 
     153        if (ServerPrefVal (conn->serv, CO_S5NAME) && ServerPrefVal (conn->serv, CO_S5PASS)) 
    154154            e = io_util_write (conn, d->next, "\x05\x02\x02\x00", 4);             
    155155        else 
     
    174174    if (d->flags == FLAG_SEND_CRED) 
    175175    { 
    176         const char *socks5name = ConnectionPrefStr (conn->serv, CO_S5NAME); 
    177         const char *socks5pass = ConnectionPrefStr (conn->serv, CO_S5PASS); 
     176        const char *socks5name = ServerPrefStr (conn->serv, CO_S5NAME); 
     177        const char *socks5pass = ServerPrefStr (conn->serv, CO_S5PASS); 
    178178        if (!socks5name || !socks5pass) 
    179179            return io_socks5_seterr (d, IO_RW, i18n (1599, "[SOCKS] Authentication method incorrect")); 
  • climm/src/jabber_base.cpp

    r2748 r2851  
    10181018    if (area == gloox::LogAreaXmlIncoming) 
    10191019    { 
    1020         if (ConnectionPrefVal (m_serv, CO_LOGSTREAM)) 
     1020        if (ServerPrefVal (m_serv, CO_LOGSTREAM)) 
    10211021            CLIMMXMPPSave (m_serv, message.c_str(), 1); 
    10221022        DebugH (DEB_XMPPIN, "%s/%s: %s", lt, la, message.c_str()); 
     
    10241024    else if (area == gloox::LogAreaXmlOutgoing) 
    10251025    { 
    1026         if (ConnectionPrefVal (m_serv, CO_LOGSTREAM)) 
     1026        if (ServerPrefVal (m_serv, CO_LOGSTREAM)) 
    10271027            CLIMMXMPPSave (m_serv, message.c_str(), 0); 
    10281028        DebugH (DEB_XMPPOUT, "%s/%s: %s", lt, la, message.c_str()); 
  • climm/src/oscar_base.c

    r2819 r2851  
    451451    } 
    452452     
    453     if (ConnectionPrefVal (serv, CO_LOGSTREAM)) 
     453    if (ServerPrefVal (serv, CO_LOGSTREAM)) 
    454454        FlapSave (serv, pak, FALSE); 
    455455     
     
    603603    UtilIOConnectTCP (serv->conn); 
    604604    rl_printf ("\n"); 
    605     if ((v = ConnectionPrefVal (serv, CO_OSCAR_DC_MODE))) 
     605    if ((v = ServerPrefVal (serv, CO_OSCAR_DC_MODE))) 
    606606    { 
    607607        Connection *conn = serv->oscar_dc; 
     
    688688        rl_print (COLEXDENT "\r"); 
    689689    } 
    690     if (ConnectionPrefVal (serv, CO_LOGSTREAM)) 
     690    if (ServerPrefVal (serv, CO_LOGSTREAM)) 
    691691        FlapSave (serv, pak, TRUE); 
    692692     
  • climm/src/oscar_dc.c

    r2824 r2851  
    116116    list->ip          = 0; 
    117117    s_repl (&list->server, NULL); 
    118     list->port        = ConnectionPrefVal (list->serv, CO_OSCAR_DC_PORT); 
     118    list->port        = ServerPrefVal (list->serv, CO_OSCAR_DC_PORT); 
    119119    list->cont        = list->serv->conn->cont; 
    120120 
     
    715715    PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP  */ 
    716716    PacketWriteB4 (pak, peer->serv->conn->our_local_ip);   /* our (local)  IP  */ 
    717     PacketWrite1  (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15);               /* connection type  */ 
     717    PacketWrite1  (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15);               /* connection type  */ 
    718718    PacketWrite4  (pak, peer->serv->oscar_dc->port);           /* our (other) port */ 
    719719    PacketWrite4  (pak, peer->oscar_our_session);          /* session id       */ 
     
    765765    PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP  */ 
    766766    PacketWriteB4 (pak, peer->serv->conn->our_local_ip);   /* our (local)  IP  */ 
    767     PacketWrite1  (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15);               /* connection type  */ 
     767    PacketWrite1  (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15);               /* connection type  */ 
    768768    PacketWrite4  (pak, peer->serv->oscar_dc->port);           /* our (other) port */ 
    769769    PacketWrite4  (pak, peer->oscar_our_session);          /* session id       */ 
  • climm/src/oscar_dc_file.c

    r2839 r2851  
    8989    flist->version  = serv->oscar_dc->version; 
    9090    flist->cont     = serv->oscar_dc->cont; 
    91     flist->port     = ConnectionPrefVal (serv, CO_OSCAR_DC_PORT); 
     91    flist->port     = ServerPrefVal (serv, CO_OSCAR_DC_PORT); 
    9292    flist->dispatch = &TCPDispatchMain; 
    9393     
  • climm/src/oscar_oldicq.c

    r2538 r2851  
    533533        PacketWriteB4 (pak, 0); 
    534534        PacketWrite1  (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK 
    535                             ? ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0); 
     535                            ? ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0); 
    536536        PacketWrite2  (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK 
    537537                            ? serv->oscar_dc->version : 0); 
  • climm/src/oscar_service.c

    r2825 r2851  
    358358    statusflag_t flags = imf_none; 
    359359     
    360     if (ConnectionPrefVal (serv, CO_WEBAWARE)) 
     360    if (ServerPrefVal (serv, CO_WEBAWARE)) 
    361361        flags |= imf_web; 
    362     if (ConnectionPrefVal (serv, CO_DCAUTH)) 
     362    if (ServerPrefVal (serv, CO_DCAUTH)) 
    363363        flags |= imf_dcauth; 
    364     if (ConnectionPrefVal (serv, CO_DCCONT)) 
     364    if (ServerPrefVal (serv, CO_DCCONT)) 
    365365        flags |= imf_dccont; 
    366366     
     
    384384        PacketWriteB2 (pak, 0x0c); /* TLV 0C */ 
    385385        PacketWriteB2 (pak, 0x25); 
    386         PacketWriteB4 (pak, ConnectionPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip); 
     386        PacketWriteB4 (pak, ServerPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip); 
    387387        if (serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK) 
    388388        { 
    389389            PacketWriteB4 (pak, serv->oscar_dc->port); 
    390             PacketWrite1  (pak, ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15); 
     390            PacketWrite1  (pak, ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15); 
    391391            PacketWriteB2 (pak, serv->oscar_dc->version); 
    392392            PacketWriteB4 (pak, serv->oscar_dc->oscar_our_session); 
  • climm/src/util_io.c

    r2822 r2851  
    4747void UtilIOConnectTCP (Connection *conn) 
    4848{ 
    49     if (ConnectionPrefVal (conn->serv, CO_S5USE)) 
     49    if (ServerPrefVal (conn->serv, CO_S5USE)) 
    5050        return IOConnectSocks5 (conn); 
    5151    return IOConnectTCP (conn); 
     
    5454void UtilIOListenTCP  (Connection *conn) 
    5555{ 
    56     if (ConnectionPrefVal (conn->serv, CO_S5USE)) 
     56    if (ServerPrefVal (conn->serv, CO_S5USE)) 
    5757        return IOListenSocks5 (conn); 
    5858    return IOListenTCP (conn); 
  • climm/src/xmpp_base.c

    r2850 r2851  
    211211        DebugH (DEB_XMPPOUT, "%s", data); 
    212212 
    213     if (!ConnectionPrefVal (serv, CO_LOGSTREAM)) 
     213    if (!ServerPrefVal (serv, CO_LOGSTREAM)) 
    214214        return; 
    215215 
     
    13721372     
    13731373    { 
    1374         const char *list = ConnectionPrefStr (serv, CO_XMPP_PRIV); 
     1374        const char *list = ServerPrefStr (serv, CO_XMPP_PRIV); 
    13751375        if (list) 
    13761376            XMPPSendIqPrivacy (serv, p_active, list); 
     
    15821582                        conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), 
    15831583                            s_sprintf ("%s@%s/climm", conn->serv->xmpp_id->user, conn->serv->xmpp_id->server)); 
    1584                     if (ConnectionPrefVal (conn->serv, CO_TAGRESSOURCE) || ConnectionPrefVal (conn->serv, CO_AUTOTAGRES)) 
     1584                    if (ServerPrefVal (conn->serv, CO_TAGRESSOURCE) || ServerPrefVal (conn->serv, CO_AUTOTAGRES)) 
    15851585                        conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), 
    15861586                            s_sprintf ("%s/%s%04X%04X", conn->serv->xmpp_id->partial, conn->serv->xmpp_id->resource, rand() % 0xffff, rand() % 0xffff));