Index: /climm/include/connection.h =================================================================== --- /climm/include/connection.h (revision 2847) +++ /climm/include/connection.h (revision 2851) @@ -115,4 +115,6 @@ Connection *ServerFindChild (const Server *parent, const Contact *cont, UWORD type); const char *ServerStrType (Server *conn); +val_t ServerPrefVal (Server *conn, UDWORD flag); +const char *ServerPrefStr (Server *conn, UDWORD flag); Connection *ConnectionC (UWORD type DEBUGPARAM); @@ -122,6 +124,4 @@ const char *ConnectionServerType (UWORD type); UWORD ConnectionServerNType (const char *type, char del); -val_t ConnectionPrefVal (Server *conn, UDWORD flag); -const char *ConnectionPrefStr (Server *conn, UDWORD flag); #define ConnectionC(t) ConnectionC (t DEBUGARGS) Index: /climm/src/oscar_base.c =================================================================== --- /climm/src/oscar_base.c (revision 2819) +++ /climm/src/oscar_base.c (revision 2851) @@ -451,5 +451,5 @@ } - if (ConnectionPrefVal (serv, CO_LOGSTREAM)) + if (ServerPrefVal (serv, CO_LOGSTREAM)) FlapSave (serv, pak, FALSE); @@ -603,5 +603,5 @@ UtilIOConnectTCP (serv->conn); rl_printf ("\n"); - if ((v = ConnectionPrefVal (serv, CO_OSCAR_DC_MODE))) + if ((v = ServerPrefVal (serv, CO_OSCAR_DC_MODE))) { Connection *conn = serv->oscar_dc; @@ -688,5 +688,5 @@ rl_print (COLEXDENT "\r"); } - if (ConnectionPrefVal (serv, CO_LOGSTREAM)) + if (ServerPrefVal (serv, CO_LOGSTREAM)) FlapSave (serv, pak, TRUE); Index: /climm/src/oscar_oldicq.c =================================================================== --- /climm/src/oscar_oldicq.c (revision 2538) +++ /climm/src/oscar_oldicq.c (revision 2851) @@ -533,5 +533,5 @@ PacketWriteB4 (pak, 0); PacketWrite1 (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK - ? ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0); + ? ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15 : 0); PacketWrite2 (pak, serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK ? serv->oscar_dc->version : 0); Index: /climm/src/oscar_dc_file.c =================================================================== --- /climm/src/oscar_dc_file.c (revision 2839) +++ /climm/src/oscar_dc_file.c (revision 2851) @@ -89,5 +89,5 @@ flist->version = serv->oscar_dc->version; flist->cont = serv->oscar_dc->cont; - flist->port = ConnectionPrefVal (serv, CO_OSCAR_DC_PORT); + flist->port = ServerPrefVal (serv, CO_OSCAR_DC_PORT); flist->dispatch = &TCPDispatchMain; Index: /climm/src/oscar_dc.c =================================================================== --- /climm/src/oscar_dc.c (revision 2824) +++ /climm/src/oscar_dc.c (revision 2851) @@ -116,5 +116,5 @@ list->ip = 0; s_repl (&list->server, NULL); - list->port = ConnectionPrefVal (list->serv, CO_OSCAR_DC_PORT); + list->port = ServerPrefVal (list->serv, CO_OSCAR_DC_PORT); list->cont = list->serv->conn->cont; @@ -715,5 +715,5 @@ PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP */ PacketWriteB4 (pak, peer->serv->conn->our_local_ip); /* our (local) IP */ - PacketWrite1 (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ + PacketWrite1 (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ PacketWrite4 (pak, peer->serv->oscar_dc->port); /* our (other) port */ PacketWrite4 (pak, peer->oscar_our_session); /* session id */ @@ -765,5 +765,5 @@ PacketWriteB4 (pak, peer->serv->conn->our_outside_ip); /* our (remote) IP */ PacketWriteB4 (pak, peer->serv->conn->our_local_ip); /* our (local) IP */ - PacketWrite1 (pak, ConnectionPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ + PacketWrite1 (pak, ServerPrefVal (peer->serv, CO_OSCAR_DC_MODE) & 15); /* connection type */ PacketWrite4 (pak, peer->serv->oscar_dc->port); /* our (other) port */ PacketWrite4 (pak, peer->oscar_our_session); /* session id */ Index: /climm/src/xmpp_base.c =================================================================== --- /climm/src/xmpp_base.c (revision 2850) +++ /climm/src/xmpp_base.c (revision 2851) @@ -211,5 +211,5 @@ DebugH (DEB_XMPPOUT, "%s", data); - if (!ConnectionPrefVal (serv, CO_LOGSTREAM)) + if (!ServerPrefVal (serv, CO_LOGSTREAM)) return; @@ -1372,5 +1372,5 @@ { - const char *list = ConnectionPrefStr (serv, CO_XMPP_PRIV); + const char *list = ServerPrefStr (serv, CO_XMPP_PRIV); if (list) XMPPSendIqPrivacy (serv, p_active, list); @@ -1582,5 +1582,5 @@ conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), s_sprintf ("%s@%s/climm", conn->serv->xmpp_id->user, conn->serv->xmpp_id->server)); - if (ConnectionPrefVal (conn->serv, CO_TAGRESSOURCE) || ConnectionPrefVal (conn->serv, CO_AUTOTAGRES)) + if (ServerPrefVal (conn->serv, CO_TAGRESSOURCE) || ServerPrefVal (conn->serv, CO_AUTOTAGRES)) conn->serv->xmpp_id = iks_id_new (iks_parser_stack (prs), s_sprintf ("%s/%s%04X%04X", conn->serv->xmpp_id->partial, conn->serv->xmpp_id->resource, rand() % 0xffff, rand() % 0xffff)); Index: /climm/src/jabber_base.cpp =================================================================== --- /climm/src/jabber_base.cpp (revision 2748) +++ /climm/src/jabber_base.cpp (revision 2851) @@ -1018,5 +1018,5 @@ if (area == gloox::LogAreaXmlIncoming) { - if (ConnectionPrefVal (m_serv, CO_LOGSTREAM)) + if (ServerPrefVal (m_serv, CO_LOGSTREAM)) CLIMMXMPPSave (m_serv, message.c_str(), 1); DebugH (DEB_XMPPIN, "%s/%s: %s", lt, la, message.c_str()); @@ -1024,5 +1024,5 @@ else if (area == gloox::LogAreaXmlOutgoing) { - if (ConnectionPrefVal (m_serv, CO_LOGSTREAM)) + if (ServerPrefVal (m_serv, CO_LOGSTREAM)) CLIMMXMPPSave (m_serv, message.c_str(), 0); DebugH (DEB_XMPPOUT, "%s/%s: %s", lt, la, message.c_str()); Index: /climm/src/oscar_service.c =================================================================== --- /climm/src/oscar_service.c (revision 2825) +++ /climm/src/oscar_service.c (revision 2851) @@ -358,9 +358,9 @@ statusflag_t flags = imf_none; - if (ConnectionPrefVal (serv, CO_WEBAWARE)) + if (ServerPrefVal (serv, CO_WEBAWARE)) flags |= imf_web; - if (ConnectionPrefVal (serv, CO_DCAUTH)) + if (ServerPrefVal (serv, CO_DCAUTH)) flags |= imf_dcauth; - if (ConnectionPrefVal (serv, CO_DCCONT)) + if (ServerPrefVal (serv, CO_DCCONT)) flags |= imf_dccont; @@ -384,9 +384,9 @@ PacketWriteB2 (pak, 0x0c); /* TLV 0C */ PacketWriteB2 (pak, 0x25); - PacketWriteB4 (pak, ConnectionPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip); + PacketWriteB4 (pak, ServerPrefVal (serv, CO_HIDEIP) ? 0 : serv->conn->our_local_ip); if (serv->oscar_dc && serv->oscar_dc->connect & CONNECT_OK) { PacketWriteB4 (pak, serv->oscar_dc->port); - PacketWrite1 (pak, ConnectionPrefVal (serv, CO_OSCAR_DC_MODE) & 15); + PacketWrite1 (pak, ServerPrefVal (serv, CO_OSCAR_DC_MODE) & 15); PacketWriteB2 (pak, serv->oscar_dc->version); PacketWriteB4 (pak, serv->oscar_dc->oscar_our_session); Index: /climm/src/connection.c =================================================================== --- /climm/src/connection.c (revision 2748) +++ /climm/src/connection.c (revision 2851) @@ -491,5 +491,5 @@ * Query an option for a contact group */ -val_t ConnectionPrefVal (Server *serv, UDWORD flag) +val_t ServerPrefVal (Server *serv, UDWORD flag) { val_t res = 0; @@ -504,5 +504,5 @@ * Query an option for a contact group */ -const char *ConnectionPrefStr (Server *serv, UDWORD flag) +const char *ServerPrefStr (Server *serv, UDWORD flag) { const char *res = 0; Index: /climm/src/util_io.c =================================================================== --- /climm/src/util_io.c (revision 2822) +++ /climm/src/util_io.c (revision 2851) @@ -47,5 +47,5 @@ void UtilIOConnectTCP (Connection *conn) { - if (ConnectionPrefVal (conn->serv, CO_S5USE)) + if (ServerPrefVal (conn->serv, CO_S5USE)) return IOConnectSocks5 (conn); return IOConnectTCP (conn); @@ -54,5 +54,5 @@ void UtilIOListenTCP (Connection *conn) { - if (ConnectionPrefVal (conn->serv, CO_S5USE)) + if (ServerPrefVal (conn->serv, CO_S5USE)) return IOListenSocks5 (conn); return IOListenTCP (conn); Index: /climm/src/io/io_socks5.c =================================================================== --- /climm/src/io/io_socks5.c (revision 2843) +++ /climm/src/io/io_socks5.c (revision 2851) @@ -108,6 +108,6 @@ static void io_socks5_open (Connection *conn, Dispatcher *d) { - const char *socks5server = ConnectionPrefStr (conn->serv, CO_S5HOST); - UDWORD socks5port = ConnectionPrefVal (conn->serv, CO_S5PORT); + const char *socks5server = ServerPrefStr (conn->serv, CO_S5HOST); + UDWORD socks5port = ServerPrefVal (conn->serv, CO_S5PORT); char *origserver = conn->server; UDWORD origport = conn->port, origip = conn->ip; @@ -151,5 +151,5 @@ if (rc != IO_CONNECTED) return io_socks5_seterr (d, rc, d->next->funcs->f_err (conn, d->next)); - if (ConnectionPrefVal (conn->serv, CO_S5NAME) && ConnectionPrefVal (conn->serv, CO_S5PASS)) + if (ServerPrefVal (conn->serv, CO_S5NAME) && ServerPrefVal (conn->serv, CO_S5PASS)) e = io_util_write (conn, d->next, "\x05\x02\x02\x00", 4); else @@ -174,6 +174,6 @@ if (d->flags == FLAG_SEND_CRED) { - const char *socks5name = ConnectionPrefStr (conn->serv, CO_S5NAME); - const char *socks5pass = ConnectionPrefStr (conn->serv, CO_S5PASS); + const char *socks5name = ServerPrefStr (conn->serv, CO_S5NAME); + const char *socks5pass = ServerPrefStr (conn->serv, CO_S5PASS); if (!socks5name || !socks5pass) return io_socks5_seterr (d, IO_RW, i18n (1599, "[SOCKS] Authentication method incorrect")); Index: /climm/doc/climmcmds.7 =================================================================== --- /climm/doc/climmcmds.7 (revision 2849) +++ /climm/doc/climmcmds.7 (revision 2851) @@ -1006,17 +1006,17 @@ will be used. .TP -.BI webaware \ boolean\ connection[ICQ] +.BI webaware \ boolean\ server[ICQ] Whether the current status should be visible on the web site. .TP -.BI hideip \ boolean\ connection[ICQ] +.BI hideip \ boolean\ server[ICQ] Whether to hide the (local) IP address towards other users. .TP -.BI dcauth \ boolean\ connection[ICQ] +.BI dcauth \ boolean\ server[ICQ] Whether authorized contacts can see the (remote) IP address. .TP -.BI dccont \ boolean\ connection[ICQ] +.BI dccont \ boolean\ server[ICQ] Whether contacts can see the (remote) IP address. .TP -.BI countaway \ boolean\ connection +.BI countaway \ boolean\ server If set, incoming messages will be counted and their originators shown if the status is manually changed to anything other than @@ -1034,25 +1034,25 @@ .IR invisible ). .TP -.BI s5_use \ boolean\ connection +.BI s5_use \ boolean\ server Enable the use of a socks 5 proxy. New for 0.6.4. .TP -.BI s5_host \ string\ connection +.BI s5_host \ string\ server Connect to socks 5 proxy on the given host. New for 0.6.4. .TP -.BI s5_port \ integer\ connection +.BI s5_port \ integer\ server Connect to socks 5 proxy listening on the given port number. New for 0.6.4. .TP -.BI s5_name \ string\ connection +.BI s5_name \ string\ server Identify as the given user to the socks 5 proxy. New for 0.6.4. .TP -.BI s5_pass \ string\ connection +.BI s5_pass \ string\ server Authenticate with the given password to the socks 5 proxy. New for 0.6.4. .TP -.BI oscar_dc_port \ integer\ connection[ICQ] -Define the minimum port to listen for incoming direct connection when using +.BI oscar_dc_port \ integer\ server[ICQ] +Define the minimum port to listen for incoming direct connections when using the oscar protocol. If the given port is in used, the port number actually used is increased until a free one is found. New for 0.6.4. .TP -.BI oscar_dc_mode \ integer\ connection[ICQ] +.BI oscar_dc_mode \ integer\ server[ICQ] .RS This integer is for flags how to handle direct connections: @@ -1079,9 +1079,9 @@ .RE .TP -.BI logstream \ boolean\ connection +.BI logstream \ boolean\ server Log all data sent over the connection to the server into a file in BASEDIR/debug/. .TP -.BI privacylist \ string\ connection[XMPP] +.BI privacylist \ string\ server[XMPP] After login, select the given privacy list as the active list for this session. If the list is empty, select no privacy list as active. Otherwise, @@ -1199,8 +1199,8 @@ New for 0.5. .TP -.BI optconnection \ [