Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 149708 Details for
Bug 217660
net-im/bitlbee-1.2: USE flag for jabber file transfer branch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
jabber file transfer patch
bitlbee-1.2-jabber-ft.patch (text/plain), 357.61 KB, created by
Ulim
on 2008-04-14 17:27:05 UTC
(
hide
)
Description:
jabber file transfer patch
Filename:
MIME Type:
Creator:
Ulim
Created:
2008-04-14 17:27:05 UTC
Size:
357.61 KB
patch
obsolete
>diff -urN bitlbee-1.2/account.c bitlbee-1.2-jabberft/account.c >--- bitlbee-1.2/account.c 2007-12-13 00:19:31.000000000 +0100 >+++ bitlbee-1.2-jabberft/account.c 2008-04-14 18:53:28.000000000 +0200 >@@ -181,19 +181,17 @@ > { > account_t *a, *l = NULL; > >+ if( acc->ic ) >+ /* Caller should have checked, accounts still in use can't be deleted. */ >+ return; >+ > for( a = irc->accounts; a; a = (l=a)->next ) > if( a == acc ) > { >- if( a->ic ) return; /* Caller should have checked, accounts still in use can't be deleted. */ >- > if( l ) >- { > l->next = a->next; >- } > else >- { > irc->accounts = a->next; >- } > > while( a->set ) > set_del( &a->set, a->set->key ); >@@ -202,7 +200,7 @@ > > g_free( a->user ); > g_free( a->pass ); >- if( a->server ) g_free( a->server ); >+ g_free( a->server ); > if( a->reconnect ) /* This prevents any reconnect still queued to happen */ > cancel_auto_reconnect( a ); > g_free( a ); >diff -urN bitlbee-1.2/bitlbee.c bitlbee-1.2-jabberft/bitlbee.c >--- bitlbee-1.2/bitlbee.c 2008-02-11 12:54:24.000000000 +0100 >+++ bitlbee-1.2-jabberft/bitlbee.c 2008-04-14 18:53:31.000000000 +0200 >@@ -225,12 +225,16 @@ > > if( st == size ) > { >- g_free( irc->sendbuffer ); >- irc->sendbuffer = NULL; >- irc->w_watch_source_id = 0; >- > if( irc->status & USTATUS_SHUTDOWN ) >+ { > irc_free( irc ); >+ } >+ else >+ { >+ g_free( irc->sendbuffer ); >+ irc->sendbuffer = NULL; >+ irc->w_watch_source_id = 0; >+ } > > return FALSE; > } >diff -urN bitlbee-1.2/bitlbee.h bitlbee-1.2-jabberft/bitlbee.h >--- bitlbee-1.2/bitlbee.h 2008-03-16 01:06:36.000000000 +0100 >+++ bitlbee-1.2-jabberft/bitlbee.h 2008-04-14 18:53:31.000000000 +0200 >@@ -159,6 +159,8 @@ > void root_command( irc_t *irc, char *command[] ); > gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond ); > >+char *set_eval_root_nick( set_t *set, char *new_nick ); >+ > extern global_t global; > > #endif >diff -urN bitlbee-1.2/conf.c bitlbee-1.2-jabberft/conf.c >--- bitlbee-1.2/conf.c 2008-02-11 13:25:59.000000000 +0100 >+++ bitlbee-1.2-jabberft/conf.c 2008-04-14 18:53:32.000000000 +0200 >@@ -61,6 +61,7 @@ > conf->ping_interval = 180; > conf->ping_timeout = 300; > conf->user = NULL; >+ conf->max_filetransfer_size = G_MAXUINT; > proxytype = 0; > > i = conf_loadini( conf, global.conf_file ); >@@ -251,7 +252,7 @@ > else if( g_strcasecmp( ini->key, "account_storage_migrate" ) == 0 ) > { > g_strfreev( conf->migrate_storage ); >- conf->migrate_storage = g_strsplit( ini->value, " \t,;", -1 ); >+ conf->migrate_storage = g_strsplit_set( ini->value, " \t,;", -1 ); > } > else if( g_strcasecmp( ini->key, "pinginterval" ) == 0 ) > { >diff -urN bitlbee-1.2/conf.h bitlbee-1.2-jabberft/conf.h >--- bitlbee-1.2/conf.h 2007-12-04 23:47:18.000000000 +0100 >+++ bitlbee-1.2-jabberft/conf.h 2008-04-14 18:53:28.000000000 +0200 >@@ -49,6 +49,7 @@ > int ping_interval; > int ping_timeout; > char *user; >+ size_t max_filetransfer_size; > } conf_t; > > G_GNUC_MALLOC conf_t *conf_load( int argc, char *argv[] ); >diff -urN bitlbee-1.2/dcc.c bitlbee-1.2-jabberft/dcc.c >--- bitlbee-1.2/dcc.c 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/dcc.c 2008-04-14 18:53:32.000000000 +0200 >@@ -0,0 +1,677 @@ >+/********************************************************************\ >+* BitlBee -- An IRC to other IM-networks gateway * >+* * >+* Copyright 2007 Uli Meis <a.sporto+bee@gmail.com> * >+\********************************************************************/ >+ >+/* >+ This program is free software; you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation; either version 2 of the License, or >+ (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License with >+ the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; >+ if not, write to the Free Software Foundation, Inc., 59 Temple Place, >+ Suite 330, Boston, MA 02111-1307 USA >+*/ >+ >+#define BITLBEE_CORE >+#include "bitlbee.h" >+#include "ft.h" >+#include "dcc.h" >+#include <poll.h> >+#include <netinet/tcp.h> >+#include <regex.h> >+ >+/* >+ * Since that might be confusing a note on naming: >+ * >+ * Generic dcc functions start with >+ * >+ * dcc_ >+ * >+ * ,methods specific to DCC SEND start with >+ * >+ * dccs_ >+ * >+ * . Since we can be on both ends of a DCC SEND, >+ * functions specific to one end are called >+ * >+ * dccs_send and dccs_recv >+ * >+ * ,respectively. >+ */ >+ >+ >+/* >+ * used to generate a unique local transfer id the user >+ * can use to reject/cancel transfers >+ */ >+unsigned int local_transfer_id=1; >+ >+/* >+ * just for debugging the nr. of chunks we received from im-protocols and the total data >+ */ >+unsigned int receivedchunks=0, receiveddata=0; >+ >+int max_packet_size = 0; >+ >+static void dcc_finish( file_transfer_t *file ); >+static void dcc_close( file_transfer_t *file ); >+gboolean dccs_send_proto( gpointer data, gint fd, b_input_condition cond ); >+gboolean dcc_listen( dcc_file_transfer_t *df, struct sockaddr_storage **saddr_ptr ); >+int dccs_send_request( struct dcc_file_transfer *df, char *user_nick, struct sockaddr_storage *saddr ); >+gboolean dccs_recv_start( file_transfer_t *ft ); >+gboolean dccs_recv_proto( gpointer data, gint fd, b_input_condition cond); >+gboolean dccs_recv_write_request( file_transfer_t *ft ); >+ >+/* As defined in ft.h */ >+file_transfer_t *imcb_file_send_start( struct im_connection *ic, char *handle, char *file_name, size_t file_size ) >+{ >+ user_t *u = user_findhandle( ic, handle ); >+ /* one could handle this more intelligent like imcb_buddy_msg. >+ * can't call it directly though cause it does some wrapping. >+ * Maybe give imcb_buddy_msg a parameter NO_WRAPPING? */ >+ if (!u) return NULL; >+ >+ return dccs_send_start( ic, u->nick, file_name, file_size ); >+}; >+ >+/* As defined in ft.h */ >+void imcb_file_canceled( file_transfer_t *file, char *reason ) >+{ >+ if( file->canceled ) >+ file->canceled( file, reason ); >+ >+ dcc_close( file ); >+} >+ >+/* As defined in ft.h */ >+gboolean imcb_file_recv_start( file_transfer_t *ft ) >+{ >+ return dccs_recv_start( ft ); >+} >+ >+dcc_file_transfer_t *dcc_alloc_transfer( char *file_name, size_t file_size, struct im_connection *ic ) >+{ >+ file_transfer_t *file = g_new0( file_transfer_t, 1 ); >+ dcc_file_transfer_t *df = file->priv = g_new0( dcc_file_transfer_t, 1); >+ file->file_size = file_size; >+ file->file_name = g_strdup( file_name ); >+ file->local_id = local_transfer_id++; >+ df->ic = ic; >+ df->ft = file; >+ >+ return df; >+} >+ >+/* This is where the sending magic starts... */ >+file_transfer_t *dccs_send_start( struct im_connection *ic, char *user_nick, char *file_name, size_t file_size ) >+{ >+ file_transfer_t *file; >+ dcc_file_transfer_t *df; >+ struct sockaddr_storage *saddr; >+ >+ if( file_size > global.conf->max_filetransfer_size ) >+ return NULL; >+ >+ df = dcc_alloc_transfer( file_name, file_size, ic ); >+ file = df->ft; >+ file->write = dccs_send_write; >+ >+ /* listen and request */ >+ if( !dcc_listen( df, &saddr ) || >+ !dccs_send_request( df, user_nick, saddr ) ) >+ return NULL; >+ >+ g_free( saddr ); >+ >+ /* watch */ >+ df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_send_proto, df ); >+ >+ df->ic->irc->file_transfers = g_slist_prepend( df->ic->irc->file_transfers, file ); >+ >+ return file; >+} >+ >+/* Used pretty much everywhere in the code to abort a transfer */ >+gboolean dcc_abort( dcc_file_transfer_t *df, char *reason, ... ) >+{ >+ file_transfer_t *file = df->ft; >+ va_list params; >+ va_start( params, reason ); >+ char *msg = g_strdup_vprintf( reason, params ); >+ va_end( params ); >+ >+ file->status |= FT_STATUS_CANCELED; >+ >+ if( file->canceled ) >+ file->canceled( file, msg ); >+ else >+ imcb_log( df->ic, "DCC transfer aborted: %s", msg ); >+ >+ g_free( msg ); >+ >+ dcc_close( df->ft ); >+ >+ return FALSE; >+} >+ >+/* used extensively for socket operations */ >+#define ASSERTSOCKOP(op, msg) \ >+ if( (op) == -1 ) \ >+ return dcc_abort( df , msg ": %s", strerror( errno ) ); >+ >+/* Creates the "DCC SEND" line and sends it to the server */ >+int dccs_send_request( struct dcc_file_transfer *df, char *user_nick, struct sockaddr_storage *saddr ) >+{ >+ char ipaddr[INET6_ADDRSTRLEN]; >+ const void *netaddr; >+ int port; >+ char *cmd; >+ >+ if( saddr->ss_family == AF_INET ) >+ { >+ struct sockaddr_in *saddr_ipv4 = ( struct sockaddr_in *) saddr; >+ >+ sprintf( ipaddr, "%d", >+ ntohl( saddr_ipv4->sin_addr.s_addr ) ); >+ port = saddr_ipv4->sin_port; >+ } else >+ { >+ struct sockaddr_in6 *saddr_ipv6 = ( struct sockaddr_in6 *) saddr; >+ >+ netaddr = &saddr_ipv6->sin6_addr.s6_addr; >+ port = saddr_ipv6->sin6_port; >+ >+ /* >+ * Didn't find docs about this, but it seems that's the way irssi does it >+ */ >+ if( !inet_ntop( saddr->ss_family, netaddr, ipaddr, sizeof( ipaddr ) ) ) >+ return dcc_abort( df, "inet_ntop failed: %s", strerror( errno ) ); >+ } >+ >+ port = ntohs( port ); >+ >+ cmd = g_strdup_printf( "\001DCC SEND %s %s %u %zu\001", >+ df->ft->file_name, ipaddr, port, df->ft->file_size ); >+ >+ if ( !irc_msgfrom( df->ic->irc, user_nick, cmd ) ) >+ return dcc_abort( df, "couldn't send 'DCC SEND' message to %s", user_nick ); >+ >+ g_free( cmd ); >+ >+ return TRUE; >+} >+ >+/* >+ * Creates a listening socket and returns it in saddr_ptr. >+ */ >+gboolean dcc_listen( dcc_file_transfer_t *df, struct sockaddr_storage **saddr_ptr ) >+{ >+ file_transfer_t *file = df->ft; >+ struct sockaddr_storage *saddr; >+ int fd,gret; >+ char hostname[ HOST_NAME_MAX + 1 ]; >+ struct addrinfo hints, *rp; >+ socklen_t ssize = sizeof( struct sockaddr_storage ); >+ >+ /* won't be long till someone asks for this to be configurable :) */ >+ >+ ASSERTSOCKOP( gethostname( hostname, sizeof( hostname ) ), "gethostname()" ); >+ >+ memset( &hints, 0, sizeof( struct addrinfo ) ); >+ hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_NUMERICSERV; >+ >+ if ( ( gret = getaddrinfo( hostname, "0", &hints, &rp ) != 0 ) ) >+ return dcc_abort( df, "getaddrinfo(): %s", gai_strerror( gret ) ); >+ >+ saddr = g_new( struct sockaddr_storage, 1 ); >+ >+ *saddr_ptr = saddr; >+ >+ memcpy( saddr, rp->ai_addr, rp->ai_addrlen ); >+ >+ ASSERTSOCKOP( fd = df->fd = socket( saddr->ss_family, SOCK_STREAM, 0 ), "Opening socket" ); >+ >+ ASSERTSOCKOP( bind( fd, ( struct sockaddr *)saddr, rp->ai_addrlen ), "Binding socket" ); >+ >+ freeaddrinfo( rp ); >+ >+ ASSERTSOCKOP( getsockname( fd, ( struct sockaddr *)saddr, &ssize ), "Getting socket name" ); >+ >+ ASSERTSOCKOP( listen( fd, 1 ), "Making socket listen" ); >+ >+ file->status = FT_STATUS_LISTENING; >+ >+ return TRUE; >+} >+ >+/* >+ * Checks poll(), same for receiving and sending >+ */ >+gboolean dcc_poll( dcc_file_transfer_t *df, int fd, short *revents ) >+{ >+ struct pollfd pfd = { .fd = fd, .events = POLLHUP|POLLERR|POLLIN|POLLOUT }; >+ >+ ASSERTSOCKOP( poll( &pfd, 1, 0 ), "poll()" ) >+ >+ if( pfd.revents & POLLERR ) >+ { >+ int sockerror; >+ socklen_t errlen = sizeof( sockerror ); >+ >+ if ( getsockopt( fd, SOL_SOCKET, SO_ERROR, &sockerror, &errlen ) ) >+ return dcc_abort( df, "getsockopt() failed, unknown socket error (weird!)" ); >+ >+ return dcc_abort( df, "Socket error: %s", strerror( sockerror ) ); >+ } >+ >+ if( pfd.revents & POLLHUP ) >+ return dcc_abort( df, "Remote end closed connection" ); >+ >+ *revents = pfd.revents; >+ >+ return TRUE; >+} >+ >+/* >+ * fills max_packet_size with twice the TCP maximum segment size >+ */ >+gboolean dcc_check_maxseg( dcc_file_transfer_t *df, int fd ) >+{ >+ /* >+ * use twice the maximum segment size as a maximum for calls to send(). >+ */ >+ if( max_packet_size == 0 ) >+ { >+ unsigned int mpslen = sizeof( max_packet_size ); >+ if( getsockopt( fd, IPPROTO_TCP, TCP_MAXSEG, &max_packet_size, &mpslen ) ) >+ return dcc_abort( df, "getsockopt() failed" ); >+ max_packet_size *= 2; >+ } >+ return TRUE; >+} >+ >+/* >+ * After setup, the transfer itself is handled entirely by this function. >+ * There are basically four things to handle: connect, receive, send, and error. >+ */ >+gboolean dccs_send_proto( gpointer data, gint fd, b_input_condition cond ) >+{ >+ dcc_file_transfer_t *df = data; >+ file_transfer_t *file = df->ft; >+ short revents; >+ >+ if( !dcc_poll( df, fd, &revents) ) >+ return FALSE; >+ >+ if( ( revents & POLLIN ) && >+ ( file->status & FT_STATUS_LISTENING ) ) >+ { >+ struct sockaddr *clt_addr; >+ socklen_t ssize = sizeof( clt_addr ); >+ >+ /* Connect */ >+ >+ ASSERTSOCKOP( df->fd = accept( fd, (struct sockaddr *) &clt_addr, &ssize ), "Accepting connection" ); >+ >+ closesocket( fd ); >+ fd = df->fd; >+ file->status = FT_STATUS_TRANSFERRING; >+ sock_make_nonblocking( fd ); >+ >+ if ( !dcc_check_maxseg( df, fd ) ) >+ return FALSE; >+ >+ /* IM protocol callback */ >+ if( file->accept ) >+ file->accept( file ); >+ >+ /* reschedule for reading on new fd */ >+ df->watch_in = b_input_add( fd, GAIM_INPUT_READ, dccs_send_proto, df ); >+ >+ return FALSE; >+ } >+ >+ if( revents & POLLIN ) >+ { >+ int bytes_received; >+ int ret; >+ >+ ASSERTSOCKOP( ret = recv( fd, &bytes_received, sizeof( bytes_received ), MSG_PEEK ), "Receiving" ); >+ >+ if( ret == 0 ) >+ return dcc_abort( df, "Remote end closed connection" ); >+ >+ if( ret < 4 ) >+ { >+ imcb_log( df->ic, "WARNING: DCC SEND: receiver sent only 2 bytes instead of 4, shouldn't happen too often!" ); >+ return TRUE; >+ } >+ >+ ASSERTSOCKOP( ret = recv( fd, &bytes_received, sizeof( bytes_received ), 0 ), "Receiving" ); >+ if( ret != 4 ) >+ return dcc_abort( df, "MSG_PEEK'ed 4, but can only dequeue %d bytes", ret ); >+ >+ bytes_received = ntohl( bytes_received ); >+ >+ /* If any of this is actually happening, the receiver should buy a new IRC client */ >+ >+ if ( bytes_received > df->bytes_sent ) >+ return dcc_abort( df, "Receiver magically received more bytes than sent ( %d > %d ) (BUG at receiver?)", bytes_received, df->bytes_sent ); >+ >+ if ( bytes_received < file->bytes_transferred ) >+ return dcc_abort( df, "Receiver lost bytes? ( has %d, had %d ) (BUG at receiver?)", bytes_received, file->bytes_transferred ); >+ >+ file->bytes_transferred = bytes_received; >+ >+ if( file->bytes_transferred >= file->file_size ) { >+ dcc_finish( file ); >+ return FALSE; >+ } >+ >+ return TRUE; >+ } >+ >+ return TRUE; >+} >+ >+gboolean dccs_recv_start( file_transfer_t *ft ) >+{ >+ dcc_file_transfer_t *df = ft->priv; >+ struct sockaddr_storage *saddr = &df->saddr; >+ int fd; >+ char ipaddr[INET6_ADDRSTRLEN]; >+ socklen_t sa_len = saddr->ss_family == AF_INET ? >+ sizeof( struct sockaddr_in ) : sizeof( struct sockaddr_in6 ); >+ >+ if( !ft->write ) >+ return dcc_abort( df, "BUG: protocol didn't register write()" ); >+ >+ ASSERTSOCKOP( fd = df->fd = socket( saddr->ss_family, SOCK_STREAM, 0 ) , "Opening Socket" ); >+ >+ sock_make_nonblocking( fd ); >+ >+ if( ( connect( fd, (struct sockaddr *)saddr, sa_len ) == -1 ) && >+ ( errno != EINPROGRESS ) ) >+ return dcc_abort( df, "Connecting to %s:%d : %s", >+ inet_ntop( saddr->ss_family, >+ saddr->ss_family == AF_INET ? >+ ( void* ) &( ( struct sockaddr_in *) saddr )->sin_addr.s_addr : >+ ( void* ) &( ( struct sockaddr_in6 *) saddr )->sin6_addr.s6_addr, >+ ipaddr, >+ sizeof( ipaddr ) ), >+ ntohs( saddr->ss_family == AF_INET ? >+ ( ( struct sockaddr_in *) saddr )->sin_port : >+ ( ( struct sockaddr_in6 *) saddr )->sin6_port ), >+ strerror( errno ) ); >+ >+ ft->status = FT_STATUS_CONNECTING; >+ >+ /* watch */ >+ df->watch_out = b_input_add( df->fd, GAIM_INPUT_WRITE, dccs_recv_proto, df ); >+ ft->write_request = dccs_recv_write_request; >+ >+ return TRUE; >+} >+ >+gboolean dccs_recv_proto( gpointer data, gint fd, b_input_condition cond) >+{ >+ dcc_file_transfer_t *df = data; >+ file_transfer_t *ft = df->ft; >+ short revents; >+ >+ if( !dcc_poll( df, fd, &revents ) ) >+ return FALSE; >+ >+ if( ( revents & POLLOUT ) && >+ ( ft->status & FT_STATUS_CONNECTING ) ) >+ { >+ ft->status = FT_STATUS_TRANSFERRING; >+ if ( !dcc_check_maxseg( df, fd ) ) >+ return FALSE; >+ >+ //df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_recv_proto, df ); >+ >+ df->watch_out = 0; >+ return FALSE; >+ } >+ >+ if( revents & POLLIN ) >+ { >+ int ret, done; >+ >+ ASSERTSOCKOP( ret = recv( fd, ft->buffer, sizeof( ft->buffer ), 0 ), "Receiving" ); >+ >+ if( ret == 0 ) >+ return dcc_abort( df, "Remote end closed connection" ); >+ >+ df->bytes_sent += ret; >+ >+ done = df->bytes_sent >= ft->file_size; >+ >+ if( ( ( df->bytes_sent - ft->bytes_transferred ) > DCC_PACKET_SIZE ) || >+ done ) >+ { >+ int ack, ackret; >+ ack = htonl( ft->bytes_transferred = df->bytes_sent ); >+ >+ ASSERTSOCKOP( ackret = send( fd, &ack, 4, 0 ), "Sending DCC ACK" ); >+ >+ if ( ackret != 4 ) >+ return dcc_abort( df, "Error sending DCC ACK, sent %d instead of 4 bytes", ackret ); >+ } >+ >+ if( !ft->write( df->ft, ft->buffer, ret ) ) >+ return FALSE; >+ >+ if( done ) >+ { >+ closesocket( fd ); >+ dcc_finish( ft ); >+ >+ df->watch_in = 0; >+ return FALSE; >+ } >+ >+ df->watch_in = 0; >+ return FALSE; >+ } >+ >+ return TRUE; >+} >+ >+gboolean dccs_recv_write_request( file_transfer_t *ft ) >+{ >+ dcc_file_transfer_t *df = ft->priv; >+ >+ if( df->watch_in ) >+ return dcc_abort( df, "BUG: write_request() called while watching" ); >+ >+ df->watch_in = b_input_add( df->fd, GAIM_INPUT_READ, dccs_recv_proto, df ); >+ >+ return TRUE; >+} >+ >+gboolean dccs_send_can_write( gpointer data, gint fd, b_input_condition cond ) >+{ >+ struct dcc_file_transfer *df = data; >+ df->watch_out = 0; >+ >+ df->ft->write_request( df->ft ); >+ return FALSE; >+} >+ >+/* >+ * Incoming data. >+ * >+ */ >+gboolean dccs_send_write( file_transfer_t *file, char *data, unsigned int data_len ) >+{ >+ dcc_file_transfer_t *df = file->priv; >+ int ret; >+ >+ receivedchunks++; receiveddata += data_len; >+ >+ if( df->watch_out ) >+ return dcc_abort( df, "BUG: write() called while watching" ); >+ >+ ASSERTSOCKOP( ret = send( df->fd, data, data_len, 0 ), "Sending data" ); >+ >+ if( ret == 0 ) >+ return dcc_abort( df, "Remote end closed connection" ); >+ >+ /* TODO: this should really not be fatal */ >+ if( ret < data_len ) >+ return dcc_abort( df, "send() sent %d instead of %d", ret, data_len ); >+ >+ df->bytes_sent += ret; >+ >+ if( df->bytes_sent < df->ft->file_size ) >+ df->watch_out = b_input_add( df->fd, GAIM_INPUT_WRITE, dccs_send_can_write, df ); >+ >+ return TRUE; >+} >+ >+/* >+ * Cleans up after a transfer. >+ */ >+static void dcc_close( file_transfer_t *file ) >+{ >+ dcc_file_transfer_t *df = file->priv; >+ >+ if( file->free ) >+ file->free( file ); >+ >+ closesocket( df->fd ); >+ >+ if( df->watch_in ) >+ b_event_remove( df->watch_in ); >+ >+ if( df->watch_out ) >+ b_event_remove( df->watch_out ); >+ >+ df->ic->irc->file_transfers = g_slist_remove( df->ic->irc->file_transfers, file ); >+ >+ g_free( df ); >+ g_free( file->file_name ); >+ g_free( file ); >+} >+ >+void dcc_finish( file_transfer_t *file ) >+{ >+ file->status |= FT_STATUS_FINISHED; >+ >+ if( file->finished ) >+ file->finished( file ); >+ >+ dcc_close( file ); >+} >+ >+/* >+ * DCC SEND <filename> <IP> <port> <filesize> >+ * >+ * filename can be in "" or not. If it is, " can probably be escaped... >+ * IP can be an unsigned int (IPV4) or something else (IPV6) >+ * >+ */ >+file_transfer_t *dcc_request( struct im_connection *ic, char *line ) >+{ >+ char *pattern = "SEND" >+ " (([^\"][^ ]*)|\"([^\"]|\\\")*\")" >+ " (([0-9]*)|([^ ]*))" >+ " ([0-9]*)" >+ " ([0-9]*)\001"; >+ regmatch_t pmatch[9]; >+ regex_t re; >+ file_transfer_t *ft; >+ dcc_file_transfer_t *df; >+ char errbuf[256]; >+ int regerrcode, gret; >+ >+ if( ( regerrcode = regcomp( &re, pattern, REG_EXTENDED ) ) || >+ ( regerrcode = regexec( &re, line, 9, pmatch, 0 ) ) ) { >+ regerror( regerrcode,&re,errbuf,sizeof( errbuf ) ); >+ imcb_log( ic, >+ "DCC: error parsing 'DCC SEND': %s, line: %s", >+ errbuf, line ); >+ return NULL; >+ } >+ >+ if( ( pmatch[1].rm_so > 0 ) && >+ ( pmatch[4].rm_so > 0 ) && >+ ( pmatch[7].rm_so > 0 ) && >+ ( pmatch[8].rm_so > 0 ) ) >+ { >+ char *input = g_strdup( line ); >+ char *filename, *host, *port; >+ size_t filesize; >+ struct addrinfo hints, *rp; >+ >+ /* "filename" or filename */ >+ if ( pmatch[2].rm_so > 0 ) >+ { >+ input[pmatch[2].rm_eo] = '\0'; >+ filename = input + pmatch[2].rm_so; >+ } else >+ { >+ input[pmatch[3].rm_eo] = '\0'; >+ filename = input + pmatch[3].rm_so; >+ } >+ >+ input[pmatch[4].rm_eo] = '\0'; >+ >+ /* number means ipv4, something else means ipv6 */ >+ if ( pmatch[5].rm_so > 0 ) >+ { >+ struct in_addr ipaddr = { .s_addr = htonl( atoi( input + pmatch[5].rm_so ) ) }; >+ host = inet_ntoa( ipaddr ); >+ } else >+ { >+ /* Contains non-numbers, hopefully an IPV6 address */ >+ host = input + pmatch[6].rm_so; >+ } >+ >+ input[pmatch[7].rm_eo] = '\0'; >+ input[pmatch[8].rm_eo] = '\0'; >+ >+ port = input + pmatch[7].rm_so; >+ filesize = atoll( input + pmatch[8].rm_so ); >+ >+ memset( &hints, 0, sizeof ( struct addrinfo ) ); >+ if ( ( gret = getaddrinfo( host, port, &hints, &rp ) ) ) >+ { >+ g_free( input ); >+ imcb_log( ic, "DCC: getaddrinfo() failed with %s " >+ "when parsing incoming 'DCC SEND': " >+ "host %s, port %s", >+ gai_strerror( gret ), host, port ); >+ return NULL; >+ } >+ >+ df = dcc_alloc_transfer( filename, filesize, ic ); >+ ft = df->ft; >+ ft->sending = TRUE; >+ memcpy( &df->saddr, rp->ai_addr, rp->ai_addrlen ); >+ >+ freeaddrinfo( rp ); >+ g_free( input ); >+ >+ df->ic->irc->file_transfers = g_slist_prepend( df->ic->irc->file_transfers, ft ); >+ >+ return ft; >+ } >+ >+ imcb_log( ic, "DCC: couldnt parse 'DCC SEND' line: %s", line ); >+ >+ return NULL; >+} >+ >diff -urN bitlbee-1.2/dcc.h bitlbee-1.2-jabberft/dcc.h >--- bitlbee-1.2/dcc.h 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/dcc.h 2008-04-14 18:53:28.000000000 +0200 >@@ -0,0 +1,86 @@ >+/********************************************************************\ >+* BitlBee -- An IRC to other IM-networks gateway * >+* * >+* Copyright 2006 Marijn Kruisselbrink and others * >+* Copyright 2007 Uli Meis <a.sporto+bee@gmail.com> * >+\********************************************************************/ >+ >+/* >+ This program is free software; you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation; either version 2 of the License, or >+ (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License with >+ the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; >+ if not, write to the Free Software Foundation, Inc., 59 Temple Place, >+ Suite 330, Boston, MA 02111-1307 USA >+*/ >+ >+/* >+ * DCC SEND >+ * >+ * Historically, DCC means send 1024 Bytes and wait for a 4 byte reply >+ * acknowledging all transferred data. This is ridiculous for two reasons. The >+ * first being that TCP is a stream oriented protocol that doesn't care much >+ * about your idea of a packet. The second reason being that TCP is a reliable >+ * transfer protocol with its own sophisticated ACK mechanism, making DCCs ACK >+ * mechanism look like a joke. For these reasons, DCCs requirements have >+ * (hopefully) been relaxed in most implementations and this implementation >+ * depends upon at least the following: The 1024 bytes need not be transferred >+ * at once, i.e. packets can be smaller. A second relaxation has apparently >+ * gotten the name "DCC SEND ahead" which basically means to not give a damn >+ * about those DCC ACKs and just send data as you please. This behaviour is >+ * enabled by default. Note that this also means that packets may be as large >+ * as the maximum segment size. >+ */ >+ >+#ifndef _DCC_H >+#define _DCC_H >+ >+/* Send an ACK after receiving this amount of data */ >+#define DCC_PACKET_SIZE 1024 >+ >+typedef struct dcc_file_transfer { >+ >+ struct im_connection *ic; >+ >+ /* >+ * Depending in the status of the file transfer, this is either the socket that is >+ * being listened on for connections, or the socket over which the file transfer is >+ * taking place. >+ */ >+ int fd; >+ >+ /* >+ * IDs returned by b_input_add for watch_ing over the above socket. >+ */ >+ gint watch_in; /* readable */ >+ gint watch_out; /* writable */ >+ >+ /* >+ * The total amount of bytes that have been sent to the irc client. >+ */ >+ size_t bytes_sent; >+ >+ /* imc's handle */ >+ file_transfer_t *ft; >+ >+ /* if we're receiving, this is the sender's socket address */ >+ struct sockaddr_storage saddr; >+ >+} dcc_file_transfer_t; >+ >+file_transfer_t *dccs_send_start( struct im_connection *ic, char *user_nick, char *file_name, size_t file_size ); >+ >+void dcc_canceled( file_transfer_t *file, char *reason ); >+ >+gboolean dccs_send_write( file_transfer_t *file, char *data, unsigned int data_size ); >+ >+file_transfer_t *dcc_request( struct im_connection *ic, char *line ); >+#endif >diff -urN bitlbee-1.2/debian/bitlbee.init bitlbee-1.2-jabberft/debian/bitlbee.init >--- bitlbee-1.2/debian/bitlbee.init 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/bitlbee.init 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,89 @@ >+#! /bin/sh >+### BEGIN INIT INFO >+# Provides: bitlbee >+# Required-Start: $remote_fs $syslog >+# Required-Stop: $remote_fs $syslog >+# Default-Start: 2 3 4 5 >+# Default-Stop: 1 >+### END INIT INFO >+# >+# Init script for BitlBee Debian package. Based on skeleton init script: >+# >+# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl >+# >+ >+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin >+DESC="BitlBee IRC/IM gateway" >+NAME=bitlbee >+DAEMON=/usr/sbin/$NAME >+PIDFILE=/var/run/$NAME.pid >+SCRIPTNAME=/etc/init.d/$NAME >+ >+# Gracefully exit if the package has been removed. >+[ -x $DAEMON ] || exit 0 >+ >+# Default value >+BITLBEE_PORT=6667 >+BITLBEE_OPTS=-F >+ >+# Read config file if it is present. >+if [ -r /etc/default/$NAME ]; then >+ . /etc/default/$NAME >+fi >+ >+[ "$BITLBEE_DISABLED" = "1" ] && exit 0 >+ >+ >+# >+# Function that starts the daemon/service. >+# >+d_start() { >+ # Make sure BitlBee can actually write its PID... >+ touch /var/run/bitlbee.pid >+ chown bitlbee /var/run/bitlbee.pid >+ >+ start-stop-daemon --start --quiet --pidfile $PIDFILE \ >+ -c bitlbee: \ >+ --exec $DAEMON -- -p $BITLBEE_PORT -P $PIDFILE $BITLBEE_OPTS >+} >+ >+# >+# Function that stops the daemon/service. >+# >+d_stop() { >+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \ >+ --name $NAME >+} >+ >+ >+case "$1" in >+ start) >+ echo -n "Starting $DESC: $NAME" >+ d_start >+ echo "." >+ ;; >+ stop) >+ echo -n "Stopping $DESC: $NAME" >+ d_stop >+ echo "." >+ ;; >+ #reload) >+ # >+ # No reload target, but there's a REHASH command which we >+ # might use later... >+ # >+ #;; >+ restart|force-reload) >+ echo -n "Restarting $DESC: $NAME" >+ d_stop >+ sleep 1 >+ d_start >+ echo "." >+ ;; >+ *) >+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 >+ exit 1 >+ ;; >+esac >+ >+exit 0 >diff -urN bitlbee-1.2/debian/changelog bitlbee-1.2-jabberft/debian/changelog >--- bitlbee-1.2/debian/changelog 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/changelog 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,356 @@ >+bitlbee (1.2-4) unstable; urgency=low >+ >+ * Not a real release, just a placeholder for the changelog. >+ * Fixed init script to use the BITLBEE_OPTS variable, not an undefined >+ DAEMON_OPT. >+ * Added dependency information to the init script. (Closes: #472567) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 29 Mar 2008 21:10:33 +0000 >+ >+bitlbee (1.2-3) unstable; urgency=low >+ >+ * Removed DEB_BUILD_OPTIONS again (forgot to apply that change to the 1.2 >+ branch when I finished 1.0.4-2, things diverged too much anyway.) >+ Closes: #472540. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Mon, 24 Mar 2008 21:10:14 +0000 >+ >+bitlbee (1.2-2) unstable; urgency=low >+ >+ * Fixed some packaging issues reported by IRC and e-mail. (Closes: #472373) >+ * Fixed proxy support. (Closes: #472395) >+ * Added a BitlBee group so only root can edit the configs and BitlBee can >+ just *read* it. >+ * Manually deleting /var/lib/bitlbee/ when purging, deluser doesn't want to >+ do it. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Mon, 24 Mar 2008 19:48:24 +0000 >+ >+bitlbee (1.2-1) unstable; urgency=low >+ >+ * New upstream release. (Closes: #325017, #386914, #437515) >+ * With hopefully completely sane charset handling (Closes: #296145) >+ * Switched to the new forking daemon mode. Added /etc/default/bitlbee >+ file, an init script. People who want to stick with inetd can do so, see >+ the defaults file. >+ (Closes: #460741, #466171, #294585, #345038, #306452, #392682) >+ * Got rid of debconf Woody compatibility stuff. >+ * No more MPL code in BitlBee, thanks to the Jabber module rewrite! >+ * Added Italian translation, sorry for taking so long! (Closes: #448238) >+ * Added libevent dependency (more reliable event handling). >+ * Removed GLib 1.x dependency because BitlBee really requires GLib >=2.4. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 18 Mar 2008 23:44:19 +0000 >+ >+bitlbee (1.0.4-2) unstable; urgency=low >+ >+ * Removed $DEB_BUILD_OPTIONS because apparently buildds fill it with crap. >+ (Closes: #458717) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Mon, 11 Feb 2008 19:15:33 +0000 >+ >+bitlbee (1.0.4-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Changed libnss-dev dependency. (Closes: #370442) >+ * Added build-indep rule to debian/rules. (Closes: #395673) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Wed, 29 Aug 2007 20:24:28 +0100 >+ >+bitlbee (1.0.3-1.3) unstable; urgency=low >+ >+ * Non-maintainer upload to fix a minor error. >+ * Remove extra debian/#rules# >+ >+ -- Christian Perrier <bubulle@debian.org> Tue, 20 Feb 2007 07:49:18 +0100 >+ >+bitlbee (1.0.3-1.2) unstable; urgency=low >+ >+ * Non-maintainer upload to fix pending l10n issues. >+ * Debconf translations: >+ - Portuguese. Closes: #386348 >+ >+ -- Christian Perrier <bubulle@debian.org> Sun, 18 Feb 2007 20:23:28 +0100 >+ >+bitlbee (1.0.3-1.1) unstable; urgency=low >+ >+ * Non-maintainer upload. >+ * debian/control: Replace netkit-inetd dependency with a versioned >+ dependency on netbase. netbase provides the appropriate inetd >+ dependency. Closes: #382682. >+ >+ -- Roger Leigh <rleigh@debian.org> Sun, 20 Aug 2006 17:07:02 +0100 >+ >+bitlbee (1.0.3-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Jul 2006 11:32:57 +0200 >+ >+bitlbee (1.0.2-2) unstable; urgency=low >+ >+ * Added a po-debconf build-dependency, which I forgot when removing the >+ Woody hack from 1.0.2-1. (Closes: #361503) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Apr 2006 22:09:19 +0200 >+ >+bitlbee (1.0.2-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Avoids calling update-inetd if it's unavailable. (Closes: #350463) >+ * Also using userdel instead of deluser now to avoid another bug. :-) >+ * Only creates an inetd.conf entry when installing for the first time. >+ (Closes: #349570) (This unfortunately breaks dpkg-reconfigure, but at >+ least there's a warning...) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Sat, 8 Apr 2006 14:17:52 +0200 >+ >+bitlbee (1.0.1-1) unstable; urgency=low >+ >+ * New upstream release >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 17 Jan 2006 17:26:20 +0100 >+ >+bitlbee (1.0-1) unstable; urgency=low >+ >+ * New upstream release >+ * bitlbee has a useless Build-Depends: on debconf-2.0 (Closes: >+ #341783) >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Mon, 5 Dec 2005 17:59:07 +0100 >+ >+bitlbee (0.99-1) unstable; urgency=low >+ >+ * Should build on Debian GNU/kFreeBSD now. (Closes: #336965) >+ * New upstream version. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Thu, 3 Nov 2005 21:06:53 +0100 >+ >+bitlbee (0.93a-1) unstable; urgency=low >+ >+ * Added Swedish and Spanish translations. (Closes: #333881, #331302) >+ * Changed debconf dependency. (Closes: #331762) >+ * Changed libgnutls dependency. (Closes: #335751) >+ * Fixed one crash-on-disconnect bug in the OSCAR module. >+ >+ -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 1 Nov 2005 18:25:56 +0100 >+ >+bitlbee (0.92-2) unstable; urgency=low >+ >+ * Added the patch that allows to connect to alternate Jabber servers. >+ Necessary for connecting to Google Talk. (Closes: #324832) >+ * Also possibly fixes some more problems with losing data when disk is >+ full. >+ * Added Vietnamese and Brazilian DebConf translations. Sorry for being >+ so late. (Closes: #297058, #313158) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 8 Sep 2005 19:55:56 +0200 >+ >+bitlbee (0.92-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Implemented support for the IRC WATCH command and got rid of the >+ IRC_MAX_ARGS limit. (Closes: #283504) >+ * Added Czech translation. (Closes: #293615) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 24 Feb 2005 17:11:32 +0100 >+ >+bitlbee (0.91-3) unstable; urgency=low >+ >+ * Fixed a small bug in postrm which caused problems when removing/upgrading. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sun, 10 Oct 2004 08:59:52 +0200 >+ >+bitlbee (0.91-2) unstable; urgency=low >+ >+ * Removed the part that messes with tcpd configuration files because it >+ causes troubles for some people and because it's no problem for users >+ to edit those files by hand. (Closes: #275418) >+ When upgrading from previous versions, the bitlbee line won't be removed >+ from your tcpd conffiles. (This is only done when purging a BitlBee >+ install) You don't have to worry about BitlBee suddenly opening for the >+ whole world because of the removal of this feature. >+ * Updated German translation. (Closes: #274655) >+ * Removed the unreliable check for an existing BitlBee installation (a >+ /etc/passwd grep) and replaced it with something more reliable. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 9 Oct 2004 19:06:33 +0200 >+ >+bitlbee (0.91-1) unstable; urgency=low >+ >+ * info-command works for Jabber connections now. (Closes: #232712) >+ * Saner code for duplicate nickname prevention. (Closes: #234285) >+ * Support for Jabber connections over SSL. (Closes: #252458) >+ * If the user chooses for noinetd.conf installation, this setting is now >+ remembered during reinstalls. (Closes: #260533) >+ * An up-to-date Japanse DebConf template. (Closes: #271091) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 25 Sep 2004 18:18:17 +0200 >+ >+bitlbee (0.90a-2) unstable; urgency=low >+ >+ * Using libgnutls11 now. (Closes: #264740) >+ * postinst no longer appends newlines to hosts.* because grep already >+ makes sure the last line is terminated with a newline. (Closes: #253278) >+ * Added Japanese DebConf templates. (Closes: #259801) >+ * Installing BitlBee in inetd.conf is now optional. (Closes: #260533) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 6 Sep 2004 20:04:22 +0200 >+ >+bitlbee (0.90a-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 28 Jun 2004 20:30:26 +0200 >+ >+bitlbee (0.90-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Added German DebConf translation. (Closes: #250787) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 29 May 2004 11:51:56 +0200 >+ >+bitlbee (0.85a-1) unstable; urgency=low >+ >+ * New upstream release. This one should fix build problems on arm. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 25 Mar 2004 00:12:33 +0100 >+ >+bitlbee (0.85-1) unstable; urgency=low >+ >+ * New upstream release. >+ * This version has a command line switch to specify alternate configuration >+ files/settings directories. (Closes: #207060) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 13 Mar 2004 22:19:35 +0100 >+ >+bitlbee (0.84-2) unstable; urgency=low >+ >+ * Converted debconf templates to po2debconf format, without breaking >+ building on older (non-po2debconf) systems. Thanks to Martin Quinson. >+ (Closes: #205816) >+ * Added French debconf templates. Thanks to Christian Perrier. >+ (Closes: #206593) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 3 Mar 2004 21:19:12 +0100 >+ >+bitlbee (0.84-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 13 Feb 2004 20:13:53 +0100 >+ >+bitlbee (0.83-2) unstable; urgency=low >+ >+ * Removed libsoup dependency, BitlBee now uses libgnutls directly. >+ (Closes: #208475, #230895) >+ * Now including preprocessed documentation files to save some time on >+ slow buildd's (and fix build problems on archs without a working >+ sgmltools package). >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 6 Feb 2004 01:26:27 +0100 >+ >+bitlbee (0.83-1) unstable; urgency=low >+ >+ * Added bitlbee.conf to conffiles. Should've done that before, sorry. >+ * Sorry, still with MSN support disabled, because Debian's default >+ libsoup package won't work with BitlBee-MSN. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 31 Dec 2003 00:56:57 +0100 >+ >+bitlbee (0.82-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Disabled MSN support in the Debian version for now, because it needs >+ a patched version of libsoup. If you want MSN support, you'll have to >+ create one yourself and install a patched version of libsoup. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Fri, 31 Oct 2003 21:51:01 +0100 >+ >+bitlbee (0.81a-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 16 Oct 2003 16:21:31 +0200 >+ >+bitlbee (0.81-1) unstable; urgency=low >+ >+ * New upstream release. >+ * Fixes Yahoo! problems. (Closes: #213876) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 15 Oct 2003 16:00:00 +0200 >+ >+bitlbee (0.80-1) unstable; urgency=low >+ >+ * New upstream release. >+ * preinst now unlinks the old helpfile while upgrading, see README.Debian >+ for details. >+ * 'Upgraded' to standards 3.5.9. >+ * "jabber: Non-ascii away messages not supported" patch included. >+ (Closes: #195852) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 24 Jun 2003 20:00:00 +0200 >+ >+bitlbee (0.74a-1) unstable; urgency=low >+ >+ * This one actually does contain the bugfix 0.74 should've had. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 11 Jun 2003 13:44:01 +0200 >+ >+bitlbee (0.74-1) unstable; urgency=high >+ >+ * Security release, fixing a little not-too-dangerous security bug. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 10 Jun 2003 22:50:19 +0200 >+ >+bitlbee (0.73-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sun, 13 Apr 2003 01:20:49 +0200 >+ >+bitlbee (0.72-2) unstable; urgency=low >+ >+ * Now uses '127.0.0.1' as default for hosts.allow instead of 'localhost'. >+ (Closes: #174219) >+ * Fixed some other portability issues. (Closes: #177394) >+ * Added w3m builddep, needed for .txt documentation generation. >+ * Removed jadetex builddep because it seems not to be necessary after all. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Tue, 21 Jan 2003 01:35:46 +0100 >+ >+bitlbee (0.72-1) unstable; urgency=low >+ >+ * BitlBee doesn't have tcpd in it anymore; external tcpd is used now. >+ * Added an examples/ directory. >+ * Fixed arm/ppc/s390 portability issue on char signedness. (Closes: #161026) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 19 Dec 2002 00:24:29 +0100 >+ >+bitlbee (0.71-1) unstable; urgency=low >+ >+ * New upstream release. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Mon, 16 Sep 2002 01:02:09 +0200 >+ >+bitlbee (0.7-2) unstable; urgency=low >+ >+ * Second try at a good upload. >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Thu, 15 Aug 2002 20:14:54 +0200 >+ >+bitlbee (0.7-1) unstable; urgency=low >+ >+ * First public release. (Closes: #153190) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Sat, 10 Aug 2002 04:47:07 +0200 >+ >+bitlbee (0.6-1) unstable; urgency=low >+ >+ * Initial Release. (Testing only, not for release.) >+ >+ -- Wilmer van der Gaast <lintux@debian.org> Wed, 10 Jul 2002 11:02:28 +0200 >+ >+Local variables: >+mode: debian-changelog >+End: >diff -urN bitlbee-1.2/debian/conffiles bitlbee-1.2-jabberft/debian/conffiles >--- bitlbee-1.2/debian/conffiles 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/conffiles 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,3 @@ >+/etc/bitlbee/motd.txt >+/etc/bitlbee/bitlbee.conf >+/etc/init.d/bitlbee >diff -urN bitlbee-1.2/debian/config bitlbee-1.2-jabberft/debian/config >--- bitlbee-1.2/debian/config 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/config 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,19 @@ >+#!/bin/sh -e >+ >+. /usr/share/debconf/confmodule >+ >+db_title BitlBee >+ >+db_get bitlbee/serveport >+if [ "$RET" = "stillhavetoask" ]; then >+ if netstat -ltn | grep ':6667' 2> /dev/null > /dev/null; then >+ port=6668; >+ else >+ port=6667; >+ fi >+ db_set bitlbee/serveport $port; >+fi >+ >+if db_input medium bitlbee/serveport; then >+ db_go; >+fi >diff -urN bitlbee-1.2/debian/control bitlbee-1.2-jabberft/debian/control >--- bitlbee-1.2/debian/control 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/control 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,13 @@ >+Source: bitlbee >+Section: net >+Priority: optional >+Maintainer: Wilmer van der Gaast <wilmer@gaast.net> >+Standards-Version: 3.5.9 >+Build-Depends: libglib2.0-dev (>= 2.4), libevent-dev, libgnutls-dev | libnss-dev (>= 1.6), debconf-2.0, po-debconf >+ >+Package: bitlbee >+Architecture: any >+Depends: ${shlibs:Depends}, adduser, net-tools, ${debconf-depends}, debianutils (>= 1.16) >+Description: An IRC to other chat networks gateway >+ This program can be used as an IRC server which forwards everything you >+ say to people on other chat networks: Jabber, ICQ, AIM, MSN and Yahoo. >diff -urN bitlbee-1.2/debian/copyright bitlbee-1.2-jabberft/debian/copyright >--- bitlbee-1.2/debian/copyright 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/copyright 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,393 @@ >+This package was debianized by Wilmer van der Gaast <lintux@debian.org> on >+Mon, 8 Jul 2002 13:17:42 +0200. >+ >+The source can be downloaded from http://www.bitlbee.org/ >+ >+Authors: Wilmer van der Gaast, Sjoerd Hemminga, Jelmer Vernooij, >+ Maurits Dijkstra and others. >+ >+Mainly Copyright 2002-2004 Wilmer van der Gaast. >+Some parts are borrowed from Gaim (version 0.58) <http://gaim.sf.net/>. >+For the copyrights on those parts, please read the Gaim source code. >+ >+BitlBee License: >+ >+============================================================================ >+ This program is free software; you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation; either version 2 of the License, or >+ (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License with >+ the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; >+ if not, write to the Free Software Foundation, Inc., 59 Temple Place, >+ Suite 330, Boston, MA 02111-1307 USA >+============================================================================ >+ >+ >+ >+The SGML-formatted documentation is written by Jelmer Vernooij >+<jelmer@nl.linux.org> under the GNU Free Documentation License: >+ >+============================================================================ >+ GNU Free Documentation License >+ Version 1.1, March 2000 >+ >+ Copyright (C) 2000 Free Software Foundation, Inc. >+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA >+ Everyone is permitted to copy and distribute verbatim copies >+ of this license document, but changing it is not allowed. >+ >+ >+0. PREAMBLE >+ >+The purpose of this License is to make a manual, textbook, or other >+written document "free" in the sense of freedom: to assure everyone >+the effective freedom to copy and redistribute it, with or without >+modifying it, either commercially or noncommercially. Secondarily, >+this License preserves for the author and publisher a way to get >+credit for their work, while not being considered responsible for >+modifications made by others. >+ >+This License is a kind of "copyleft", which means that derivative >+works of the document must themselves be free in the same sense. It >+complements the GNU General Public License, which is a copyleft >+license designed for free software. >+ >+We have designed this License in order to use it for manuals for free >+software, because free software needs free documentation: a free >+program should come with manuals providing the same freedoms that the >+software does. But this License is not limited to software manuals; >+it can be used for any textual work, regardless of subject matter or >+whether it is published as a printed book. We recommend this License >+principally for works whose purpose is instruction or reference. >+ >+ >+1. APPLICABILITY AND DEFINITIONS >+ >+This License applies to any manual or other work that contains a >+notice placed by the copyright holder saying it can be distributed >+under the terms of this License. The "Document", below, refers to any >+such manual or work. Any member of the public is a licensee, and is >+addressed as "you". >+ >+A "Modified Version" of the Document means any work containing the >+Document or a portion of it, either copied verbatim, or with >+modifications and/or translated into another language. >+ >+A "Secondary Section" is a named appendix or a front-matter section of >+the Document that deals exclusively with the relationship of the >+publishers or authors of the Document to the Document's overall subject >+(or to related matters) and contains nothing that could fall directly >+within that overall subject. (For example, if the Document is in part a >+textbook of mathematics, a Secondary Section may not explain any >+mathematics.) The relationship could be a matter of historical >+connection with the subject or with related matters, or of legal, >+commercial, philosophical, ethical or political position regarding >+them. >+ >+The "Invariant Sections" are certain Secondary Sections whose titles >+are designated, as being those of Invariant Sections, in the notice >+that says that the Document is released under this License. >+ >+The "Cover Texts" are certain short passages of text that are listed, >+as Front-Cover Texts or Back-Cover Texts, in the notice that says that >+the Document is released under this License. >+ >+A "Transparent" copy of the Document means a machine-readable copy, >+represented in a format whose specification is available to the >+general public, whose contents can be viewed and edited directly and >+straightforwardly with generic text editors or (for images composed of >+pixels) generic paint programs or (for drawings) some widely available >+drawing editor, and that is suitable for input to text formatters or >+for automatic translation to a variety of formats suitable for input >+to text formatters. A copy made in an otherwise Transparent file >+format whose markup has been designed to thwart or discourage >+subsequent modification by readers is not Transparent. A copy that is >+not "Transparent" is called "Opaque". >+ >+Examples of suitable formats for Transparent copies include plain >+ASCII without markup, Texinfo input format, LaTeX input format, SGML >+or XML using a publicly available DTD, and standard-conforming simple >+HTML designed for human modification. Opaque formats include >+PostScript, PDF, proprietary formats that can be read and edited only >+by proprietary word processors, SGML or XML for which the DTD and/or >+processing tools are not generally available, and the >+machine-generated HTML produced by some word processors for output >+purposes only. >+ >+The "Title Page" means, for a printed book, the title page itself, >+plus such following pages as are needed to hold, legibly, the material >+this License requires to appear in the title page. For works in >+formats which do not have any title page as such, "Title Page" means >+the text near the most prominent appearance of the work's title, >+preceding the beginning of the body of the text. >+ >+ >+2. VERBATIM COPYING >+ >+You may copy and distribute the Document in any medium, either >+commercially or noncommercially, provided that this License, the >+copyright notices, and the license notice saying this License applies >+to the Document are reproduced in all copies, and that you add no other >+conditions whatsoever to those of this License. You may not use >+technical measures to obstruct or control the reading or further >+copying of the copies you make or distribute. However, you may accept >+compensation in exchange for copies. If you distribute a large enough >+number of copies you must also follow the conditions in section 3. >+ >+You may also lend copies, under the same conditions stated above, and >+you may publicly display copies. >+ >+ >+3. COPYING IN QUANTITY >+ >+If you publish printed copies of the Document numbering more than 100, >+and the Document's license notice requires Cover Texts, you must enclose >+the copies in covers that carry, clearly and legibly, all these Cover >+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on >+the back cover. Both covers must also clearly and legibly identify >+you as the publisher of these copies. The front cover must present >+the full title with all words of the title equally prominent and >+visible. You may add other material on the covers in addition. >+Copying with changes limited to the covers, as long as they preserve >+the title of the Document and satisfy these conditions, can be treated >+as verbatim copying in other respects. >+ >+If the required texts for either cover are too voluminous to fit >+legibly, you should put the first ones listed (as many as fit >+reasonably) on the actual cover, and continue the rest onto adjacent >+pages. >+ >+If you publish or distribute Opaque copies of the Document numbering >+more than 100, you must either include a machine-readable Transparent >+copy along with each Opaque copy, or state in or with each Opaque copy >+a publicly-accessible computer-network location containing a complete >+Transparent copy of the Document, free of added material, which the >+general network-using public has access to download anonymously at no >+charge using public-standard network protocols. If you use the latter >+option, you must take reasonably prudent steps, when you begin >+distribution of Opaque copies in quantity, to ensure that this >+Transparent copy will remain thus accessible at the stated location >+until at least one year after the last time you distribute an Opaque >+copy (directly or through your agents or retailers) of that edition to >+the public. >+ >+It is requested, but not required, that you contact the authors of the >+Document well before redistributing any large number of copies, to give >+them a chance to provide you with an updated version of the Document. >+ >+ >+4. MODIFICATIONS >+ >+You may copy and distribute a Modified Version of the Document under >+the conditions of sections 2 and 3 above, provided that you release >+the Modified Version under precisely this License, with the Modified >+Version filling the role of the Document, thus licensing distribution >+and modification of the Modified Version to whoever possesses a copy >+of it. In addition, you must do these things in the Modified Version: >+ >+A. Use in the Title Page (and on the covers, if any) a title distinct >+ from that of the Document, and from those of previous versions >+ (which should, if there were any, be listed in the History section >+ of the Document). You may use the same title as a previous version >+ if the original publisher of that version gives permission. >+B. List on the Title Page, as authors, one or more persons or entities >+ responsible for authorship of the modifications in the Modified >+ Version, together with at least five of the principal authors of the >+ Document (all of its principal authors, if it has less than five). >+C. State on the Title page the name of the publisher of the >+ Modified Version, as the publisher. >+D. Preserve all the copyright notices of the Document. >+E. Add an appropriate copyright notice for your modifications >+ adjacent to the other copyright notices. >+F. Include, immediately after the copyright notices, a license notice >+ giving the public permission to use the Modified Version under the >+ terms of this License, in the form shown in the Addendum below. >+G. Preserve in that license notice the full lists of Invariant Sections >+ and required Cover Texts given in the Document's license notice. >+H. Include an unaltered copy of this License. >+I. Preserve the section entitled "History", and its title, and add to >+ it an item stating at least the title, year, new authors, and >+ publisher of the Modified Version as given on the Title Page. If >+ there is no section entitled "History" in the Document, create one >+ stating the title, year, authors, and publisher of the Document as >+ given on its Title Page, then add an item describing the Modified >+ Version as stated in the previous sentence. >+J. Preserve the network location, if any, given in the Document for >+ public access to a Transparent copy of the Document, and likewise >+ the network locations given in the Document for previous versions >+ it was based on. These may be placed in the "History" section. >+ You may omit a network location for a work that was published at >+ least four years before the Document itself, or if the original >+ publisher of the version it refers to gives permission. >+K. In any section entitled "Acknowledgements" or "Dedications", >+ preserve the section's title, and preserve in the section all the >+ substance and tone of each of the contributor acknowledgements >+ and/or dedications given therein. >+L. Preserve all the Invariant Sections of the Document, >+ unaltered in their text and in their titles. Section numbers >+ or the equivalent are not considered part of the section titles. >+M. Delete any section entitled "Endorsements". Such a section >+ may not be included in the Modified Version. >+N. Do not retitle any existing section as "Endorsements" >+ or to conflict in title with any Invariant Section. >+ >+If the Modified Version includes new front-matter sections or >+appendices that qualify as Secondary Sections and contain no material >+copied from the Document, you may at your option designate some or all >+of these sections as invariant. To do this, add their titles to the >+list of Invariant Sections in the Modified Version's license notice. >+These titles must be distinct from any other section titles. >+ >+You may add a section entitled "Endorsements", provided it contains >+nothing but endorsements of your Modified Version by various >+parties--for example, statements of peer review or that the text has >+been approved by an organization as the authoritative definition of a >+standard. >+ >+You may add a passage of up to five words as a Front-Cover Text, and a >+passage of up to 25 words as a Back-Cover Text, to the end of the list >+of Cover Texts in the Modified Version. Only one passage of >+Front-Cover Text and one of Back-Cover Text may be added by (or >+through arrangements made by) any one entity. If the Document already >+includes a cover text for the same cover, previously added by you or >+by arrangement made by the same entity you are acting on behalf of, >+you may not add another; but you may replace the old one, on explicit >+permission from the previous publisher that added the old one. >+ >+The author(s) and publisher(s) of the Document do not by this License >+give permission to use their names for publicity for or to assert or >+imply endorsement of any Modified Version. >+ >+ >+5. COMBINING DOCUMENTS >+ >+You may combine the Document with other documents released under this >+License, under the terms defined in section 4 above for modified >+versions, provided that you include in the combination all of the >+Invariant Sections of all of the original documents, unmodified, and >+list them all as Invariant Sections of your combined work in its >+license notice. >+ >+The combined work need only contain one copy of this License, and >+multiple identical Invariant Sections may be replaced with a single >+copy. If there are multiple Invariant Sections with the same name but >+different contents, make the title of each such section unique by >+adding at the end of it, in parentheses, the name of the original >+author or publisher of that section if known, or else a unique number. >+Make the same adjustment to the section titles in the list of >+Invariant Sections in the license notice of the combined work. >+ >+In the combination, you must combine any sections entitled "History" >+in the various original documents, forming one section entitled >+"History"; likewise combine any sections entitled "Acknowledgements", >+and any sections entitled "Dedications". You must delete all sections >+entitled "Endorsements." >+ >+ >+6. COLLECTIONS OF DOCUMENTS >+ >+You may make a collection consisting of the Document and other documents >+released under this License, and replace the individual copies of this >+License in the various documents with a single copy that is included in >+the collection, provided that you follow the rules of this License for >+verbatim copying of each of the documents in all other respects. >+ >+You may extract a single document from such a collection, and distribute >+it individually under this License, provided you insert a copy of this >+License into the extracted document, and follow this License in all >+other respects regarding verbatim copying of that document. >+ >+ >+7. AGGREGATION WITH INDEPENDENT WORKS >+ >+A compilation of the Document or its derivatives with other separate >+and independent documents or works, in or on a volume of a storage or >+distribution medium, does not as a whole count as a Modified Version >+of the Document, provided no compilation copyright is claimed for the >+compilation. Such a compilation is called an "aggregate", and this >+License does not apply to the other self-contained works thus compiled >+with the Document, on account of their being thus compiled, if they >+are not themselves derivative works of the Document. >+ >+If the Cover Text requirement of section 3 is applicable to these >+copies of the Document, then if the Document is less than one quarter >+of the entire aggregate, the Document's Cover Texts may be placed on >+covers that surround only the Document within the aggregate. >+Otherwise they must appear on covers around the whole aggregate. >+ >+ >+8. TRANSLATION >+ >+Translation is considered a kind of modification, so you may >+distribute translations of the Document under the terms of section 4. >+Replacing Invariant Sections with translations requires special >+permission from their copyright holders, but you may include >+translations of some or all Invariant Sections in addition to the >+original versions of these Invariant Sections. You may include a >+translation of this License provided that you also include the >+original English version of this License. In case of a disagreement >+between the translation and the original English version of this >+License, the original English version will prevail. >+ >+ >+9. TERMINATION >+ >+You may not copy, modify, sublicense, or distribute the Document except >+as expressly provided for under this License. Any other attempt to >+copy, modify, sublicense or distribute the Document is void, and will >+automatically terminate your rights under this License. However, >+parties who have received copies, or rights, from you under this >+License will not have their licenses terminated so long as such >+parties remain in full compliance. >+ >+ >+10. FUTURE REVISIONS OF THIS LICENSE >+ >+The Free Software Foundation may publish new, revised versions >+of the GNU Free Documentation License from time to time. Such new >+versions will be similar in spirit to the present version, but may >+differ in detail to address new problems or concerns. See >+http://www.gnu.org/copyleft/. >+ >+Each version of the License is given a distinguishing version number. >+If the Document specifies that a particular numbered version of this >+License "or any later version" applies to it, you have the option of >+following the terms and conditions either of that specified version or >+of any later version that has been published (not as a draft) by the >+Free Software Foundation. If the Document does not specify a version >+number of this License, you may choose any version ever published (not >+as a draft) by the Free Software Foundation. >+ >+ >+ADDENDUM: How to use this License for your documents >+ >+To use this License in a document you have written, include a copy of >+the License in the document and put the following copyright and >+license notices just after the title page: >+ >+ Copyright (c) YEAR YOUR NAME. >+ Permission is granted to copy, distribute and/or modify this document >+ under the terms of the GNU Free Documentation License, Version 1.1 >+ or any later version published by the Free Software Foundation; >+ with the Invariant Sections being LIST THEIR TITLES, with the >+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. >+ A copy of the license is included in the section entitled "GNU >+ Free Documentation License". >+ >+If you have no Invariant Sections, write "with no Invariant Sections" >+instead of saying which ones are invariant. If you have no >+Front-Cover Texts, write "no Front-Cover Texts" instead of >+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. >+ >+If your document contains nontrivial examples of program code, we >+recommend releasing these examples in parallel under your choice of >+free software license, such as the GNU General Public License, >+to permit their use in free software. >+============================================================================ >diff -urN bitlbee-1.2/debian/po/cs.po bitlbee-1.2-jabberft/debian/po/cs.po >--- bitlbee-1.2/debian/po/cs.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/cs.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,44 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2005-02-04 12:31+0100\n" >+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n" >+"Language-Team: Czech <debian-l10n-czech@debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=ISO-8859-2\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Na kterém TCP portu má BitlBee naslouchat pøíchozím spojením?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee normálnì naslouchá na bì¾ném IRC portu 6667. Pokud máte spu¹tìný i " >+"reálný IRC daemon, tak to nemusí být nejlep¹í nápad. Vhodná alternativa mù¾e " >+"být 6668. Ponecháte-li pole prázdné, znamená to, ¾e se BitlBee nebude " >+"spou¹tìt automaticky." >diff -urN bitlbee-1.2/debian/po/de.po bitlbee-1.2-jabberft/debian/po/de.po >--- bitlbee-1.2/debian/po/de.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/de.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,45 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans# >+# Developers do not need to manually edit POT or PO files. >+# Erik Schanze <mail@erikschanze.de>, 2004. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee_0.90a-2_de\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2004-10-03 14:33+0200\n" >+"Last-Translator: Erik Schanze <mail@erikschanze.de>\n" >+"Language-Team: German <debian-l10n-german@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=UTF-8\n" >+"Content-Transfer-Encoding: 8bit\n" >+"X-Generator: KBabel 1.3.1\n" >+"Plural-Forms: nplurals=2; plural=(n != 1);\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "An welchem TCP-Port soll BitlBee auf Verbindungen warten?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee lauscht normalerweise an dem üblichen IRC-Port 6667. Dies ist aber " >+"keine gute Idee, wenn Sie auÃerdem noch einen richtigen IRC-Dienst " >+"betreiben. Das Port 6668 ist eine gute Alternative. Wenn Sie keinen Wert " >+"eingeben, wird BitlBee nicht automatisch starten." >diff -urN bitlbee-1.2/debian/po/es.po bitlbee-1.2-jabberft/debian/po/es.po >--- bitlbee-1.2/debian/po/es.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/es.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,61 @@ >+# bitlbee po-debconf translation to Spanish >+# Copyright (C) 2005 Software in the Public Interest >+# This file is distributed under the same license as the bitlbee package. >+# >+# Changes: >+# - Initial translation >+# César Gómez MartÃn <cesar.gomez@gmail.com> >+# >+# >+# Traductores, si no conoce el formato PO, merece la pena leer la >+# documentación de gettext, especialmente las secciones dedicadas a este >+# formato, por ejemplo ejecutando: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# Equipo de traducción al español, por favor, lean antes de traducir >+# los siguientes documentos: >+# >+# - El proyecto de traducción de Debian al español >+# http://www.debian.org/intl/spanish/ >+# especialmente las notas de traducción en >+# http://www.debian.org/intl/spanish/notas >+# >+# - La guÃa de traducción de po's de debconf: >+# /usr/share/doc/po-debconf/README-trans >+# o http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2005-08-24 19:37+0100\n" >+"Last-Translator: César Gómez MartÃn <cesar.gomez@gmail.com>\n" >+"Language-Team: Debian l10n spanish <debian-l10n-spanish@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=utf-8\n" >+"Content-Transfer-Encoding: 8bit\n" >+"X-Poedit-Language: Spanish\n" >+"X-Poedit-Country: SPAIN\n" >+"X-Poedit-SourceCharset: utf-8\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "¿En qué puerto TCP quiere que BitlBee escuche conexiones?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee normalmente escucha en el puerto 6667, que se usa también para IRC. " >+"Por esta razón no es muy buena idea poner a BitlBee a escuchar en ese puerto " >+"si también se está ejecutando un demonio real de IRC, en este caso el puerto " >+"6668 puede ser una buena alternativa. Si deja este valor en blanco BitlBee " >+"no se ejecutará automáticamente." >diff -urN bitlbee-1.2/debian/po/fr.po bitlbee-1.2-jabberft/debian/po/fr.po >--- bitlbee-1.2/debian/po/fr.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/fr.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,44 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee (0.80-1)\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2003-08-07 08:45+0100\n" >+"Last-Translator: Christian Perrier <bubulle@debian.org>\n" >+"Language-Team: French <debian-l10n-french@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=iso-8859-15\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Sur quel port TCP BitlBee doit-il être à l'écoute ?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee est usuellement à l'écoute sur le port IRC standard : 6667. Cela " >+"n'est pas forcément un choix adapté si vous utilisez en même temps un vrai " >+"démon IRC. Dans ce cas, choisir 6668 est conseillé. Si vous ne souhaitez pas " >+"lancer BitlBee automatiquement, veuillez laissez ce champs vide." >diff -urN bitlbee-1.2/debian/po/it.po bitlbee-1.2-jabberft/debian/po/it.po >--- bitlbee-1.2/debian/po/it.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/it.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,36 @@ >+# Italian translation of the bitlbee debconf template >+# This file is distributed under the same license as the bitlbee package >+# Copyright (C) 2007 Free Software Foundation, Inc. >+# Luca Monducci <luca.mo@tiscali.it>, 2007. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2007-08-30 04:31+0200\n" >+"PO-Revision-Date: 2007-10-27 11:52+0200\n" >+"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n" >+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=UTF-8\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:1001 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Su quale porta TCP si deve mettere in ascolto BitlBee?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:1001 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"Normalmente BitlBee si mette in ascolto sulla consueta porta IRC, la 6667. " >+"Questa potrebbe non essere una buona idea se è in esecuzione anche un reale " >+"demone IRC. La porta 6668 potrebbe essere una valida alternativa. Lasciando " >+"vuoto questo valore BitlBee non viene avviato automaticamente." >diff -urN bitlbee-1.2/debian/po/ja.po bitlbee-1.2-jabberft/debian/po/ja.po >--- bitlbee-1.2/debian/po/ja.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/ja.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,45 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee 0.90a-2\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2004-09-11 13:30+0900\n" >+"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n" >+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=EUC-JP\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "BitlBee ¤Ï¡¢Àܳ¤Î¤¿¤á¤Ë¤É¤Î TCP ¥Ý¡¼¥È¤ò listen ¤·¤Þ¤¹¤«?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee ¤ÏÄ̾ï¤Î¾ì¹ç¡¢É¸½à¤Î IRC ¥Ý¡¼¥ÈÈÖ¹æ¤Ç¤¢¤ë 6667 ¤ò listen ¤·¤Þ¤¹¡£Æ±ÍÍ" >+"¤Ë¤·¤Æ¼ÂºÝ¤Î IRC ¥Ç¡¼¥â¥ó¤òÆ°ºî¤µ¤»¤Æ¤¤¤ë¾ì¹ç¡¢¤³¤ì¤Ï¤¢¤Þ¤êÎɤ¤¹Í¤¨¤Ç¤Ï̵¤¤¤«" >+"¤â¤·¤ì¤Þ¤»¤ó¡£Âå¤ï¤ê¤Ë 6668 ¤ò»È¤¦¤Î¤¬Îɤ¤¤«¤âÃΤì¤Þ¤»¤ó¡£¤³¤ì¤ò¶õ¤Î¤Þ¤Þ¤Ë¤·" >+"¤Æ¤ª¤±¤Ð¡¢BitlBee ¤Ï¼«Æ°Åª¤Ë¤Ïµ¯Æ°¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£" >diff -urN bitlbee-1.2/debian/po/nl.po bitlbee-1.2-jabberft/debian/po/nl.po >--- bitlbee-1.2/debian/po/nl.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/nl.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,44 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee (0.90a-2)\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2004-09-06 20:16+0200\n" >+"Last-Translator: Wilmer van der Gaast <wilmer@gaast.net>\n" >+"Language-Team: LANGUAGE <LL@li.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=ISO-8859-15\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Op welke TCP poort moet BitlBee draaien?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"Normaal 'luistert' BitlBee op de gebruikelijke IRC poort, 6667. Als je al " >+"een andere IRC daemon draait is dat onmogelijk. Kies dan bijvoorbeeld voor " >+"poort 6668. Als je niet wil dat BitlBee automatisch gestart wordt, vul hier " >+"dan niets in." >diff -urN bitlbee-1.2/debian/po/POTFILES.in bitlbee-1.2-jabberft/debian/po/POTFILES.in >--- bitlbee-1.2/debian/po/POTFILES.in 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/POTFILES.in 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1 @@ >+[type: gettext/rfc822deb] bitlbee.templates.master >diff -urN bitlbee-1.2/debian/po/pt_BR.po bitlbee-1.2-jabberft/debian/po/pt_BR.po >--- bitlbee-1.2/debian/po/pt_BR.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/pt_BR.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,44 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2005-02-26 16:14-0300\n" >+"Last-Translator: André Luís Lopes <andrelop@debian.org>\n" >+"Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=ISO-8859-1\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Em qual porta TCP o BitlBee deverá ouvir por conexões ?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"O BitlBee normalmente ouve na porta de IRC padrão, 6667. Porém, esta pode " >+"não ser uma boa idéia quando você está rodando um daemon IRC real também. " >+"6689 pode ser uma boa alternativa. Deixar esse valor em branco significa que " >+"o BitlBee não será executado automaticamente." >diff -urN bitlbee-1.2/debian/po/pt.po bitlbee-1.2-jabberft/debian/po/pt.po >--- bitlbee-1.2/debian/po/pt.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/pt.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,35 @@ >+# Portuguese translation of bitlbee's debconf messages. # This file is distributed under the same license as the bitlbee package. >+# 2006, Marco Ferra <mferra@debianpt.org> >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee 1.0.3-1.1\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2007-01-13 18:53+0100\n" >+"PO-Revision-Date: 2007-01-26 22:34+0000\n" >+"Last-Translator: Marco Ferra <mferra@debianpt.org>\n" >+"Language-Team: Portuguese <traduz@debianpt.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=UTF-8\n" >+"Content-Transfer-Encoding: 8bit" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:1001 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Em que porta TCP deverá o BitlBee escutar por conexões?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:1001 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"O BitlBee normalmente escuta na porta do IRC 6667. Isto poderá não ser " >+"uma ideia excelente quando está a correr um 'daemon' de IRC ao mesmo tempo. " >+"Nesse caso a porta 6668 poderá ser uma boa alternativa. Deixar este campo " >+"vazio significa que o BitlBee não irá correr automaticamente." >+ >diff -urN bitlbee-1.2/debian/po/sv.po bitlbee-1.2-jabberft/debian/po/sv.po >--- bitlbee-1.2/debian/po/sv.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/sv.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,43 @@ >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# Developers do not need to manually edit POT or PO files. >+# , fuzzy >+# >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee 0.92-2\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2005-10-03 23:18+0200\n" >+"Last-Translator: Daniel Nylander <po@danielnylander.se>\n" >+"Language-Team: Swedish <sv@li.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=iso-8859-1\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "På vilken TCP-port ska BitlBee lyssna på efter anslutningar?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >+"BitlBee lyssnar normalt på den standardporten för IRC, 6667. Detta kanske " >+"inte är en bra ide om du kör en riktig IRC-daemon på samma system. 6668 kan " >+"vara ett bra alternativ då. Lämnar du detta värde blankt betyder det att " >+"BitlBee inte kommer att startas automatiskt." >diff -urN bitlbee-1.2/debian/po/templates.pot bitlbee-1.2-jabberft/debian/po/templates.pot >--- bitlbee-1.2/debian/po/templates.pot 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/templates.pot 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,41 @@ >+# >+# Translators, if you are not familiar with the PO format, gettext >+# documentation is worth reading, especially sections dedicated to >+# this format, e.g. by running: >+# info -n '(gettext)PO Files' >+# info -n '(gettext)Header Entry' >+# >+# Some information specific to po-debconf are available at >+# /usr/share/doc/po-debconf/README-trans >+# or http://www.debian.org/intl/l10n/po-debconf/README-trans >+# >+# Developers do not need to manually edit POT or PO files. >+# >+#, fuzzy >+msgid "" >+msgstr "" >+"Project-Id-Version: PACKAGE VERSION\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" >+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" >+"Language-Team: LANGUAGE <LL@li.org>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=CHARSET\n" >+"Content-Transfer-Encoding: 8bit\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "" >diff -urN bitlbee-1.2/debian/po/vi.po bitlbee-1.2-jabberft/debian/po/vi.po >--- bitlbee-1.2/debian/po/vi.po 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/po/vi.po 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,32 @@ >+# Vietnamese translation for bitlbee. >+# Copyright © 2005 Free Software Foundation, Inc. >+# Clytie Siddall <clytie@riverland.net.au>, 2005. >+# >+msgid "" >+msgstr "" >+"Project-Id-Version: bitlbee 0.92-1\n" >+"Report-Msgid-Bugs-To: \n" >+"POT-Creation-Date: 2004-09-25 18:12+0200\n" >+"PO-Revision-Date: 2005-06-12 18:34+0930\n" >+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" >+"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n" >+"MIME-Version: 1.0\n" >+"Content-Type: text/plain; charset=utf-8\n" >+"Content-Transfer-Encoding: 8bit\n" >+"Plural-Forms: nplurals=1; plural=0\n" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "On what TCP port should BitlBee listen for connections?" >+msgstr "Trình BitlBee nên lắng nghe sá»± kết ná»i trên cá»ng TCP nà o?" >+ >+#. Type: string >+#. Description >+#: ../bitlbee.templates.master:4 >+msgid "" >+"BitlBee normally listens on the regular IRC port, 6667. This might not be a " >+"very good idea when you're running a real IRC daemon as well. 6668 might be " >+"a good alternative. Leaving this value blank means that BitlBee will not be " >+"run automatically." >+msgstr "Trình BitlBee thÆ°á»ng lắng nghe trên cá»ng IRC bình thÆ°á»ng, 6667. Có lẽ nó không phải là má»t ý kiến tá»t nếu bạn cÅ©ng có chạy má»t trình ná»n (dæmon) IRC tháºt. NhÆ° thế thì, cá»ng 6668 có thá» là má»t Äiá»u thay thế tá»t. Nếu bạn bá» giá trá» nà y rá»ng, thì trình BitlBee sẽ không tá»± Äá»ng chạy." >diff -urN bitlbee-1.2/debian/postinst bitlbee-1.2-jabberft/debian/postinst >--- bitlbee-1.2/debian/postinst 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/postinst 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,94 @@ >+#!/bin/sh -e >+ >+. /usr/share/debconf/confmodule >+ >+db_get bitlbee/serveport >+PORT="$RET" >+ >+CONFDIR=/var/lib/bitlbee/ >+ >+update-rc.d bitlbee defaults > /dev/null 2>&1 >+ >+## Load default option. Don't want to put this in debconf (yet?) >+BITLBEE_OPTS=-F >+BITLBEE_DISABLED=0 >+BITLBEE_UPGRADE_DONT_RESTART=0 >+[ -r /etc/default/bitlbee ] && . /etc/default/bitlbee >+ >+if [ "$BITLBEE_DISABLED" = "0" ] && type update-inetd > /dev/null 2> /dev/null && >+ ( expr "$2" : '0\..*' > /dev/null || expr "$2" : '1\.0\..*' > /dev/null ); then >+ ## Make sure the inetd entry is gone (can still be there from a >+ ## previous version. >+ update-inetd --remove '.*/usr/sbin/bitlbee' >+ if grep -q /usr/sbin/bitlbee /etc/inetd.conf 2> /dev/null; then >+ # Thanks for breaking update-inetd! (bugs.debian.org/311111) >+ # I hope that it works at least with xinetd, because this >+ # emergency hack doesn't: >+ perl -pi -e 's:^[^#].*/usr/sbin/bitlbee$:## Now using daemon mode\: # $&:' /etc/inetd.conf >+ killall -HUP inetd || true >+ fi >+fi >+ >+cat<<EOF>/etc/default/bitlbee >+## /etc/default/bitlbee: Auto-generated/updated script. >+## >+## Don't edit this line, use dpkg-reconfigure bitlbee >+BITLBEE_PORT="$PORT" >+ >+## Use single-process or forking daemon mode? Can't be changed from debconf, >+## but maintainer scripts will save your changes here. >+BITLBEE_OPTS="$BITLBEE_OPTS" >+ >+## In case you want to stick with inetd mode (or if you just want to disable >+## the init scripts for some other reason), you can disable the init script >+## here. (Just set it to 1) >+BITLBEE_DISABLED=$BITLBEE_DISABLED >+ >+## As a server operator, you can use the RESTART command to restart only the >+## master process while keeping all the child processes and their IPC >+## connections. By enabling this, the maintainer scripts won't restart >+## BitlBee during upgrades so you can restart the master process by hand. >+BITLBEE_UPGRADE_DONT_RESTART=$BITLBEE_UPGRADE_DONT_RESTART >+EOF >+ >+## Bye-bye DebConf, we don't need you anymore. >+db_stop >+ >+## Restore the helpfile in case we weren't upgrading but just reconfiguring: >+if [ -e /usr/share/bitlbee/help.upgrading ]; then >+ if [ -e /usr/share/bitlbee/help.txt ]; then >+ rm -f /usr/share/bitlbee/help.upgrading >+ else >+ mv /usr/share/bitlbee/help.upgrading /usr/share/bitlbee/help.txt >+ fi >+fi >+ >+if [ -n "$2" -a "$BITLBEE_UPGRADE_DONT_RESTART" != "1" ]; then >+ /etc/init.d/bitlbee restart >+fi >+ >+## If we're upgrading, we'll probably skip this next part >+if [ -d $CONFDIR ] && chown -R bitlbee $CONFDIR; then >+ echo 'BitlBee (probably) already installed, skipping user/configdir installation' >+ exit 0 >+fi >+ >+adduser --system --group --disabled-login --disabled-password --home /var/lib/bitlbee/ bitlbee >+chmod 700 /var/lib/bitlbee/ >+ >+## Can't do this in packaging phase: Don't know the UID yet. Access to >+## the file should be limited, now that it stores passwords. Added >+## --group later for a little more security, but have to see if I can >+## apply this change to existing installations on upgrades. Will think >+## about that later. >+if getent group bitlbee > /dev/null; then >+ chmod 640 /etc/bitlbee/bitlbee.conf >+ chown root:bitlbee /etc/bitlbee/bitlbee.conf >+else >+ chmod 600 /etc/bitlbee/bitlbee.conf >+ chown bitlbee /etc/bitlbee/bitlbee.conf >+fi >+ >+if [ -z "$2" ]; then >+ /etc/init.d/bitlbee start >+fi >diff -urN bitlbee-1.2/debian/postrm bitlbee-1.2-jabberft/debian/postrm >--- bitlbee-1.2/debian/postrm 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/postrm 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,14 @@ >+#!/bin/sh -e >+ >+[ "$1" = "purge" ] || exit 0 >+ >+if [ -e /usr/share/debconf/confmodule ]; then >+ . /usr/share/debconf/confmodule; >+ db_purge; >+fi >+ >+update-rc.d bitlbee remove > /dev/null 2>&1 || true >+rm -f /etc/default/bitlbee >+ >+deluser --system --remove-home bitlbee || true >+rm -rf /var/lib/bitlbee ## deluser doesn't seem to do this for homedirs in /var >diff -urN bitlbee-1.2/debian/prerm bitlbee-1.2-jabberft/debian/prerm >--- bitlbee-1.2/debian/prerm 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/prerm 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,13 @@ >+#!/bin/sh -e >+ >+if [ "$1" = "upgrade" ]; then >+ ## To prevent the help function from breaking in currently running >+ ## BitlBee processes. Have to do it like this because dpkg-reconfigure >+ ## looks a lot like an upgrade and we don't want to lose help.txt... >+ if [ -e /usr/share/bitlbee/help.txt ]; then >+ rm -f /usr/share/bitlbee/help.upgrading >+ mv /usr/share/bitlbee/help.txt /usr/share/bitlbee/help.upgrading >+ fi >+else >+ /etc/init.d/bitlbee stop || exit 0 >+fi >diff -urN bitlbee-1.2/debian/README.Debian bitlbee-1.2-jabberft/debian/README.Debian >--- bitlbee-1.2/debian/README.Debian 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/README.Debian 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,36 @@ >+ *** NEWS (Version 1.2 and later) *** >+ >+Starting from version 1.2, BitlBee has a forking daemon mode. The Debian >+package now uses this mode by default, instead of inetd mode. If you don't >+want to use this, you can disable the init scripts (best way to do this is >+by editing /etc/default/bitlbee) and restore the inetd.conf entry. This >+should be necessary only once, it won't be touched during upgrades. >+ >+Another important change in BitlBee 1.2 is the file format used for your >+personal settings. Everything's now saved in a single .xml (per account, >+of course) file instead of $nick.accounts and $nick.nicks. One advantage >+of this new format is that the passwords are actually encrypted instead of >+just vaguely obfuscated. BitlBee can still read the old files, and will >+save things in the new format when you save/disconnect. After that, you >+can safely remove the old-style files (this is recommended). >+ >+I tried making this transition (the new file format but especially, in this >+case, the inetd->forkdaemon mode change) as smooth as possible, but I'm >+aware that many BitlBee users will have their own hacks already to run the >+program. I hope the package won't break any of this for anyone. 1.2-2 >+should fix at least some of the issues. >+ >+--------------------------------------------------------------------------- >+ >+Debconf should have asked you on what port you want BitlBee to run. If it >+did not, the port number should be 6667 or 6668. (6668 if you already got >+something running at 6667) >+ >+Fire up your favourite IRC client and connect to localhost:6667 (or 6668), >+and read the documentation (type help for a list of commands). >+ >+Have fun! >+ >+The /usr/share/doc/bitlbee/examples/ directory contains some programs and >+scripts you might like or need. They're not really examples but it's quite >+normal behaviour to put small contrib stuff like that in there. >diff -urN bitlbee-1.2/debian/rules bitlbee-1.2-jabberft/debian/rules >--- bitlbee-1.2/debian/rules 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/rules 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,86 @@ >+#!/usr/bin/make -f >+ >+DEBUG ?= 0 >+ >+ifdef BITLBEE_VERSION >+BITLBEE_FORCE_VERSION=1 >+else >+# Want to use the full package version number instead of just the release. >+BITLBEE_VERSION ?= "$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')" >+export BITLBEE_VERSION >+endif >+ >+build-arch: build-arch-stamp >+build-arch-stamp: >+ if [ ! -d debian ]; then exit 1; fi >+ ./configure --debug=$(DEBUG) --prefix=/usr --etcdir=/etc/bitlbee --events=libevent >+ $(MAKE) >+# $(MAKE) -C doc/ all >+ touch build-arch-stamp >+ >+clean: >+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi >+ rm -rf build-arch-stamp debian/bitlbee debian/*.substvars debian/files >+ -$(MAKE) distclean >+# -$(MAKE) -C doc/ clean >+ >+ >+install-arch: build-arch >+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi >+ mkdir -p debian/bitlbee/DEBIAN/ >+ $(MAKE) install install-etc DESTDIR=`pwd`/debian/bitlbee >+ >+ mkdir -p debian/bitlbee/usr/share/doc/bitlbee/ >+ cp doc/user-guide/user-guide.txt debian/bitlbee/usr/share/doc/bitlbee/ >+ cp doc/user-guide/user-guide.html debian/bitlbee/usr/share/doc/bitlbee/ >+ >+binary-arch: build-arch install-arch >+ if [ "`whoami`" != "root" -o ! -d debian ]; then exit 1; fi >+ >+ chmod 755 debian/post* debian/pre* debian/config debian/bitlbee.init >+ >+ mkdir -p debian/bitlbee/usr/share/doc/bitlbee/examples/ debian/bitlbee/etc/init.d/ >+ -cp doc/RELEASE-SPEECH* debian/bitlbee/usr/share/doc/bitlbee/ && gzip -9 debian/bitlbee/usr/share/doc/bitlbee/RELEASE-SPEECH* >+ cp doc/CREDITS doc/AUTHORS doc/README doc/FAQ debian/README.Debian debian/bitlbee/usr/share/doc/bitlbee/ >+ cp debian/changelog debian/bitlbee/usr/share/doc/bitlbee/changelog.Debian >+ cp debian/copyright debian/bitlbee/usr/share/doc/bitlbee/copyright >+ cp doc/CHANGES debian/bitlbee/usr/share/doc/bitlbee/changelog >+ cp utils/* debian/bitlbee/usr/share/doc/bitlbee/examples/ >+ cp debian/bitlbee.init debian/bitlbee/etc/init.d/bitlbee >+ cd debian/bitlbee/usr/share/; \ >+ gzip -9 doc/bitlbee/changelog.Debian doc/bitlbee/changelog doc/bitlbee/user-guide.txt \ >+ doc/bitlbee/examples/* man/man8/bitlbee.8 man/man5/bitlbee.conf.5 >+ >+ chown -R root.root debian/bitlbee/ >+ find debian/bitlbee/usr/share/ -type d -exec chmod 755 {} \; >+ find debian/bitlbee/usr/share/ -type f -exec chmod 644 {} \; >+ >+ cp debian/prerm debian/bitlbee/DEBIAN/ >+ cp debian/postinst debian/bitlbee/DEBIAN/ >+ cp debian/postrm debian/bitlbee/DEBIAN/ >+ cp debian/config debian/bitlbee/DEBIAN/ >+ >+ po2debconf debian/templates > debian/bitlbee/DEBIAN/templates >+ cp debian/conffiles debian/bitlbee/DEBIAN/ >+ >+ if [ "$(DEBUG)" = "0" ]; then strip -R .comment -R .note debian/bitlbee/usr/sbin/bitlbee; fi >+ >+ cd debian/bitlbee; \ >+ find usr -type f -exec md5sum {} \; > DEBIAN/md5sums >+ dpkg-shlibdeps -Tdebian/bitlbee.substvars -dDepends debian/bitlbee/usr/sbin/bitlbee >+ifdef BITLBEE_FORCE_VERSION >+ dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -v1:$(BITLBEE_VERSION)-0 -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0' >+else >+ dpkg-gencontrol -ldebian/changelog -isp -pbitlbee -Tdebian/bitlbee.substvars -Pdebian/bitlbee -V'debconf-depends=debconf (>= 1.2.0) | debconf-2.0' >+endif >+ >+ dpkg --build debian/bitlbee .. >+ >+debug-build: >+ BITLBEE_VERSION=\"`date +%Y%m%d`-`hostname`-debug\" debian/rules clean binary DEBUG=1 >+ >+binary: binary-arch >+build: build-arch >+install: install-arch >+ >+.PHONY: build-arch build clean binary-arch binary install-arch install >diff -urN bitlbee-1.2/debian/templates bitlbee-1.2-jabberft/debian/templates >--- bitlbee-1.2/debian/templates 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/templates 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,8 @@ >+Template: bitlbee/serveport >+Type: string >+Default: stillhavetoask >+_Description: On what TCP port should BitlBee listen for connections? >+ BitlBee normally listens on the regular IRC port, 6667. This might not be >+ a very good idea when you're running a real IRC daemon as well. 6668 might >+ be a good alternative. Leaving this value blank means that BitlBee will not >+ be run automatically. >diff -urN bitlbee-1.2/debian/watch bitlbee-1.2-jabberft/debian/watch >--- bitlbee-1.2/debian/watch 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/debian/watch 2008-04-14 18:53:31.000000000 +0200 >@@ -0,0 +1,2 @@ >+version=2 >+http://get.bitlbee.org/src/bitlbee-(.*).tar.gz >diff -urN bitlbee-1.2/doc/CHANGES bitlbee-1.2-jabberft/doc/CHANGES >--- bitlbee-1.2/doc/CHANGES 2008-03-17 23:11:13.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/CHANGES 2008-04-14 18:53:31.000000000 +0200 >@@ -1,3 +1,17 @@ >+Version 1.2.1: >+- Fixed proxy support. >+- Fixed stalling issues while connecting to Jabber when using the OpenSSL >+ module. >+- Fixed problem with GLib and ForkDaemon where processes didn't die when >+ the client disconnects. >+- Fixed handling of "set charset none". (Which pretty much breaks the account >+ completely in 1.2.) >+- You can now automatically identify yourself to BitlBee by setting a server >+ password in your IRC client. >+- Compatible with all crazy kinds of line endings that clients can send. >+ >+Finished ... >+ > Version 1.2: > - Added ForkDaemon mode next to the existing Daemon- and inetd modes. With > ForkDaemon you can run BitlBee as a stand-alone daemon and every connection >diff -urN bitlbee-1.2/doc/RELEASE-SPEECH-1.2 bitlbee-1.2-jabberft/doc/RELEASE-SPEECH-1.2 >--- bitlbee-1.2/doc/RELEASE-SPEECH-1.2 2008-03-17 23:35:05.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/RELEASE-SPEECH-1.2 1970-01-01 01:00:00.000000000 +0100 >@@ -1,57 +0,0 @@ >-BitlBee ... is Bitl >-------------------- >- >-"I CAN HAS SPEEECH?" This is how Wilmer announced to me that he was going to do >-another BitlBee release. I was as surprised as you are. I thought he had given >-up on this whole releasing business. >- >-There is some humor in using a LOLcats reference to announce a new Bee >-release. The last major BitlBee release (1.0) was done a long time before the >-hype even begun. Between then and now we've celebrated BitlBee's fifth birthday >-and had a handful of releases, but nothing big happened. As a user this lax >-release planning worries me. What if this means that later releases will take >-even longer? I don't think we should fear this. Let us explore why this release >-took so long. >- >-Personally, I blame Google. >- >-There, I've said it. Google. The guys who are so big on "Do No Evil" and all >-that jazz. They caused this release to be so late. Let me explain why. >- >-They made Wilmer an offer. Wilmer, being the sillily naive guy he is, couldn't >-refuse. There were no decapitated horses involved, but he couldn't refuse >-nonetheless. That's not a big problem of course. Lots of guys (and gals, sure) >-work for Google. It wouldn't have become a problem if they hadn't shipped him of >-to Ireland. That's where the trouble starts. >- >-Ireland. Home of the leprechauns. These rascals joined forces with aliens and >-LOLcats to abduct Wilmer. The aliens had been trying for years to kidnap him, >-but they were on his turf and his trusty sidekicks Jelmer and Maurits were there >-to help him. All that changed when he moved to Ireland. >- >-But it wasn't just that Wilmer was all alone in some strange place. It was also >-that the aliens had created the LOLcats and made an alliance with the >-leprechauns--the real rulers of Ireland. Wilmer is cool, but he's not that >-cool. So they abducted him for a few years. When he finally came back, he >-regathered his mad coding skills and hacked a new release together. >- >-By now you're thinking, what has happened to Jelmer and Maurits? Well, they're >-still here and they worked on the Bee while Wilmer was absent. But, like open >-source, they are very Bitl--they're cool, but they're ready when they're >-ready. >- >-Well, whatever you may think of my little theory, they did take forever to >-launch this release. We're not mad at them, because it shows. They have >-added some cool new features and made plenty of changes under the hood. Let me >-give you a sneak preview of some of the new features: Jabber groupchats are >-supported. Configuration files are stored encrypted. You can now use >-ForkDaemon mode, which gives better stability over normal daemon mode, but >-doesn't require inetd. Also, server owners can now use the /OPER command to >-spy on their users. And--as I was specifically asked to mention--this is the >-first stable release that supports plugins. That's some Bitl changes for ya. >- >-BitlBee is cool, but ready when it's ready. Very Bitl. >- >-Sjoerd. LOL. >- >-(LOLBee by Erik Bosman.) >diff -urN bitlbee-1.2/doc/user-guide/commands.xml bitlbee-1.2-jabberft/doc/user-guide/commands.xml >--- bitlbee-1.2/doc/user-guide/commands.xml 2008-03-02 23:07:28.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/user-guide/commands.xml 2008-04-14 18:53:31.000000000 +0200 >@@ -588,6 +588,16 @@ > </description> > </bitlbee-setting> > >+ <bitlbee-setting name="root_nick" type="string" scope="global"> >+ <default>root</default> >+ >+ <description> >+ <para> >+ Normally the "bot" that takes all your BitlBee commands is called "root". If you don't like this name, you can rename it to anything else using the <emphasis>rename</emphasis> command, or by changing this setting. >+ </para> >+ </description> >+ </bitlbee-setting> >+ > <bitlbee-setting name="save_on_quit" type="boolean" scope="global"> > <default>true</default> > >@@ -863,4 +873,47 @@ > </ircexample> > > </bitlbee-command> >+ >+ <bitlbee-command name="transfers"> >+ <short-description>Monitor, cancel, or reject file transfers</short-description> >+ <syntax>transfers [<cancel> id | <reject>]</syntax> >+ >+ <description> >+ <para> >+ Without parameters the currently pending file transfers and their status will be listed. Available actions are <emphasis>cancel</emphasis> and <emphasis>reject</emphasis>. See <emphasis>help transfers <action></emphasis> for more information. >+ </para> >+ >+ <ircexample> >+ <ircline nick="ulim">transfers</ircline> >+ </ircexample> >+ </description> >+ >+ <bitlbee-command name="cancel"> >+ <short-description>Cancels the file transfer with the given id</short-description> >+ <syntax>transfers <cancel> id</syntax> >+ >+ <description> >+ <para>Cancels the file transfer with the given id</para> >+ </description> >+ >+ <ircexample> >+ <ircline nick="ulim">transfers cancel 1</ircline> >+ <ircline nick="root">Canceling file transfer for test</ircline> >+ </ircexample> >+ </bitlbee-command> >+ >+ <bitlbee-command name="reject"> >+ <short-description>Rejects all incoming transfers</short-description> >+ <syntax>transfers <reject></syntax> >+ >+ <description> >+ <para>Rejects all incoming (not already transferring) file transfers. Since you probably have only one incoming transfer at a time, no id is neccessary. Or is it?</para> >+ </description> >+ >+ <ircexample> >+ <ircline nick="ulim">transfers reject</ircline> >+ </ircexample> >+ </bitlbee-command> >+ </bitlbee-command> >+ > </chapter> >diff -urN bitlbee-1.2/doc/user-guide/help.txt bitlbee-1.2-jabberft/doc/user-guide/help.txt >--- bitlbee-1.2/doc/user-guide/help.txt 2008-03-17 23:36:16.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/user-guide/help.txt 2008-04-14 18:53:31.000000000 +0200 >@@ -121,6 +121,7 @@ > * blist - List all the buddies in your contact list > * nick - Change friendly name, nick > * join_chat - Join a named groupchat/conference room >+ * transfers - Monitor, cancel, or reject file transfers > % > ?account > Syntax: account <action> [<arguments>] >@@ -343,6 +344,30 @@ > Example: > <wilmer> join_chat jabber bitlbee@conference.bitlbee.org &bitlbee-help help-me > % >+?transfers >+Syntax: transfers [<cancel> id | <reject>] >+ >+Without parameters the currently pending file transfers and their status will be listed. Available actions are cancel and reject. See help transfers <action> for more information. >+ >+<ulim> transfers >+% >+?transfers cancel >+Syntax: transfers <cancel> id >+ >+Cancels the file transfer with the given id >+ >+Example: >+<ulim> transfers cancel 1 >+<root> Canceling file transfer for test >+% >+?transfers reject >+Syntax: transfers <reject> >+ >+Rejects all incoming (not already transferring) file transfers. Since you probably have only one incoming transfer at a time, no id is neccessary. Or is it? >+ >+Example: >+<ulim> transfers reject >+% > ?set auto_connect > Type: boolean > Scope: both >@@ -537,6 +562,13 @@ > > Normally it's set to priority which means messages will always be delivered to the buddy's resource with the highest priority. If the setting is set to time, messages will be delivered to the resource that was last used to send you a message (or the resource that most recently connected). > % >+?set root_nick >+Type: string >+Scope: global >+Default: root >+ >+Normally the "bot" that takes all your BitlBee commands is called "root". If you don't like this name, you can rename it to anything else using the rename command, or by changing this setting. >+% > ?set save_on_quit > Type: boolean > Scope: global >diff -urN bitlbee-1.2/doc/user-guide/user-guide.html bitlbee-1.2-jabberft/doc/user-guide/user-guide.html >--- bitlbee-1.2/doc/user-guide/user-guide.html 2008-03-17 23:36:15.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/user-guide/user-guide.html 2008-04-14 18:53:31.000000000 +0200 >@@ -1,19 +1,19 @@ >-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>BitlBee User Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="BitlBee-User-Guide"></a>BitlBee User Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="surname">Vernooij</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Wilmer</span> <span class="surname">van der Gaast</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Sjoerd</span> <span class="surname">Hemminga</span></h3></div></div><div><p class="releaseinfo"> >+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>BitlBee User Guide</title><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="book" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="BitlBee-User-Guide"></a>BitlBee User Guide</h1></div><div><div class="author"><h3 class="author"><span class="firstname">Jelmer</span> <span class="surname">Vernooij</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Wilmer</span> <span class="surname">van der Gaast</span></h3></div></div><div><div class="author"><h3 class="author"><span class="firstname">Sjoerd</span> <span class="surname">Hemminga</span></h3></div></div><div><p class="releaseinfo"> > This is the BitlBee User Guide. For now, the on-line help is > the most up-to-date documentation. Although this document shares > some parts with the on-line help system, other parts might be > very outdated. >- </p></div><div><div class="legalnotice"><a name="legalnotice"></a></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#Installation">1. Installation</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id281777">Downloading the package</a></span></dt><dt><span class="sect1"><a href="#id282165">Compiling</a></span></dt><dt><span class="sect1"><a href="#id281947">Configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Usage">2. Usage</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id282720">Connecting to the server</a></span></dt><dt><span class="sect1"><a href="#id282732">The &bitlbee control channel</a></span></dt><dt><span class="sect1"><a href="#id282769">Talking to people</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Support">3. Support</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id282811">Disclaimer</a></span></dt><dt><span class="sect1"><a href="#id282823">Support channels</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id282829">The World Wide Web</a></span></dt><dt><span class="sect2"><a href="#id323466">IRC</a></span></dt><dt><span class="sect2"><a href="#id323476">Mailinglists</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#quickstart">4. Quickstart</a></span></dt><dd><dl><dt><span class="sect1"><a href="#quickstart2">Add and Connect To your IM Account(s)</a></span></dt><dt><span class="sect1"><a href="#quickstart3">Managing Contact Lists: Rename</a></span></dt><dt><span class="sect1"><a href="#quickstart4">Step Four: Managing Contact Lists: Add and Remove.</a></span></dt><dt><span class="sect1"><a href="#quickstart5">Chatting</a></span></dt><dt><span class="sect1"><a href="#quickstart6">Further Resources</a></span></dt></dl></dd><dt><span class="chapter"><a href="#commands">5. Bitlbee commands</a></span></dt><dd><dl><dt><span class="sect1"><a href="#cmd_account">account - IM-account list maintenance</a></span></dt><dd><dl><dt><span class="sect2"><a href="#cmd_account_add">account add</a></span></dt><dt><span class="sect2"><a href="#cmd_account_del">account del</a></span></dt><dt><span class="sect2"><a href="#cmd_account_on">account on</a></span></dt><dt><span class="sect2"><a href="#cmd_account_off">account off</a></span></dt><dt><span class="sect2"><a href="#cmd_account_list">account list</a></span></dt><dt><span class="sect2"><a href="#cmd_account_set">account set</a></span></dt></dl></dd><dt><span class="sect1"><a href="#cmd_add">add - Add a buddy to your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_info">info - Request user information</a></span></dt><dt><span class="sect1"><a href="#cmd_remove">remove - Remove a buddy from your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_block">block - Block someone</a></span></dt><dt><span class="sect1"><a href="#cmd_allow">allow - Unblock someone</a></span></dt><dt><span class="sect1"><a href="#cmd_set">set - Miscellaneous settings</a></span></dt><dt><span class="sect1"><a href="#cmd_help">help - BitlBee help system</a></span></dt><dt><span class="sect1"><a href="#cmd_save">save - Save your account data</a></span></dt><dt><span class="sect1"><a href="#set_auto_connect">auto_connect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect">auto_reconnect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect_delay">auto_reconnect_delay</a></span></dt><dt><span class="sect1"><a href="#set_away_devoice">away_devoice</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer">buddy_sendbuffer</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer_delay">buddy_sendbuffer_delay</a></span></dt><dt><span class="sect1"><a href="#set_charset">charset</a></span></dt><dt><span class="sect1"><a href="#set_debug">debug</a></span></dt><dt><span class="sect1"><a href="#set_default_target">default_target</a></span></dt><dt><span class="sect1"><a href="#set_display_name">display_name</a></span></dt><dt><span class="sect1"><a href="#set_display_namechanges">display_namechanges</a></span></dt><dt><span class="sect1"><a href="#set_handle_unknown">handle_unknown</a></span></dt><dt><span class="sect1"><a href="#set_lcnicks">lcnicks</a></span></dt><dt><span class="sect1"><a href="#set_mail_notifications">mail_notifications</a></span></dt><dt><span class="sect1"><a href="#set_ops">ops</a></span></dt><dt><span class="sect1"><a href="#set_password">password</a></span></dt><dt><span class="sect1"><a href="#set_port">port</a></span></dt><dt><span class="sect1"><a href="#set_priority">priority</a></span></dt><dt><span class="sect1"><a href="#set_private">private</a></span></dt><dt><span class="sect1"><a href="#set_query_order">query_order</a></span></dt><dt><span class="sect1"><a href="#set_resource">resource</a></span></dt><dt><span class="sect1"><a href="#set_resource_select">resource_select</a></span></dt><dt><span class="sect1"><a href="#set_save_on_quit">save_on_quit</a></span></dt><dt><span class="sect1"><a href="#set_server">server</a></span></dt><dt><span class="sect1"><a href="#set_simulate_netsplit">simulate_netsplit</a></span></dt><dt><span class="sect1"><a href="#set_ssl">ssl</a></span></dt><dt><span class="sect1"><a href="#set_strip_html">strip_html</a></span></dt><dt><span class="sect1"><a href="#set_tls">tls</a></span></dt><dt><span class="sect1"><a href="#set_to_char">to_char</a></span></dt><dt><span class="sect1"><a href="#set_typing_notice">typing_notice</a></span></dt><dt><span class="sect1"><a href="#set_web_aware">web_aware</a></span></dt><dt><span class="sect1"><a href="#set_xmlconsole">xmlconsole</a></span></dt><dt><span class="sect1"><a href="#cmd_rename">rename - Rename (renick) a buddy</a></span></dt><dt><span class="sect1"><a href="#cmd_yes">yes - Accept a request</a></span></dt><dt><span class="sect1"><a href="#cmd_no">no - Deny a request</a></span></dt><dt><span class="sect1"><a href="#cmd_qlist">qlist - List all the unanswered questions root asked</a></span></dt><dt><span class="sect1"><a href="#cmd_register">register - Register yourself</a></span></dt><dt><span class="sect1"><a href="#cmd_identify">identify - Identify yourself with your password</a></span></dt><dt><span class="sect1"><a href="#cmd_drop">drop - Drop your account</a></span></dt><dt><span class="sect1"><a href="#cmd_blist">blist - List all the buddies in your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_nick">nick - Change friendly name, nick</a></span></dt><dt><span class="sect1"><a href="#cmd_join_chat">join_chat - Join a named groupchat/conference room</a></span></dt></dl></dd><dt><span class="chapter"><a href="#misc">6. Misc Stuff</a></span></dt><dd><dl><dt><span class="sect1"><a href="#smileys">Smileys</a></span></dt><dt><span class="sect1"><a href="#groupchats">Groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats2">Creating groupchats</a></span></dt><dt><span class="sect1"><a href="#away">Away states</a></span></dt></dl></dd></dl></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Installation"></a>Chapter 1. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id281777">Downloading the package</a></span></dt><dt><span class="sect1"><a href="#id282165">Compiling</a></span></dt><dt><span class="sect1"><a href="#id281947">Configuration</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id281777"></a>Downloading the package</h2></div></div></div><p> >-The latest BitlBee release is always available from <a class="ulink" href="http://www.bitlbee.org/" target="_top">http://www.bitlbee.org/</a>. >-Download the package with your favorite program and unpack it: <span class="command"><strong>tar >+ </p></div><div><div class="legalnotice"><a name="legalnotice"></a></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="chapter"><a href="#Installation">1. Installation</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id267726">Downloading the package</a></span></dt><dt><span class="sect1"><a href="#id267749">Compiling</a></span></dt><dt><span class="sect1"><a href="#id267216">Configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Usage">2. Usage</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id267313">Connecting to the server</a></span></dt><dt><span class="sect1"><a href="#id267325">The &bitlbee control channel</a></span></dt><dt><span class="sect1"><a href="#id267362">Talking to people</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Support">3. Support</a></span></dt><dd><dl><dt><span class="sect1"><a href="#id267405">BitlBee is beta software</a></span></dt><dt><span class="sect1"><a href="#id267417">Support channels</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id307828">The World Wide Web</a></span></dt><dt><span class="sect2"><a href="#id307843">IRC</a></span></dt><dt><span class="sect2"><a href="#id307853">Mailinglists</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="#quickstart">4. Quickstart</a></span></dt><dd><dl><dt><span class="sect1"><a href="#quickstart2">Add and Connect To your IM Account(s)</a></span></dt><dt><span class="sect1"><a href="#quickstart3">Managing Contact Lists: Rename</a></span></dt><dt><span class="sect1"><a href="#quickstart4">Step Four: Managing Contact Lists: Add and Remove.</a></span></dt><dt><span class="sect1"><a href="#quickstart5">Chatting</a></span></dt><dt><span class="sect1"><a href="#quickstart6">Further Resources</a></span></dt></dl></dd><dt><span class="chapter"><a href="#commands">5. Bitlbee commands</a></span></dt><dd><dl><dt><span class="sect1"><a href="#cmd_account">account - IM-account list maintenance</a></span></dt><dd><dl><dt><span class="sect2"><a href="#cmd_account_add">account add</a></span></dt><dt><span class="sect2"><a href="#cmd_account_del">account del</a></span></dt><dt><span class="sect2"><a href="#cmd_account_on">account on</a></span></dt><dt><span class="sect2"><a href="#cmd_account_off">account off</a></span></dt><dt><span class="sect2"><a href="#cmd_account_list">account list</a></span></dt><dt><span class="sect2"><a href="#cmd_account_set">account set</a></span></dt></dl></dd><dt><span class="sect1"><a href="#cmd_add">add - Add a buddy to your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_info">info - Request user information</a></span></dt><dt><span class="sect1"><a href="#cmd_remove">remove - Remove a buddy from your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_block">block - Block someone</a></span></dt><dt><span class="sect1"><a href="#cmd_allow">allow - Unblock someone</a></span></dt><dt><span class="sect1"><a href="#cmd_set">set - Miscellaneous settings</a></span></dt><dt><span class="sect1"><a href="#cmd_help">help - BitlBee help system</a></span></dt><dt><span class="sect1"><a href="#cmd_save">save - Save your account data</a></span></dt><dt><span class="sect1"><a href="#set_auto_connect">auto_connect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect">auto_reconnect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect_delay">auto_reconnect_delay</a></span></dt><dt><span class="sect1"><a href="#set_away_devoice">away_devoice</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer">buddy_sendbuffer</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer_delay">buddy_sendbuffer_delay</a></span></dt><dt><span class="sect1"><a href="#set_charset">charset</a></span></dt><dt><span class="sect1"><a href="#set_debug">debug</a></span></dt><dt><span class="sect1"><a href="#set_default_target">default_target</a></span></dt><dt><span class="sect1"><a href="#set_display_name">display_name</a></span></dt><dt><span class="sect1"><a href="#set_display_namechanges">display_namechanges</a></span></dt><dt><span class="sect1"><a href="#set_handle_unknown">handle_unknown</a></span></dt><dt><span class="sect1"><a href="#set_lcnicks">lcnicks</a></span></dt><dt><span class="sect1"><a href="#set_ops">ops</a></span></dt><dt><span class="sect1"><a href="#set_password">password</a></span></dt><dt><span class="sect1"><a href="#set_port">port</a></span></dt><dt><span class="sect1"><a href="#set_priority">priority</a></span></dt><dt><span class="sect1"><a href="#set_private">private</a></span></dt><dt><span class="sect1"><a href="#set_query_order">query_order</a></span></dt><dt><span class="sect1"><a href="#set_resource">resource</a></span></dt><dt><span class="sect1"><a href="#set_resource_select">resource_select</a></span></dt><dt><span class="sect1"><a href="#set_save_on_quit">save_on_quit</a></span></dt><dt><span class="sect1"><a href="#set_server">server</a></span></dt><dt><span class="sect1"><a href="#set_simulate_netsplit">simulate_netsplit</a></span></dt><dt><span class="sect1"><a href="#set_ssl">ssl</a></span></dt><dt><span class="sect1"><a href="#set_strip_html">strip_html</a></span></dt><dt><span class="sect1"><a href="#set_tls">tls</a></span></dt><dt><span class="sect1"><a href="#set_to_char">to_char</a></span></dt><dt><span class="sect1"><a href="#set_typing_notice">typing_notice</a></span></dt><dt><span class="sect1"><a href="#set_web_aware">web_aware</a></span></dt><dt><span class="sect1"><a href="#set_xmlconsole">xmlconsole</a></span></dt><dt><span class="sect1"><a href="#cmd_rename">rename - Rename (renick) a buddy</a></span></dt><dt><span class="sect1"><a href="#cmd_yes">yes - Accept a request</a></span></dt><dt><span class="sect1"><a href="#cmd_no">no - Deny a request</a></span></dt><dt><span class="sect1"><a href="#cmd_qlist">qlist - List all the unanswered questions root asked</a></span></dt><dt><span class="sect1"><a href="#cmd_register">register - Register yourself</a></span></dt><dt><span class="sect1"><a href="#cmd_identify">identify - Identify yourself with your password</a></span></dt><dt><span class="sect1"><a href="#cmd_drop">drop - Drop your account</a></span></dt><dt><span class="sect1"><a href="#cmd_blist">blist - List all the buddies in your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_nick">nick - Change friendly name, nick</a></span></dt><dt><span class="sect1"><a href="#cmd_join_chat">join_chat - Join a named groupchat/conference room</a></span></dt></dl></dd><dt><span class="chapter"><a href="#misc">6. Misc Stuff</a></span></dt><dd><dl><dt><span class="sect1"><a href="#smileys">Smileys</a></span></dt><dt><span class="sect1"><a href="#groupchats">Groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats2">Creating groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats3">Groupchat channel names</a></span></dt><dt><span class="sect1"><a href="#away">Away states</a></span></dt></dl></dd></dl></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Installation"></a>Chapter 1. Installation</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id267726">Downloading the package</a></span></dt><dt><span class="sect1"><a href="#id267749">Compiling</a></span></dt><dt><span class="sect1"><a href="#id267216">Configuration</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267726"></a>Downloading the package</h2></div></div></div><p> >+The latest BitlBee release is always available from <a href="http://www.bitlbee.org/" target="_top">http://www.bitlbee.org/</a>. >+Download the package with your favorite program and unpack it: <span><strong class="command">tar > xvfz bitlbee-<version>.tar.gz</strong></span> where <version> is to be > replaced by the version number of the BitlBee you downloaded (e.g. 0.91). >-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282165"></a>Compiling</h2></div></div></div><p> >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267749"></a>Compiling</h2></div></div></div><p> > BitlBee's build system has to be configured before compiling. The > <code class="filename">configure</code> script will do this for you. Just run > it, it'll set up with nice and hopefully well-working defaults. If you > want to change some settings, just try >-<span class="command"><strong>./configure --help</strong></span> and see what you can do. >+<span><strong class="command">./configure --help</strong></span> and see what you can do. > </p><p>Some variables that might be of interest to the normal user:</p><div class="itemizedlist"><ul type="disc"><li><p>prefix, bindir, etcdir, mandir, datadir - The place where > all the BitlBee program files will be put. There's usually no reason to > specify them all separately, just specifying prefix (or keeping the default >@@ -38,9 +38,9 @@ > If you want BitlBee to use OpenSSL, you have to explicitly specify that. > </p></li></ul></div><p> > After running <code class="filename">configure</code>, you should run >-<span class="command"><strong>make</strong></span>. After that, run <span class="command"><strong>make install</strong></span> as >+<span><strong class="command">make</strong></span>. After that, run <span><strong class="command">make install</strong></span> as > root. >-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id281947"></a>Configuration</h2></div></div></div><p> >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267216"></a>Configuration</h2></div></div></div><p> > By default, BitlBee runs as the user nobody. You might want > to run it as a seperate user (some computers run named or apache as nobody). > </p><p> >@@ -51,28 +51,28 @@ > </pre><p> > </p><p> > Inetd has to be restarted after changing the configuration. Either >-<span class="command"><strong>killall -HUP inetd</strong></span> or >-<span class="command"><strong>/etc/init.d/inetd restart</strong></span> should do the job on most systems. >+<span><strong class="command">killall -HUP inetd</strong></span> or >+<span><strong class="command">/etc/init.d/inetd restart</strong></span> should do the job on most systems. > </p><p> > You might be one of the.. ehr, lucky people running an xinetd-powered distro. >-<span class="command"><strong>xinetd</strong></span> is quite different and they seem to be proud of that.. ;-) >-Anyway, if you want BitlBee to work with <span class="command"><strong>xinetd</strong></span>, just copy the >+<span><strong class="command">xinetd</strong></span> is quite different and they seem to be proud of that.. ;-) >+Anyway, if you want BitlBee to work with <span><strong class="command">xinetd</strong></span>, just copy the > bitlbee.xinetd file to your /etc/xinetd.d/ directory (and probably edit it to suit > your needs). > </p><p> > You should create a directory where BitlBee can store it's data files. This > should be the directory named after the value 'CONFIG' in Makefile.settings. > The default is <code class="filename">/var/lib/bitlbee</code>, which can be created >-with the command <span class="command"><strong>mkdir -p /var/lib/bitlbee</strong></span>. This >+with the command <span><strong class="command">mkdir -p /var/lib/bitlbee</strong></span>. This > directory has to be owned by the user that runs bitlbee. To make >-'nobody' owner of this directory, run <span class="command"><strong>chown nobody /var/lib/bitlbee</strong></span>. >+'nobody' owner of this directory, run <span><strong class="command">chown nobody /var/lib/bitlbee</strong></span>. > Because things like passwords are saved in this directory, it's probably > a good idea to make this directory owner-read-/writable only. >-</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Usage"></a>Chapter 2. Usage</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id282720">Connecting to the server</a></span></dt><dt><span class="sect1"><a href="#id282732">The &bitlbee control channel</a></span></dt><dt><span class="sect1"><a href="#id282769">Talking to people</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282720"></a>Connecting to the server</h2></div></div></div><p> >+</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Usage"></a>Chapter 2. Usage</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id267313">Connecting to the server</a></span></dt><dt><span class="sect1"><a href="#id267325">The &bitlbee control channel</a></span></dt><dt><span class="sect1"><a href="#id267362">Talking to people</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267313"></a>Connecting to the server</h2></div></div></div><p> > Since BitlBee acts just like any other irc daemon, you can connect to > it with your favorite irc client. Launch it and connect to localhost port 6667 > (or whatever host/port you are running bitlbee on). >-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282732"></a>The &bitlbee control channel</h2></div></div></div><p> >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267325"></a>The &bitlbee control channel</h2></div></div></div><p> > Once you are connected to the BitlBee server, you are automatically joined > to &bitlbee on that server. This channel acts like the 'buddy list' you have > on the various other chat networks. >@@ -88,24 +88,23 @@ > the BitlBee control channel is local to one server (and in fact, to one person), > this name seems more suitable. Also, with this name, it's harder to confuse > the control channel with the #bitlbee channel on OFTC. >-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282769"></a>Talking to people</h2></div></div></div><p> >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267362"></a>Talking to people</h2></div></div></div><p> > You can talk to by starting a query with them. In most irc clients, >-this can be done with either <span class="command"><strong>/msg <nick> <text></strong></span> >-or <span class="command"><strong>/query <nick></strong></span>. >+this can be done with either <span><strong class="command">/msg <nick> <text></strong></span> >+or <span><strong class="command">/query <nick></strong></span>. > </p><p> > To keep the number of open query windows limited, you can also talk to people >-in the control channel, like <span class="command"><strong><nick>: <text></strong></span>. >-</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Support"></a>Chapter 3. Support</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id282811">Disclaimer</a></span></dt><dt><span class="sect1"><a href="#id282823">Support channels</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id282829">The World Wide Web</a></span></dt><dt><span class="sect2"><a href="#id323466">IRC</a></span></dt><dt><span class="sect2"><a href="#id323476">Mailinglists</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282811"></a>Disclaimer</h2></div></div></div><p> >-BitlBee doesn't come with a warranty and is still (and will probably always >-be) under development. That means it can crash at any time, corrupt your >-data or whatever. Don't use it in any production environment and don't rely >-on it, or at least don't blame us if things blow up. :-) >-</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id282823"></a>Support channels</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id282829"></a>The World Wide Web</h3></div></div></div><p><a class="ulink" href="http://www.bitlbee.org/" target="_top">http://www.bitlbee.org/</a> >+in the control channel, like <span><strong class="command"><nick>: <text></strong></span>. >+</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="Support"></a>Chapter 3. Support</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id267405">BitlBee is beta software</a></span></dt><dt><span class="sect1"><a href="#id267417">Support channels</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id307828">The World Wide Web</a></span></dt><dt><span class="sect2"><a href="#id307843">IRC</a></span></dt><dt><span class="sect2"><a href="#id307853">Mailinglists</a></span></dt></dl></dd></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267405"></a>BitlBee is beta software</h2></div></div></div><p> >+Although BitlBee has quite some functionality it is still beta. That means it >+can crash at any time, corrupt your data or whatever. Don't use it in >+any production environment and don't rely on it. >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id267417"></a>Support channels</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id307828"></a>The World Wide Web</h3></div></div></div><p><a href="http://www.bitlbee.org/" target="_top">http://www.bitlbee.org/</a> > is the homepage of bitlbee and contains the most recent news on bitlbee and > the latest releases. >-</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id323466"></a>IRC</h3></div></div></div><p> >+</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id307843"></a>IRC</h3></div></div></div><p> > BitlBee is discussed on #bitlbee on the OFTC IRC network (server: irc.oftc.net). >-</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id323476"></a>Mailinglists</h3></div></div></div><p> >+</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id307853"></a>Mailinglists</h3></div></div></div><p> > BitlBee doesn't have any mailinglists. > </p></div></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="quickstart"></a>Chapter 4. Quickstart</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#quickstart2">Add and Connect To your IM Account(s)</a></span></dt><dt><span class="sect1"><a href="#quickstart3">Managing Contact Lists: Rename</a></span></dt><dt><span class="sect1"><a href="#quickstart4">Step Four: Managing Contact Lists: Add and Remove.</a></span></dt><dt><span class="sect1"><a href="#quickstart5">Chatting</a></span></dt><dt><span class="sect1"><a href="#quickstart6">Further Resources</a></span></dt></dl></div><p> > Welcome to BitlBee, your IRC gateway to ICQ, MSN, AOL, Jabber and Yahoo Instant Messaging Systems. >@@ -122,19 +121,19 @@ > </p><p> > To add an account to the account list you will need to use the <span class="emphasis"><em>account add</em></span> command: <span class="emphasis"><em>account add <protocol> <username> <password> [<server>]</em></span>. > </p><p> >-For instance, suppose you have a Jabber account at jabber.org with handle <span class="emphasis"><em>bitlbee@jabber.org</em></span> with password <span class="emphasis"><em>QuickStart</em></span>, you would: >-</p><pre class="screen"><code class="prompt">< you> </code><strong class="userinput"><code>account add jabber bitlbee@jabber.org QuickStart</code></strong> >+For instance, suppose you have an ICQ account with UIN <span class="emphasis"><em>72696705</em></span> with password <span class="emphasis"><em>QuickStart</em></span>, you would: >+</p><pre class="screen"><code class="prompt">< you> </code><strong class="userinput"><code>account add oscar 72696705 QuickStart login.icq.com</code></strong> > <code class="prompt">< root> </code><strong class="userinput"><code>Account successfully added</code></strong> > </pre><p> >-Other available IM protocols are msn, oscar, and yahoo. OSCAR is the protocol used by ICQ and AOL. For more information about the <span class="emphasis"><em>account add</em></span> command, see <span class="emphasis"><em>help account add</em></span>. >+Other available IM protocols are jabber, msn, and yahoo. Oscar is the protocol used by ICQ and AOL. For oscar, you need to specify the IM-server as a fourth argument (for msn and yahoo there is no fourth argument). For AOL Instant Messenger, the server name is <span class="emphasis"><em>login.oscar.aol.com</em></span>. For ICQ, the server name is <span class="emphasis"><em>login.icq.com</em></span>. > </p><p> > When you are finished adding your account(s) use the <span class="emphasis"><em>account on</em></span> command to enable all your accounts, type <span class="emphasis"><em>help quickstart3</em></span> to continue. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickstart3"></a>Managing Contact Lists: Rename</h2></div></div></div><p> > <span class="emphasis"><em>Step Three: Managing Contact Lists: Rename</em></span> > </p><p> >-Now BitlBee logs in and downloads the contact list from the IM server. In a few seconds, all your on-line buddies should show up in the control channel. >+For most protocols (currently MSN, Jabber, Yahoo and AOL) BitlBee can download the contact list automatically from the IM server and all the on-line users should appear in the control channel when you log in. > </p><p> >-BitlBee will convert names into IRC-friendly form (for instance: tux@example.com will be given the nickname tux). If you have more than one person who would have the same name by this logic (for instance: tux@example.com and tux@bitlbee.org) the second one to log on will be tux_. The same is true if you have a tux log on to AOL and a tux log on from Yahoo. >+BitlBee will convert names into irc-friendly form (for instance: tux@example.com will be given the nickname tux). If you have more than one person who would have the same name by this logic (for instance: tux@example.com and tux@bitlbee.org) the second one to log on will be tux_. The same is true if you have a tux log on to AOL and a tux log on from Yahoo. > </p><p> > It would be easy to get these two mixed up, so BitlBee has a <span class="emphasis"><em>rename</em></span> command to change the nickname into something more suitable: <span class="emphasis"><em>rename <oldnick> <newnick></em></span></p><pre class="screen"><code class="prompt">< you> </code><strong class="userinput"><code>rename tux_ bitlbeetux</code></strong> > * tux_ is now known as bitlbeetux >@@ -158,9 +157,7 @@ > </p><pre class="screen"><code class="prompt">< you> </code><strong class="userinput"><code>tux: hey, how's the weather down there?</code></strong> > <code class="prompt">< tux> </code><strong class="userinput"><code>you: a bit chilly!</code></strong> > </pre><p> >-Note that, although all contacts are in the &bitlbee channel, only tux will actually receive this message. The &bitlbee channel shouldn't be confused with a real IRC channel. >-</p><p> >-If you prefer chatting in a separate window, use the <span class="emphasis"><em>/msg</em></span> or <span class="emphasis"><em>/query</em></span> command, just like on real IRC. BitlBee will remember how you talk to someone and show his/her responses the same way. If you want to change the default behaviour (for people you haven't talked to yet), see <span class="emphasis"><em>help set private</em></span>. >+If you'd rather chat with them in a separate window use the <span class="emphasis"><em>/msg</em></span> or <span class="emphasis"><em>/query</em></span> command, just like you would for a private message in IRC. If you want to have messages automatically come up in private messages rather than in the &bitlbee channel, use the <span class="emphasis"><em>set private</em></span> command: <span class="emphasis"><em>set private true</em></span> (<span class="emphasis"><em>set private false</em></span> to change back). > </p><p> > You know the basics. If you want to get to know more about BitlBee, please type <span class="emphasis"><em>help quickstart6</em></span>. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="quickstart6"></a>Further Resources</h2></div></div></div><p> >@@ -171,18 +168,18 @@ > For more subjects (like groupchats and away states), please type <span class="emphasis"><em>help index</em></span>. > </p><p> > If you're still looking for something, please visit us in #bitlbee on the OFTC network (you can connect via irc.bitlbee.org), or mail us your problem/suggestion. Good luck and enjoy the Bee! >-</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="commands"></a>Chapter 5. Bitlbee commands</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#cmd_account">account - IM-account list maintenance</a></span></dt><dd><dl><dt><span class="sect2"><a href="#cmd_account_add">account add</a></span></dt><dt><span class="sect2"><a href="#cmd_account_del">account del</a></span></dt><dt><span class="sect2"><a href="#cmd_account_on">account on</a></span></dt><dt><span class="sect2"><a href="#cmd_account_off">account off</a></span></dt><dt><span class="sect2"><a href="#cmd_account_list">account list</a></span></dt><dt><span class="sect2"><a href="#cmd_account_set">account set</a></span></dt></dl></dd><dt><span class="sect1"><a href="#cmd_add">add - Add a buddy to your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_info">info - Request user information</a></span></dt><dt><span class="sect1"><a href="#cmd_remove">remove - Remove a buddy from your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_block">block - Block someone</a></span></dt><dt><span class="sect1"><a href="#cmd_allow">allow - Unblock someone</a></span></dt><dt><span class="sect1"><a href="#cmd_set">set - Miscellaneous settings</a></span></dt><dt><span class="sect1"><a href="#cmd_help">help - BitlBee help system</a></span></dt><dt><span class="sect1"><a href="#cmd_save">save - Save your account data</a></span></dt><dt><span class="sect1"><a href="#set_auto_connect">auto_connect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect">auto_reconnect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect_delay">auto_reconnect_delay</a></span></dt><dt><span class="sect1"><a href="#set_away_devoice">away_devoice</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer">buddy_sendbuffer</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer_delay">buddy_sendbuffer_delay</a></span></dt><dt><span class="sect1"><a href="#set_charset">charset</a></span></dt><dt><span class="sect1"><a href="#set_debug">debug</a></span></dt><dt><span class="sect1"><a href="#set_default_target">default_target</a></span></dt><dt><span class="sect1"><a href="#set_display_name">display_name</a></span></dt><dt><span class="sect1"><a href="#set_display_namechanges">display_namechanges</a></span></dt><dt><span class="sect1"><a href="#set_handle_unknown">handle_unknown</a></span></dt><dt><span class="sect1"><a href="#set_lcnicks">lcnicks</a></span></dt><dt><span class="sect1"><a href="#set_mail_notifications">mail_notifications</a></span></dt><dt><span class="sect1"><a href="#set_ops">ops</a></span></dt><dt><span class="sect1"><a href="#set_password">password</a></span></dt><dt><span class="sect1"><a href="#set_port">port</a></span></dt><dt><span class="sect1"><a href="#set_priority">priority</a></span></dt><dt><span class="sect1"><a href="#set_private">private</a></span></dt><dt><span class="sect1"><a href="#set_query_order">query_order</a></span></dt><dt><span class="sect1"><a href="#set_resource">resource</a></span></dt><dt><span class="sect1"><a href="#set_resource_select">resource_select</a></span></dt><dt><span class="sect1"><a href="#set_save_on_quit">save_on_quit</a></span></dt><dt><span class="sect1"><a href="#set_server">server</a></span></dt><dt><span class="sect1"><a href="#set_simulate_netsplit">simulate_netsplit</a></span></dt><dt><span class="sect1"><a href="#set_ssl">ssl</a></span></dt><dt><span class="sect1"><a href="#set_strip_html">strip_html</a></span></dt><dt><span class="sect1"><a href="#set_tls">tls</a></span></dt><dt><span class="sect1"><a href="#set_to_char">to_char</a></span></dt><dt><span class="sect1"><a href="#set_typing_notice">typing_notice</a></span></dt><dt><span class="sect1"><a href="#set_web_aware">web_aware</a></span></dt><dt><span class="sect1"><a href="#set_xmlconsole">xmlconsole</a></span></dt><dt><span class="sect1"><a href="#cmd_rename">rename - Rename (renick) a buddy</a></span></dt><dt><span class="sect1"><a href="#cmd_yes">yes - Accept a request</a></span></dt><dt><span class="sect1"><a href="#cmd_no">no - Deny a request</a></span></dt><dt><span class="sect1"><a href="#cmd_qlist">qlist - List all the unanswered questions root asked</a></span></dt><dt><span class="sect1"><a href="#cmd_register">register - Register yourself</a></span></dt><dt><span class="sect1"><a href="#cmd_identify">identify - Identify yourself with your password</a></span></dt><dt><span class="sect1"><a href="#cmd_drop">drop - Drop your account</a></span></dt><dt><span class="sect1"><a href="#cmd_blist">blist - List all the buddies in your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_nick">nick - Change friendly name, nick</a></span></dt><dt><span class="sect1"><a href="#cmd_join_chat">join_chat - Join a named groupchat/conference room</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmd_account"></a>account - IM-account list maintenance</h2></div></div></div><p><b>Syntax: </b> >+</p></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="commands"></a>Chapter 5. Bitlbee commands</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#cmd_account">account - IM-account list maintenance</a></span></dt><dd><dl><dt><span class="sect2"><a href="#cmd_account_add">account add</a></span></dt><dt><span class="sect2"><a href="#cmd_account_del">account del</a></span></dt><dt><span class="sect2"><a href="#cmd_account_on">account on</a></span></dt><dt><span class="sect2"><a href="#cmd_account_off">account off</a></span></dt><dt><span class="sect2"><a href="#cmd_account_list">account list</a></span></dt><dt><span class="sect2"><a href="#cmd_account_set">account set</a></span></dt></dl></dd><dt><span class="sect1"><a href="#cmd_add">add - Add a buddy to your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_info">info - Request user information</a></span></dt><dt><span class="sect1"><a href="#cmd_remove">remove - Remove a buddy from your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_block">block - Block someone</a></span></dt><dt><span class="sect1"><a href="#cmd_allow">allow - Unblock someone</a></span></dt><dt><span class="sect1"><a href="#cmd_set">set - Miscellaneous settings</a></span></dt><dt><span class="sect1"><a href="#cmd_help">help - BitlBee help system</a></span></dt><dt><span class="sect1"><a href="#cmd_save">save - Save your account data</a></span></dt><dt><span class="sect1"><a href="#set_auto_connect">auto_connect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect">auto_reconnect</a></span></dt><dt><span class="sect1"><a href="#set_auto_reconnect_delay">auto_reconnect_delay</a></span></dt><dt><span class="sect1"><a href="#set_away_devoice">away_devoice</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer">buddy_sendbuffer</a></span></dt><dt><span class="sect1"><a href="#set_buddy_sendbuffer_delay">buddy_sendbuffer_delay</a></span></dt><dt><span class="sect1"><a href="#set_charset">charset</a></span></dt><dt><span class="sect1"><a href="#set_debug">debug</a></span></dt><dt><span class="sect1"><a href="#set_default_target">default_target</a></span></dt><dt><span class="sect1"><a href="#set_display_name">display_name</a></span></dt><dt><span class="sect1"><a href="#set_display_namechanges">display_namechanges</a></span></dt><dt><span class="sect1"><a href="#set_handle_unknown">handle_unknown</a></span></dt><dt><span class="sect1"><a href="#set_lcnicks">lcnicks</a></span></dt><dt><span class="sect1"><a href="#set_ops">ops</a></span></dt><dt><span class="sect1"><a href="#set_password">password</a></span></dt><dt><span class="sect1"><a href="#set_port">port</a></span></dt><dt><span class="sect1"><a href="#set_priority">priority</a></span></dt><dt><span class="sect1"><a href="#set_private">private</a></span></dt><dt><span class="sect1"><a href="#set_query_order">query_order</a></span></dt><dt><span class="sect1"><a href="#set_resource">resource</a></span></dt><dt><span class="sect1"><a href="#set_resource_select">resource_select</a></span></dt><dt><span class="sect1"><a href="#set_save_on_quit">save_on_quit</a></span></dt><dt><span class="sect1"><a href="#set_server">server</a></span></dt><dt><span class="sect1"><a href="#set_simulate_netsplit">simulate_netsplit</a></span></dt><dt><span class="sect1"><a href="#set_ssl">ssl</a></span></dt><dt><span class="sect1"><a href="#set_strip_html">strip_html</a></span></dt><dt><span class="sect1"><a href="#set_tls">tls</a></span></dt><dt><span class="sect1"><a href="#set_to_char">to_char</a></span></dt><dt><span class="sect1"><a href="#set_typing_notice">typing_notice</a></span></dt><dt><span class="sect1"><a href="#set_web_aware">web_aware</a></span></dt><dt><span class="sect1"><a href="#set_xmlconsole">xmlconsole</a></span></dt><dt><span class="sect1"><a href="#cmd_rename">rename - Rename (renick) a buddy</a></span></dt><dt><span class="sect1"><a href="#cmd_yes">yes - Accept a request</a></span></dt><dt><span class="sect1"><a href="#cmd_no">no - Deny a request</a></span></dt><dt><span class="sect1"><a href="#cmd_qlist">qlist - List all the unanswered questions root asked</a></span></dt><dt><span class="sect1"><a href="#cmd_register">register - Register yourself</a></span></dt><dt><span class="sect1"><a href="#cmd_identify">identify - Identify yourself with your password</a></span></dt><dt><span class="sect1"><a href="#cmd_drop">drop - Drop your account</a></span></dt><dt><span class="sect1"><a href="#cmd_blist">blist - List all the buddies in your contact list</a></span></dt><dt><span class="sect1"><a href="#cmd_nick">nick - Change friendly name, nick</a></span></dt><dt><span class="sect1"><a href="#cmd_join_chat">join_chat - Join a named groupchat/conference room</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmd_account"></a>account - IM-account list maintenance</h2></div></div></div><p><b>Syntax: </b> > </p><pre class="programlisting">account <action> [<arguments>] > </pre><p> > </p><p> > Available actions: add, del, list, on, off and set. See <span class="emphasis"><em>help account <action></em></span> for more information. > </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cmd_account_add"></a>account add</h3></div></div></div><p><b>Syntax: </b> >- </p><pre class="programlisting">account add <protocol> <username> <password> >+ </p><pre class="programlisting">account add <protocol> <username> <password> [<server>] > </pre><p> > </p><p> > Adds an account on the given server with the specified protocol, username and password to the account list. Supported protocols right now are: Jabber, MSN, OSCAR (AIM/ICQ) and Yahoo. For more information about adding an account, see <span class="emphasis"><em>help account add <protocol></em></span>. > </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cmd_account_add_jabber"></a>account add jabber</h3></div></div></div><p><b>Syntax: </b> >- </p><pre class="programlisting">account add jabber <handle@server.tld> <password> >+ </p><pre class="programlisting">account add jabber <handle@server.tld> <password> [<servertag>] > </pre><p> > </p><p> > The handle should be a full handle, including the domain name. You can specify a servername if necessary. Normally BitlBee doesn't need this though, since it's able to find out the server by doing DNS SRV lookups. >@@ -194,11 +191,11 @@ > </p><p> > For MSN connections there are no special arguments. > </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cmd_account_add_oscar"></a>account add oscar</h3></div></div></div><p><b>Syntax: </b> >- </p><pre class="programlisting">account add oscar <handle> <password> >+ </p><pre class="programlisting">account add oscar <handle> <password> [<servername>] > </pre><p> > </p><p> >- OSCAR is the protocol used to connect to AIM and/or ICQ. The servers will automatically detect if you're using a numeric or non-numeric username so there's no need to tell which network you want to connect to. >- </p><pre class="screen"><code class="prompt">< wilmer> </code><strong class="userinput"><code>account add oscar 72696705 hobbelmeeuw</code></strong> >+ Specifying a server is required for OSCAR, since OSCAR can be used for both ICQ- and AIM-connections. Although these days it's supposed to be possible to connect to ICQ via AIM-servers and vice versa, we like to stick with this separation for now. For ICQ connections, the servername is <span class="emphasis"><em>login.icq.com</em></span>, for AIM connections it's <span class="emphasis"><em>login.oscar.aol.com</em></span>. >+ </p><pre class="screen"><code class="prompt">< wilmer> </code><strong class="userinput"><code>account add oscar 72696705 hobbelmeeuw login.icq.com</code></strong> > <code class="prompt">< root> </code><strong class="userinput"><code>Account successfully added</code></strong> > </pre></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="cmd_account_add_yahoo"></a>account add yahoo</h3></div></div></div><p><b>Syntax: </b> > </p><pre class="programlisting">account add yahoo <handle> <password> >@@ -250,7 +247,9 @@ > </p><p> > Adds the given buddy at the specified connection to your buddy list. The account ID can be a number (see <span class="emphasis"><em>account list</em></span>), the protocol name or (part of) the screenname, as long as it matches only one connection. > </p><p> >- If you want, you can also tell BitlBee what nick to give the new contact. The -tmp option adds the buddy to the internal BitlBee structures only, not to the real contact list (like done by <span class="emphasis"><em>set handle_unknown add</em></span>). This allows you to talk to people who are not in your contact list. This normally won't show you any presence notifications. >+ If you want, you can also tell BitlBee what nick to give the new contact. Of course you can also use the <span class="emphasis"><em>rename</em></span> command for that, but sometimes this might be more convenient. >+ </p><p> >+ Adding -tmp adds the buddy to the internal BitlBee structures only, not to the real contact list (like done by <span class="emphasis"><em>set handle_unknown add</em></span>). This allows you to talk to people who are not in your contact list. > </p><pre class="screen"><code class="prompt">< ctrlsoft> </code><strong class="userinput"><code>add 3 gryp@jabber.org grijp</code></strong> > * grijp has joined &bitlbee > </pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmd_info"></a>info - Request user information</h2></div></div></div><p><b>Syntax: </b> >@@ -333,9 +332,9 @@ > </p><p> > See also the <span class="emphasis"><em>buddy_sendbuffer</em></span> setting. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_charset"></a>charset</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: string</td></tr></table><p> >- This setting tells BitlBee what your IRC client sends and expects. It should be equal to the charset setting of your IRC client if you want to be able to send and receive non-ASCII text properly. >+ The charset setting enables you to use different character sets in BitlBee. These get converted to UTF-8 before sending and from UTF-8 when receiving. > </p><p> >- Most systems use UTF-8 these days. On older systems, an iso8859 charset may work better. For example, iso8859-1 is the best choice for most Western countries. You can try to find what works best for you on http://www.unicodecharacter.com/charsets/iso8859.html >+ If you don't know what's the best value for this, at least iso8859-1 is the best choice for most Western countries. You can try to find what works best for you on http://czyborra.com/charsets/iso8859.html > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_debug"></a>debug</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> > Some debugging messages can be sent to the control channel if you wish. They're probably not really useful for you, unless you're doing some development on BitlBee. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_default_target"></a>default_target</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: string</td></tr></table><p> >@@ -350,8 +349,6 @@ > If you want this lame user to be added automatically, you can set this setting to "add". If you prefer to ignore messages from people you don't know, you can set this one to "ignore". "add_private" and "add_channel" are like add, but you can use them to make messages from unknown buddies appear in the channel instead of a query window. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_lcnicks"></a>lcnicks</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> > Hereby you can change whether you want all lower case nick names or leave the case as it intended by your peer. >- </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_mail_notifications"></a>mail_notifications</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> >- Some protocols (MSN, Yahoo!) can notify via IM about new e-mail. Since most people use their Hotmail/Yahoo! addresses as a spam-box, this is disabled default. If you want these notifications, you can enable this setting. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_ops"></a>ops</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: string</td></tr></table><p> > Some people prefer themself and root to have operator status in &bitlbee, other people don't. You can change these states using this setting. > </p><p> >@@ -385,7 +382,7 @@ > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_save_on_quit"></a>save_on_quit</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> > If enabled causes BitlBee to save all current settings and account details when user disconnects. This is enabled by default, and these days there's not really a reason to have it disabled anymore. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_server"></a>server</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: string</td></tr></table><p> >- Can be set for Jabber- and OSCAR-connections. For Jabber, you might have to set this if the servername isn't equal to the part after the @ in the Jabber handle. For OSCAR this shouldn't be necessary anymore in recent BitlBee versions. >+ Can be set for Jabber- and OSCAR-connections. For OSCAR, this must be set to <span class="emphasis"><em>login.icq.com</em></span> if it's an ICQ connection, or <span class="emphasis"><em>login.oscar.aol.com</em></span> if it's an AIM connection. For Jabber, you have to set this if the servername isn't equal to the part after the @ in the Jabber handle. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_simulate_netsplit"></a>simulate_netsplit</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> > Some IRC clients parse quit messages sent by the IRC server to see if someone really left or just disappeared because of a netsplit. By default, BitlBee tries to simulate netsplit-like quit messages to keep the control channel window clean. If you don't like this (or if your IRC client doesn't support this) you can disable this setting. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_ssl"></a>ssl</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> >@@ -403,7 +400,7 @@ > </p><p> > Please note that this setting is only used for incoming messages. For outgoing messages you can use ':' (colon) or ',' to separate the destination nick from the message, and this is not configurable. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_typing_notice"></a>typing_notice</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: boolean</td></tr></table><p> >- Sends you a /notice when a user starts typing a message (if supported by the IM protocol and the user's client). To use this, you most likely want to use a script in your IRC client to show this information in a more sensible way. >+ Sends you a /notice when a user starts typing a message (if the protocol supports it, MSN for example). This is a bug, not a feature. (But please don't report it.. ;-) You don't want to use it. Really. In fact the typing-notification is just one of the least useful 'innovations' ever. It's just there because some guy will probably ask me about it anyway. ;-) > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="set_web_aware"></a>web_aware</h2></div></div></div><table class="simplelist" border="0" summary="Simple list"><tr><td>Type: string</td></tr></table><p> > ICQ allows people to see if you're on-line via a CGI-script. (http://status.icq.com/online.gif?icq=UIN) This can be nice to put on your website, but it seems that spammers also use it to see if you're online without having to add you to their contact list. So to prevent ICQ spamming, recent versions of BitlBee disable this feature by default. > </p><p> >@@ -466,12 +463,14 @@ > You can get a better readable buddy list using the <span class="emphasis"><em>blist</em></span> command. If you want a complete list (including the offline users) you can use the <span class="emphasis"><em>all</em></span> argument. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmd_nick"></a>nick - Change friendly name, nick</h2></div></div></div><p><b>Syntax: </b> > </p><pre class="programlisting">nick <connection> [<new nick>] >-nick <connection> >+nick > </pre><p> > </p><p> >- Deprecated: Use the per-account <span class="emphasis"><em>display_name</em></span> setting to read and change this information. >- </p><pre class="screen"><code class="prompt">< wouter> </code><strong class="userinput"><code>account set 1/display_name "The majestik møøse"</code></strong> >-<code class="prompt">< root> </code><strong class="userinput"><code>display_name = `The majestik møøse'</code></strong> >+ This command allows to set the friendly name of an im account. If no new name is specified the command will report the current name. When the name contains spaces, don't forget to quote the whole nick in double quotes. Currently this command is only supported by the MSN protocol. >+ </p><p> >+ It is recommended to use the per-account <span class="emphasis"><em>display_name</em></span> setting to read and change this information. The <span class="emphasis"><em>nick</em></span> command is deprecated. >+ </p><pre class="screen"><code class="prompt">< wouter> </code><strong class="userinput"><code>nick 1 "Wouter Paesen"</code></strong> >+<code class="prompt">< root> </code><strong class="userinput"><code>Setting your name on connection 1 to `Wouter Paesen'</code></strong> > </pre></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="cmd_join_chat"></a>join_chat - Join a named groupchat/conference room</h2></div></div></div><p><b>Syntax: </b> > </p><pre class="programlisting">join_chat <connection> <room name> [<channel name>] [<room nickname>] [<password>] > </pre><p> >@@ -482,26 +481,34 @@ > </p><p> > The following command will join you to the chatroom called <span class="emphasis"><em>bitlbee@conference.bitlbee.org</em></span>. The channel will be called <span class="emphasis"><em>&bitlbee-help</em></span> because <span class="emphasis"><em>&bitlbee</em></span> will already be in use. Your nickname will be <span class="emphasis"><em>help-me</em></span>. > </p><pre class="screen"><code class="prompt">< wilmer> </code><strong class="userinput"><code>join_chat jabber bitlbee@conference.bitlbee.org &bitlbee-help help-me</code></strong> >-</pre></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="misc"></a>Chapter 6. Misc Stuff</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#smileys">Smileys</a></span></dt><dt><span class="sect1"><a href="#groupchats">Groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats2">Creating groupchats</a></span></dt><dt><span class="sect1"><a href="#away">Away states</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="smileys"></a>Smileys</h2></div></div></div><p> >+</pre></div></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="misc"></a>Chapter 6. Misc Stuff</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#smileys">Smileys</a></span></dt><dt><span class="sect1"><a href="#groupchats">Groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats2">Creating groupchats</a></span></dt><dt><span class="sect1"><a href="#groupchats3">Groupchat channel names</a></span></dt><dt><span class="sect1"><a href="#away">Away states</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="smileys"></a>Smileys</h2></div></div></div><p> > All MSN smileys (except one) are case insensitive and work without the nose too. >-</p><div class="variablelist"><dl><dt><span class="term">(Y)</span></dt><dd><p>Thumbs up</p></dd><dt><span class="term">(N)</span></dt><dd><p>Thumbs down</p></dd><dt><span class="term">(B)</span></dt><dd><p>Beer mug</p></dd><dt><span class="term">(D)</span></dt><dd><p>Martini glass</p></dd><dt><span class="term">(X)</span></dt><dd><p>Girl</p></dd><dt><span class="term">(Z)</span></dt><dd><p>Boy</p></dd><dt><span class="term">(6)</span></dt><dd><p>Devil smiley</p></dd><dt><span class="term">:-[</span></dt><dd><p>Vampire bat</p></dd><dt><span class="term">(})</span></dt><dd><p>Right hug</p></dd><dt><span class="term">({)</span></dt><dd><p>Left hug</p></dd><dt><span class="term">(M)</span></dt><dd><p>MSN Messenger or Windows Messenger icon (think a BitlBee logo here ;)</p></dd><dt><span class="term">:-S</span></dt><dd><p>Crooked smiley (Confused smiley)</p></dd><dt><span class="term">:-$</span></dt><dd><p>Embarrassed smiley</p></dd><dt><span class="term">(H)</span></dt><dd><p>Smiley with sunglasses</p></dd><dt><span class="term">:-@</span></dt><dd><p>Angry smiley</p></dd><dt><span class="term">(A)</span></dt><dd><p>Angel smiley</p></dd><dt><span class="term">(L)</span></dt><dd><p>Red heart (Love)</p></dd><dt><span class="term">(U)</span></dt><dd><p>Broken heart</p></dd><dt><span class="term">(K)</span></dt><dd><p>Red lips (Kiss)</p></dd><dt><span class="term">(G)</span></dt><dd><p>Gift with bow</p></dd><dt><span class="term">(F)</span></dt><dd><p>Red rose</p></dd><dt><span class="term">(W)</span></dt><dd><p>Wilted rose</p></dd><dt><span class="term">(P)</span></dt><dd><p>Camera</p></dd><dt><span class="term">(~)</span></dt><dd><p>Film strip</p></dd><dt><span class="term">(T)</span></dt><dd><p>Telephone receiver</p></dd><dt><span class="term">(@)</span></dt><dd><p>Cat face</p></dd><dt><span class="term">(&)</span></dt><dd><p>Dog's head</p></dd><dt><span class="term">(C)</span></dt><dd><p>Coffee cup</p></dd><dt><span class="term">(I)</span></dt><dd><p>Light bulb</p></dd><dt><span class="term">(S)</span></dt><dd><p>Half-moon (Case sensitive!)</p></dd><dt><span class="term">(*)</span></dt><dd><p>Star</p></dd><dt><span class="term">(8)</span></dt><dd><p>Musical eighth note</p></dd><dt><span class="term">(E)</span></dt><dd><p>Envelope</p></dd><dt><span class="term">(^)</span></dt><dd><p>Birthday cake</p></dd><dt><span class="term">(O)</span></dt><dd><p>Clock</p></dd></dl></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="groupchats"></a>Groupchats</h2></div></div></div><p> >-BitlBee now supports groupchats on all IM networks. This text will try to explain you how they work. >+</p><div class="variablelist"><dl><dt><span class="term">(Y)</span></dt><dd><p>Thumbs up</p></dd><dt><span class="term">(N)</span></dt><dd><p>Thumbs down</p></dd><dt><span class="term">(B)</span></dt><dd><p>Beer mug</p></dd><dt><span class="term">(D)</span></dt><dd><p>Martini glass</p></dd><dt><span class="term">(X)</span></dt><dd><p>Girl</p></dd><dt><span class="term">(Z)</span></dt><dd><p>Boy</p></dd><dt><span class="term">(6)</span></dt><dd><p>Devil smiley</p></dd><dt><span class="term">:-[</span></dt><dd><p>Vampire bat</p></dd><dt><span class="term">(})</span></dt><dd><p>Right hug</p></dd><dt><span class="term">({)</span></dt><dd><p>Left hug</p></dd><dt><span class="term">(M)</span></dt><dd><p>MSN Messenger or Windows Messenger icon (think a BitlBee logo here ;)</p></dd><dt><span class="term">:-S</span></dt><dd><p>Crooked smiley (Confused smiley)</p></dd><dt><span class="term">:-$</span></dt><dd><p>Embarrassed smiley</p></dd><dt><span class="term">(H)</span></dt><dd><p>Smiley with sunglasses</p></dd><dt><span class="term">:-@</span></dt><dd><p>Angry smiley</p></dd><dt><span class="term">(A)</span></dt><dd><p>Angel smiley</p></dd><dt><span class="term">(L)</span></dt><dd><p>Red heart (Love)</p></dd><dt><span class="term">(U)</span></dt><dd><p>Broken heart</p></dd><dt><span class="term">(K)</span></dt><dd><p>Red lips (Kiss)</p></dd><dt><span class="term">(G)</span></dt><dd><p>Gift with bow</p></dd><dt><span class="term">(F)</span></dt><dd><p>Red rose</p></dd><dt><span class="term">(W)</span></dt><dd><p>Wilted rose</p></dd><dt><span class="term">(P)</span></dt><dd><p>Camera</p></dd><dt><span class="term">(~)</span></dt><dd><p>Film strip</p></dd><dt><span class="term">(T)</span></dt><dd><p>Telephone receiver</p></dd><dt><span class="term">(@)</span></dt><dd><p>Cat face</p></dd><dt><span class="term">(&)</span></dt><dd><p>Dog's head</p></dd><dt><span class="term">(C)</span></dt><dd><p>Coffee cup</p></dd><dt><span class="term">(I)</span></dt><dd><p>Light bulb</p></dd><dt><span class="term">(S)</span></dt><dd><p>Half-moon (Case sensitive!)</p></dd><dt><span class="term">(*)</span></dt><dd><p>Star</p></dd><dt><span class="term">(8)</span></dt><dd><p>Musical eighth note</p></dd><dt><span class="term">(E)</span></dt><dd><p>Envelope</p></dd><dt><span class="term">(^)</span></dt><dd><p>Birthday cake</p></dd><dt><span class="term">(O)</span></dt><dd><p>Clock</p></dd></dl></div><p> >+This list was extracted from <a href="http://help.msn.com/!data/en_us/data/messengerv50.its51/%24content%24/EMOTICONS.HTM?H_APP=" target="_top">http://help.msn.com/!data/en_us/data/messengerv50.its51/$content$/EMOTICONS.HTM?H_APP=</a>. >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="groupchats"></a>Groupchats</h2></div></div></div><p> >+Since version 0.8x, BitlBee supports groupchats on the MSN and Yahoo! networks. This text will try to explain you how they work. > </p><p> > As soon as someone invites you into a groupchat, you will be force-joined or invited (depending on the protocol) into a new virtual channel with all the people in there. You can leave the channel at any time, just like you would close the window in regular IM clients. Please note that root-commands don't work in groupchat channels, they only work in the control channel (or to root directly). > </p><p> > Of course you can also create your own groupchats. Type <span class="emphasis"><em>help groupchats2</em></span> to see how. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="groupchats2"></a>Creating groupchats</h2></div></div></div><p> >-If you want to start a groupchat with the person <span class="emphasis"><em>lisa_msn</em></span> in it, just join the channel <span class="emphasis"><em>#lisa_msn</em></span>. BitlBee will refuse to join you to the channel with that name, but it will create a new virtual channel with root, you and lisa_msn in it. >+If you want to start a groupchat with the person <span class="emphasis"><em>jim_msn</em></span> in it, just join the channel <span class="emphasis"><em>#jim_msn</em></span>. BitlBee will refuse to join you to the channel with that name, but it will create a new virtual channel with root, you and jim_msn in it. > </p><p> > Of course a channel with only two people isn't really exciting yet. So the next step is to invite some other people to the channel. For this, you can use the <span class="emphasis"><em>/invite</em></span> command of your IRC client. Please do keep in mind that all the people have to be on the same network and contact list! You can't invite Yahoo! buddies into an MSN groupchat. > </p><p> > Some protocols (like Jabber) also support named groupchats. BitlBee now supports these too. You can use the <span class="emphasis"><em>join_chat</em></span> command to join them. See <span class="emphasis"><em>help join_chat</em></span> for more information. >+</p><p> >+This is all you'll probably need to know. If you have any problems, please read <span class="emphasis"><em>help groupchats3</em></span>. >+</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="groupchats3"></a>Groupchat channel names</h2></div></div></div><p> >+Obviously the (numbered) channel names don't make a lot of sense. Problem is that groupchats usually don't have names at all in the IM-world, while IRC insists on a name. So BitlBee just generates something random, just don't pay attention to it. :-) >+</p><p> >+Please also note that BitlBee doesn't support groupchats for all protocols yet. BitlBee will tell you so. Support for other protocols will hopefully come later. > </p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="away"></a>Away states</h2></div></div></div><p> > As you might've expected, you can just use the <span class="emphasis"><em>/away</em></span> command in your IRC client to set an away-state. BitlBee supports most away-states supported by the protocols. > </p><p> > Not all away states are supported by all protocols, and some protocols have different names for them. BitlBee will try to pick the best available alias from this list for every connection: >-</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Away from computer, Away, Extended away</td></tr><tr><td>NA, N/A, Not available</td></tr><tr><td>Busy, Do not disturb, DND, Occupied</td></tr><tr><td>Be right back, BRB</td></tr><tr><td>On the phone, Phone, On phone</td></tr><tr><td>Out to lunch, Lunch, Food</td></tr><tr><td>Invisible, Hidden</td></tr></table><p> >+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Away from computer, Away, Extended away</td></tr><tr><td>NA, N/A, Not available</td></tr><tr><td>Busy, Do not disturb, DND, Occupied</td></tr><tr><td>Be right back, BRB</td></tr><tr><td>On the phone, Phone, On phone</td></tr><tr><td>Out to lunch, Lunch, Food</td></tr></table><p> > So <span class="emphasis"><em>/away Food</em></span> will set your state to "Out to lunch" on your MSN connection, and for most other connections the default, "Away" or "Away from computer" will be chosen. > </p><p> >-You can also add more information to your away message. Setting it to "Busy - Fixing BitlBee bugs" will set your IM-away-states to Busy, but your away message will be more descriptive for people on IRC. Most IM-protocols can also show this additional information to your buddies. >+You can also add more information to your away message. Setting it to "Busy - Fixing BitlBee bugs" will set your IM-away-states to Busy, but your away message will be more descriptive for people on IRC. Protocols like Yahoo! and Jabber will also show this complete away message to your buddies. > </p></div></div></div></body></html> >diff -urN bitlbee-1.2/doc/user-guide/user-guide.txt bitlbee-1.2-jabberft/doc/user-guide/user-guide.txt >--- bitlbee-1.2/doc/user-guide/user-guide.txt 2008-03-17 23:36:14.000000000 +0100 >+++ bitlbee-1.2-jabberft/doc/user-guide/user-guide.txt 2008-04-14 18:53:31.000000000 +0200 >@@ -1,442 +1,1408 @@ >+BitlBee User Guide >+ > Jelmer Vernooij >-jelmer@samba.org >+ > Wilmer van der Gaast >-wilmer@gaast.net >+ > Sjoerd Hemminga >-sjoerd@huiswerkservice.nl >+ > This is the BitlBee User Guide. For now, the on-line help is the most > up-to-date documentation. Although this document shares some parts with the >-on-line help system, other parts might be very outdated. The latest BitlBee >-release is always available from http://www.bitlbee.org/. Download the package >-with your favorite program and unpack it: tar xvfz bitlbee-<version>.tar.gz >-where <version> is to be replaced by the version number of the BitlBee you >-downloaded (e.g. 0.91). BitlBee's build system has to be configured before >-compiling. The configure script will do this for you. Just run it, it'll set up >-with nice and hopefully well-working defaults. If you want to change some >-settings, just try ./configure --help and see what you can do. Some variables >-that might be of interest to the normal user: prefix, bindir, etcdir, mandir, >-datadir - The place where all the BitlBee program files will be put. There's >-usually no reason to specify them all separately, just specifying prefix (or >-keeping the default /usr/local/) should be okay. config - The place where >-BitlBee will save all the per-user settings and buddy information. /var/lib/ >-bitlbee/ is the default value. msn, jabber, oscar, yahoo - By default, support >-for all these IM-protocols (OSCAR is the protocol used by both ICQ and AIM) >-will be compiled in. To make the binary a bit smaller, you can use these >-options to leave out support for protocols you're not planning to use. debug - >-Generate an unoptimized binary with debugging symbols, mainly useful if you >-want to do some debugging or help us to track down a problem. strip - By >-default, unnecessary parts of the generated binary will be stripped out to make >-it as small as possible. If you don't want this (because it might cause >-problems on some platforms), set this to 0. flood - To secure your BitlBee >-server against flooding attacks, you can use this option. It's not compiled in >-by default because it needs more testing first. ssl - The MSN and Jabber >-modules require an SSL library for some of their tasks. BitlBee can use three >-different SSL libraries: GnuTLS, mozilla-nss and OpenSSL. (OpenSSL is, however, >-a bit troublesome because of licensing issues, so don't forget to read the >-information configure will give you when you try to use OpenSSL!) By default, >-configure will try to detect GnuTLS or mozilla-nss. If none of them can be >-found, it'll give up. If you want BitlBee to use OpenSSL, you have to >-explicitly specify that. After running configure, you should run make. After >-that, run make install as root. By default, BitlBee runs as the user nobody. >-You might want to run it as a seperate user (some computers run named or apache >-as nobody). Since BitlBee uses inetd, you should add the following line to /etc >-/inetd.conf: 6667 stream tcp nowait nobody /usr/local/sbin/bitlbee bitlbee >+on-line help system, other parts might be very outdated. >+ >+âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ >+ >+Table of Contents >+ >+1. Installation >+ >+ Downloading the package >+ Compiling >+ Configuration >+ >+2. Usage >+ >+ Connecting to the server >+ The &bitlbee control channel >+ Talking to people >+ >+3. Support >+ >+ BitlBee is beta software >+ Support channels >+ >+ The World Wide Web >+ IRC >+ Mailinglists >+ >+4. Quickstart >+ >+ Add and Connect To your IM Account(s) >+ Managing Contact Lists: Rename >+ Step Four: Managing Contact Lists: Add and Remove. >+ Chatting >+ Further Resources >+ >+5. Bitlbee commands >+ >+ account - IM-account list maintenance >+ >+ account add >+ account del >+ account on >+ account off >+ account list >+ account set >+ >+ add - Add a buddy to your contact list >+ info - Request user information >+ remove - Remove a buddy from your contact list >+ block - Block someone >+ allow - Unblock someone >+ set - Miscellaneous settings >+ help - BitlBee help system >+ save - Save your account data >+ auto_connect >+ auto_reconnect >+ auto_reconnect_delay >+ away_devoice >+ buddy_sendbuffer >+ buddy_sendbuffer_delay >+ charset >+ debug >+ default_target >+ display_name >+ display_namechanges >+ handle_unknown >+ lcnicks >+ ops >+ password >+ port >+ priority >+ private >+ query_order >+ resource >+ resource_select >+ save_on_quit >+ server >+ simulate_netsplit >+ ssl >+ strip_html >+ tls >+ to_char >+ typing_notice >+ web_aware >+ xmlconsole >+ rename - Rename (renick) a buddy >+ yes - Accept a request >+ no - Deny a request >+ qlist - List all the unanswered questions root asked >+ register - Register yourself >+ identify - Identify yourself with your password >+ drop - Drop your account >+ blist - List all the buddies in your contact list >+ nick - Change friendly name, nick >+ join_chat - Join a named groupchat/conference room >+ >+6. Misc Stuff >+ >+ Smileys >+ Groupchats >+ Creating groupchats >+ Groupchat channel names >+ Away states >+ >+Chapter 1. Installation >+ >+Table of Contents >+ >+Downloading the package >+Compiling >+Configuration >+ >+Downloading the package >+ >+The latest BitlBee release is always available from http://www.bitlbee.org/. >+Download the package with your favorite program and unpack it: tar xvfz >+bitlbee-<version>.tar.gz where <version> is to be replaced by the version >+number of the BitlBee you downloaded (e.g. 0.91). >+ >+Compiling >+ >+BitlBee's build system has to be configured before compiling. The configure >+script will do this for you. Just run it, it'll set up with nice and hopefully >+well-working defaults. If you want to change some settings, just try ./ >+configure --help and see what you can do. >+ >+Some variables that might be of interest to the normal user: >+ >+ â prefix, bindir, etcdir, mandir, datadir - The place where all the BitlBee >+ program files will be put. There's usually no reason to specify them all >+ separately, just specifying prefix (or keeping the default /usr/local/) >+ should be okay. >+ >+ â config - The place where BitlBee will save all the per-user settings and >+ buddy information. /var/lib/bitlbee/ is the default value. >+ >+ â msn, jabber, oscar, yahoo - By default, support for all these IM-protocols >+ (OSCAR is the protocol used by both ICQ and AIM) will be compiled in. To >+ make the binary a bit smaller, you can use these options to leave out >+ support for protocols you're not planning to use. >+ >+ â debug - Generate an unoptimized binary with debugging symbols, mainly >+ useful if you want to do some debugging or help us to track down a problem. >+ >+ â strip - By default, unnecessary parts of the generated binary will be >+ stripped out to make it as small as possible. If you don't want this >+ (because it might cause problems on some platforms), set this to 0. >+ >+ â flood - To secure your BitlBee server against flooding attacks, you can use >+ this option. It's not compiled in by default because it needs more testing >+ first. >+ >+ â ssl - The MSN and Jabber modules require an SSL library for some of their >+ tasks. BitlBee can use three different SSL libraries: GnuTLS, mozilla-nss >+ and OpenSSL. (OpenSSL is, however, a bit troublesome because of licensing >+ issues, so don't forget to read the information configure will give you >+ when you try to use OpenSSL!) By default, configure will try to detect >+ GnuTLS or mozilla-nss. If none of them can be found, it'll give up. If you >+ want BitlBee to use OpenSSL, you have to explicitly specify that. >+ >+After running configure, you should run make. After that, run make install as >+root. >+ >+Configuration >+ >+By default, BitlBee runs as the user nobody. You might want to run it as a >+seperate user (some computers run named or apache as nobody). >+ >+Since BitlBee uses inetd, you should add the following line to /etc/inetd.conf: >+ >+6667 stream tcp nowait nobody /usr/local/sbin/bitlbee bitlbee >+ > Inetd has to be restarted after changing the configuration. Either killall -HUP >-inetd or /etc/init.d/inetd restart should do the job on most systems. You might >-be one of the.. ehr, lucky people running an xinetd-powered distro. xinetd is >-quite different and they seem to be proud of that.. ;-) Anyway, if you want >-BitlBee to work with xinetd, just copy the bitlbee.xinetd file to your /etc/ >-xinetd.d/ directory (and probably edit it to suit your needs). You should >-create a directory where BitlBee can store it's data files. This should be the >-directory named after the value 'CONFIG' in Makefile.settings. The default is / >-var/lib/bitlbee, which can be created with the command mkdir -p /var/lib/ >-bitlbee. This directory has to be owned by the user that runs bitlbee. To make >-'nobody' owner of this directory, run chown nobody /var/lib/bitlbee. Because >-things like passwords are saved in this directory, it's probably a good idea to >-make this directory owner-read-/writable only. Since BitlBee acts just like any >-other irc daemon, you can connect to it with your favorite irc client. Launch >-it and connect to localhost port 6667 (or whatever host/port you are running >-bitlbee on). Once you are connected to the BitlBee server, you are >-automatically joined to &bitlbee on that server. This channel acts like the >-'buddy list' you have on the various other chat networks. The user 'root' >-always hangs around in &bitlbee and acts as your interface to bitlbee. All >-commands you give on &bitlbee are 'answered' by root. You might be slightly >-confused by the & in the channel name. This is, however, completely allowed by >-the IRC standards. Just try it on a regular IRC server, it should work. The >-difference between the standard #channels and &channels is that the #channels >-are distributed over all the servers on the IRC network, while &channels are >-local to one server. Because the BitlBee control channel is local to one server >-(and in fact, to one person), this name seems more suitable. Also, with this >-name, it's harder to confuse the control channel with the #bitlbee channel on >-OFTC. You can talk to by starting a query with them. In most irc clients, this >-can be done with either /msg <nick> <text> or /query <nick>. To keep the number >-of open query windows limited, you can also talk to people in the control >-channel, like <nick>: <text>. BitlBee doesn't come with a warranty and is still >-(and will probably always be) under development. That means it can crash at any >-time, corrupt your data or whatever. Don't use it in any production environment >-and don't rely on it, or at least don't blame us if things blow up. :-) http:// >-www.bitlbee.org/ is the homepage of bitlbee and contains the most recent news >-on bitlbee and the latest releases. BitlBee is discussed on #bitlbee on the >-OFTC IRC network (server: irc.oftc.net). BitlBee doesn't have any mailinglists. >+inetd or /etc/init.d/inetd restart should do the job on most systems. >+ >+You might be one of the.. ehr, lucky people running an xinetd-powered distro. >+xinetd is quite different and they seem to be proud of that.. ;-) Anyway, if >+you want BitlBee to work with xinetd, just copy the bitlbee.xinetd file to your >+/etc/xinetd.d/ directory (and probably edit it to suit your needs). >+ >+You should create a directory where BitlBee can store it's data files. This >+should be the directory named after the value 'CONFIG' in Makefile.settings. >+The default is /var/lib/bitlbee, which can be created with the command mkdir -p >+/var/lib/bitlbee. This directory has to be owned by the user that runs bitlbee. >+To make 'nobody' owner of this directory, run chown nobody /var/lib/bitlbee. >+Because things like passwords are saved in this directory, it's probably a good >+idea to make this directory owner-read-/writable only. >+ >+Chapter 2. Usage >+ >+Table of Contents >+ >+Connecting to the server >+The &bitlbee control channel >+Talking to people >+ >+Connecting to the server >+ >+Since BitlBee acts just like any other irc daemon, you can connect to it with >+your favorite irc client. Launch it and connect to localhost port 6667 (or >+whatever host/port you are running bitlbee on). >+ >+The &bitlbee control channel >+ >+Once you are connected to the BitlBee server, you are automatically joined to & >+bitlbee on that server. This channel acts like the 'buddy list' you have on the >+various other chat networks. >+ >+The user 'root' always hangs around in &bitlbee and acts as your interface to >+bitlbee. All commands you give on &bitlbee are 'answered' by root. >+ >+You might be slightly confused by the & in the channel name. This is, however, >+completely allowed by the IRC standards. Just try it on a regular IRC server, >+it should work. The difference between the standard #channels and &channels is >+that the #channels are distributed over all the servers on the IRC network, >+while &channels are local to one server. Because the BitlBee control channel is >+local to one server (and in fact, to one person), this name seems more >+suitable. Also, with this name, it's harder to confuse the control channel with >+the #bitlbee channel on OFTC. >+ >+Talking to people >+ >+You can talk to by starting a query with them. In most irc clients, this can be >+done with either /msg <nick> <text> or /query <nick>. >+ >+To keep the number of open query windows limited, you can also talk to people >+in the control channel, like <nick>: <text>. >+ >+Chapter 3. Support >+ >+Table of Contents >+ >+BitlBee is beta software >+Support channels >+ >+ The World Wide Web >+ IRC >+ Mailinglists >+ >+BitlBee is beta software >+ >+Although BitlBee has quite some functionality it is still beta. That means it >+can crash at any time, corrupt your data or whatever. Don't use it in any >+production environment and don't rely on it. >+ >+Support channels >+ >+The World Wide Web >+ >+http://www.bitlbee.org/ is the homepage of bitlbee and contains the most recent >+news on bitlbee and the latest releases. >+ >+IRC >+ >+BitlBee is discussed on #bitlbee on the OFTC IRC network (server: >+irc.oftc.net). >+ >+Mailinglists >+ >+BitlBee doesn't have any mailinglists. >+ >+Chapter 4. Quickstart >+ >+Table of Contents >+ >+Add and Connect To your IM Account(s) >+Managing Contact Lists: Rename >+Step Four: Managing Contact Lists: Add and Remove. >+Chatting >+Further Resources >+ > Welcome to BitlBee, your IRC gateway to ICQ, MSN, AOL, Jabber and Yahoo Instant >-Messaging Systems. The center of BitlBee is the control channel, &bitlbee. Two >-users will always be there, you (where "you" is the nickname you are using) and >-the system user, root. You need register so that all your IM settings >-(passwords, contacts, etc) can be saved on the BitlBee server. It's important >-that you pick a good password so no one else can access your account. Register >-with this password using the register command: register <password> (without the >-brackets!). Be sure to remember your password. The next time you connect to the >-BitlBee server you will need to identify <password> so that you will be >-recognised and logged in to all the IM services automatically. When finished, >-type help quickstart2 to continue. Step Two: Add and Connect To your IM Account >-(s). To add an account to the account list you will need to use the account add >-command: account add <protocol> <username> <password> [<server>]. For instance, >-suppose you have a Jabber account at jabber.org with handle bitlbee@jabber.org >-with password QuickStart, you would: < you> account add jabber >-bitlbee@jabber.org QuickStart < root> Account successfully added Other >-available IM protocols are msn, oscar, and yahoo. OSCAR is the protocol used by >-ICQ and AOL. For more information about the account add command, see help >-account add. When you are finished adding your account(s) use the account on >-command to enable all your accounts, type help quickstart3 to continue. Step >-Three: Managing Contact Lists: Rename Now BitlBee logs in and downloads the >-contact list from the IM server. In a few seconds, all your on-line buddies >-should show up in the control channel. BitlBee will convert names into >-IRC-friendly form (for instance: tux@example.com will be given the nickname >-tux). If you have more than one person who would have the same name by this >-logic (for instance: tux@example.com and tux@bitlbee.org) the second one to log >-on will be tux_. The same is true if you have a tux log on to AOL and a tux log >-on from Yahoo. It would be easy to get these two mixed up, so BitlBee has a >-rename command to change the nickname into something more suitable: rename >-<oldnick> <newnick> < you> rename tux_ bitlbeetux * tux_ is now known as >-bitlbeetux < root> Nick successfully changed When finished, type help >-quickstart4 to continue. Step Four: Managing Contact Lists: Add and Remove. Now >-you might want to add some contacts, to do this we will use the add command. It >-needs two arguments: a connection ID (which can be a number (try account list), >-protocol name or (part of) the screenname) and the user's handle. It is used in >-the following way: add <connection> <handle> < you> add 0 r2d2@example.com * >-r2d2 has joined &bitlbee In this case r2d2 is online, since he/she joins the >-channel immediately. If the user is not online you will not see them join until >-they log on. Lets say you accidentally added r2d3@example.com rather than >-r2d2@example.com, or maybe you just want to remove a user from your list >-because you never talk to them. To remove a name you will want to use the >-remove command: remove <nick> When finished, type help quickstart5 to continue. >-Step Five: Chatting. First of all, a person must be on your contact list for >-you to chat with them (unless it's a group chat, help groupchats for more). If >-someone not on your contact list sends you a message, simply add them to the >-proper account with the add command. Once they are on your list and online, you >-can chat with them in &bitlbee: < you> tux: hey, how's the weather down there? >-< tux> you: a bit chilly! Note that, although all contacts are in the &bitlbee >-channel, only tux will actually receive this message. The &bitlbee channel >-shouldn't be confused with a real IRC channel. If you prefer chatting in a >-separate window, use the /msg or /query command, just like on real IRC. BitlBee >-will remember how you talk to someone and show his/her responses the same way. >-If you want to change the default behaviour (for people you haven't talked to >-yet), see help set private. You know the basics. If you want to get to know >-more about BitlBee, please type help quickstart6. So you want more than just >-chatting? Or maybe you're just looking for a feature? You can type help set to >-learn more about the possible BitlBee user settings. Among these user settings >-you will find options for common issues, such as changing the charset, HTML >-stripping and automatic connecting (simply type set to see current user >-settings). For more subjects (like groupchats and away states), please type >-help index. If you're still looking for something, please visit us in #bitlbee >-on the OFTC network (you can connect via irc.bitlbee.org), or mail us your >-problem/suggestion. Good luck and enjoy the Bee! account <action> [<arguments>] >+Messaging Systems. >+ >+The center of BitlBee is the control channel, &bitlbee. Two users will always >+be there, you (where "you" is the nickname you are using) and the system user, >+root. >+ >+You need register so that all your IM settings (passwords, contacts, etc) can >+be saved on the BitlBee server. It's important that you pick a good password so >+no one else can access your account. Register with this password using the >+register command: register <password> (without the brackets!). >+ >+Be sure to remember your password. The next time you connect to the BitlBee >+server you will need to identify <password> so that you will be recognised and >+logged in to all the IM services automatically. >+ >+When finished, type help quickstart2 to continue. >+ >+Add and Connect To your IM Account(s) >+ >+Step Two: Add and Connect To your IM Account(s). >+ >+To add an account to the account list you will need to use the account add >+command: account add <protocol> <username> <password> [<server>]. >+ >+For instance, suppose you have an ICQ account with UIN 72696705 with password >+QuickStart, you would: >+ >+< you> account add oscar 72696705 QuickStart login.icq.com >+< root> Account successfully added >+ >+Other available IM protocols are jabber, msn, and yahoo. Oscar is the protocol >+used by ICQ and AOL. For oscar, you need to specify the IM-server as a fourth >+argument (for msn and yahoo there is no fourth argument). For AOL Instant >+Messenger, the server name is login.oscar.aol.com. For ICQ, the server name is >+login.icq.com. >+ >+When you are finished adding your account(s) use the account on command to >+enable all your accounts, type help quickstart3 to continue. >+ >+Managing Contact Lists: Rename >+ >+Step Three: Managing Contact Lists: Rename >+ >+For most protocols (currently MSN, Jabber, Yahoo and AOL) BitlBee can download >+the contact list automatically from the IM server and all the on-line users >+should appear in the control channel when you log in. >+ >+BitlBee will convert names into irc-friendly form (for instance: >+tux@example.com will be given the nickname tux). If you have more than one >+person who would have the same name by this logic (for instance: >+tux@example.com and tux@bitlbee.org) the second one to log on will be tux_. The >+same is true if you have a tux log on to AOL and a tux log on from Yahoo. >+ >+It would be easy to get these two mixed up, so BitlBee has a rename command to >+change the nickname into something more suitable: rename <oldnick> <newnick> >+ >+< you> rename tux_ bitlbeetux >+ * tux_ is now known as bitlbeetux >+< root> Nick successfully changed >+ >+When finished, type help quickstart4 to continue. >+ >+Step Four: Managing Contact Lists: Add and Remove. >+ >+Step Four: Managing Contact Lists: Add and Remove. >+ >+Now you might want to add some contacts, to do this we will use the add >+command. It needs two arguments: a connection ID (which can be a number (try >+account list), protocol name or (part of) the screenname) and the user's >+handle. It is used in the following way: add <connection> <handle> >+ >+< you> add 0 r2d2@example.com >+ * r2d2 has joined &bitlbee >+ >+In this case r2d2 is online, since he/she joins the channel immediately. If the >+user is not online you will not see them join until they log on. >+ >+Lets say you accidentally added r2d3@example.com rather than r2d2@example.com, >+or maybe you just want to remove a user from your list because you never talk >+to them. To remove a name you will want to use the remove command: remove >+<nick> >+ >+When finished, type help quickstart5 to continue. >+ >+Chatting >+ >+Step Five: Chatting. >+ >+First of all, a person must be on your contact list for you to chat with them >+(unless it's a group chat, help groupchats for more). If someone not on your >+contact list sends you a message, simply add them to the proper account with >+the add command. Once they are on your list and online, you can chat with them >+in &bitlbee: >+ >+< you> tux: hey, how's the weather down there? >+< tux> you: a bit chilly! >+ >+If you'd rather chat with them in a separate window use the /msg or /query >+command, just like you would for a private message in IRC. If you want to have >+messages automatically come up in private messages rather than in the &bitlbee >+channel, use the set private command: set private true (set private false to >+change back). >+ >+You know the basics. If you want to get to know more about BitlBee, please type >+help quickstart6. >+ >+Further Resources >+ >+So you want more than just chatting? Or maybe you're just looking for a >+feature? >+ >+You can type help set to learn more about the possible BitlBee user settings. >+Among these user settings you will find options for common issues, such as >+changing the charset, HTML stripping and automatic connecting (simply type set >+to see current user settings). >+ >+For more subjects (like groupchats and away states), please type help index. >+ >+If you're still looking for something, please visit us in #bitlbee on the OFTC >+network (you can connect via irc.bitlbee.org), or mail us your problem/ >+suggestion. Good luck and enjoy the Bee! >+ >+Chapter 5. Bitlbee commands >+ >+Table of Contents >+ >+account - IM-account list maintenance >+ >+ account add >+ account del >+ account on >+ account off >+ account list >+ account set >+ >+add - Add a buddy to your contact list >+info - Request user information >+remove - Remove a buddy from your contact list >+block - Block someone >+allow - Unblock someone >+set - Miscellaneous settings >+help - BitlBee help system >+save - Save your account data >+auto_connect >+auto_reconnect >+auto_reconnect_delay >+away_devoice >+buddy_sendbuffer >+buddy_sendbuffer_delay >+charset >+debug >+default_target >+display_name >+display_namechanges >+handle_unknown >+lcnicks >+ops >+password >+port >+priority >+private >+query_order >+resource >+resource_select >+save_on_quit >+server >+simulate_netsplit >+ssl >+strip_html >+tls >+to_char >+typing_notice >+web_aware >+xmlconsole >+rename - Rename (renick) a buddy >+yes - Accept a request >+no - Deny a request >+qlist - List all the unanswered questions root asked >+register - Register yourself >+identify - Identify yourself with your password >+drop - Drop your account >+blist - List all the buddies in your contact list >+nick - Change friendly name, nick >+join_chat - Join a named groupchat/conference room >+ >+account - IM-account list maintenance >+ >+Syntax: >+ >+account <action> [<arguments>] >+ > Available actions: add, del, list, on, off and set. See help account <action> >-for more information. account add <protocol> <username> <password> Adds an >-account on the given server with the specified protocol, username and password >-to the account list. Supported protocols right now are: Jabber, MSN, OSCAR (AIM >-/ICQ) and Yahoo. For more information about adding an account, see help account >-add <protocol>. account add jabber <handle@server.tld> <password> The handle >-should be a full handle, including the domain name. You can specify a >-servername if necessary. Normally BitlBee doesn't need this though, since it's >-able to find out the server by doing DNS SRV lookups. In previous versions it >-was also possible to specify port numbers and/or SSL in the server tag. This is >-deprecated and should now be done using the account set command. This also >-applies to specifying a resource in the handle (like wilmer@bitlbee.org/work). >-account add msn <handle@server.tld> <password> For MSN connections there are no >-special arguments. account add oscar <handle> <password> OSCAR is the protocol >-used to connect to AIM and/or ICQ. The servers will automatically detect if >-you're using a numeric or non-numeric username so there's no need to tell which >-network you want to connect to. < wilmer> account add oscar 72696705 >-hobbelmeeuw < root> Account successfully added account add yahoo <handle> >-<password> For Yahoo! connections there are no special arguments. account del >-<account id> This commands deletes an account from your account list. You >-should signoff the account before deleting it. The account ID can be a number >-(see account list), the protocol name or (part of) the screenname, as long as >-it matches only one connection. account on [<account id>] This command will try >-to log into the specified account. If no account is specified, BitlBee will log >-into all the accounts that have the auto_connect flag set. The account ID can >-be a number (see account list), the protocol name or (part of) the screenname, >-as long as it matches only one connection. account off [<account id>] This >-command disconnects the connection for the specified account. If no account is >-specified, BitlBee will deactivate all active accounts and cancel all pending >-reconnects. The account ID can be a number (see account list), the protocol >-name or (part of) the screenname, as long as it matches only one connection. >-account list This command gives you a list of all the accounts known by >-BitlBee, including the numbers you'll need for most account commands. account >-set <account id> account set <account id>/<setting> account set <account id>/ >-<setting> <value> account set -del <account id>/<setting> This account can be >-used to change various settings for IM accounts. For all protocols, this >-command can be used to change the handle or the password BitlBee uses to log in >-and if it should be logged in automatically. Some protocols have additional >-settings. You can see the settings available for a connection by typing account >-set <account id>. For more infomation about a setting, see help set <setting>. >-For details about the syntax of this command, see help set. The account ID can >-be a number (see account list), the protocol name or (part of) the screenname, >-as long as it matches only one connection. add <connection> <handle> [<nick>] >-add -tmp <connection> <handle> [<nick>] Adds the given buddy at the specified >-connection to your buddy list. The account ID can be a number (see account >-list), the protocol name or (part of) the screenname, as long as it matches >-only one connection. If you want, you can also tell BitlBee what nick to give >-the new contact. The -tmp option adds the buddy to the internal BitlBee >-structures only, not to the real contact list (like done by set handle_unknown >-add). This allows you to talk to people who are not in your contact list. This >-normally won't show you any presence notifications. < ctrlsoft> add 3 >-gryp@jabber.org grijp * grijp has joined &bitlbee info <connection> <handle> >-info <nick> Requests IM-network-specific information about the specified user. >-The amount of information you'll get differs per protocol. For some protocols >-(ATM Yahoo! and MSN) it'll give you an URL which you can visit with a normal >-web browser to get the information. < ctrlsoft> info 0 72696705 < root> User >-info - UIN: 72696705 Nick: Lintux First/Last name: Wilmer van der Gaast E-mail: >-lintux@lintux.cx remove <nick> Removes the specified nick from your buddy list. >-< ctrlsoft> remove gryp * gryp has quit [Leaving...] block <nick> block >-<connection> <handle> block <connection> Puts the specified user on your ignore >-list. Either specify the user's nick when you have him/her in your contact list >-or a connection number and a user handle. When called with only a connection >-specification as an argument, the command displays the current block list for >-that connection. allow <nick> allow <connection> <handle> Reverse of block. >-Unignores the specified user or user handle on specified connection. When >-called with only a connection specification as an argument, the command >-displays the current allow list for that connection. set set <variable> set >-<variable> <value> set -del <variable> Without any arguments, this command >-lists all the set variables. You can also specify a single argument, a variable >-name, to get that variable's value. To change this value, specify the new value >-as the second argument. With -del you can reset a setting to its default value. >-To get more help information about a setting, try: < ctrlsoft> help set private >-help [subject] This command gives you the help information you're reading right >-now. If you don't give any arguments, it'll give a short help index. save This >-command saves all your nicks and accounts immediately. Handy if you have the >-autosave functionality disabled, or if you don't trust the program's >-stability... ;-) Type: boolean With this option enabled, when you identify >-BitlBee will automatically connect to your accounts, with this disabled it will >-not do this. This setting can also be changed for specific accounts using the >-account set command. (However, these values will be ignored if the global >-auto_connect setting is disabled!) Type: boolean If an IM-connections breaks, >-you're supposed to bring it back up yourself. Having BitlBee do this >-automatically might not always be a good idea, for several reasons. If you want >-the connections to be restored automatically, you can enable this setting. See >-also the auto_reconnect_delay setting. This setting can also be changed for >-specific accounts using the account set command. (However, these values will be >-ignored if the global auto_reconnect setting is disabled!) Type: integer Tell >-BitlBee after how many seconds it should attempt to bring an IM-connection back >-up after a crash. It's not a good idea to set this value very low, it will >-cause too much useless traffic when an IM-server is down for a few hours. See >-also the auto_reconnect setting. Type: boolean With this option enabled, the >-root user devoices people when they go away (just away, not offline) and gives >-the voice back when they come back. You might dislike the voice-floods you'll >-get if your contact list is huge, so this option can be disabled. Type: boolean >+for more information. >+ >+account add >+ >+Syntax: >+ >+account add <protocol> <username> <password> [<server>] >+ >+Adds an account on the given server with the specified protocol, username and >+password to the account list. Supported protocols right now are: Jabber, MSN, >+OSCAR (AIM/ICQ) and Yahoo. For more information about adding an account, see >+help account add <protocol>. >+ >+account add jabber >+ >+Syntax: >+ >+account add jabber <handle@server.tld> <password> [<servertag>] >+ >+The handle should be a full handle, including the domain name. You can specify >+a servername if necessary. Normally BitlBee doesn't need this though, since >+it's able to find out the server by doing DNS SRV lookups. >+ >+In previous versions it was also possible to specify port numbers and/or SSL in >+the server tag. This is deprecated and should now be done using the account set >+command. This also applies to specifying a resource in the handle (like >+wilmer@bitlbee.org/work). >+ >+account add msn >+ >+Syntax: >+ >+account add msn <handle@server.tld> <password> >+ >+For MSN connections there are no special arguments. >+ >+account add oscar >+ >+Syntax: >+ >+account add oscar <handle> <password> [<servername>] >+ >+Specifying a server is required for OSCAR, since OSCAR can be used for both >+ICQ- and AIM-connections. Although these days it's supposed to be possible to >+connect to ICQ via AIM-servers and vice versa, we like to stick with this >+separation for now. For ICQ connections, the servername is login.icq.com, for >+AIM connections it's login.oscar.aol.com. >+ >+< wilmer> account add oscar 72696705 hobbelmeeuw login.icq.com >+< root> Account successfully added >+ >+account add yahoo >+ >+Syntax: >+ >+account add yahoo <handle> <password> >+ >+For Yahoo! connections there are no special arguments. >+ >+account del >+ >+Syntax: >+ >+account del <account id> >+ >+This commands deletes an account from your account list. You should signoff the >+account before deleting it. >+ >+The account ID can be a number (see account list), the protocol name or (part >+of) the screenname, as long as it matches only one connection. >+ >+account on >+ >+Syntax: >+ >+account on [<account id>] >+ >+This command will try to log into the specified account. If no account is >+specified, BitlBee will log into all the accounts that have the auto_connect >+flag set. >+ >+The account ID can be a number (see account list), the protocol name or (part >+of) the screenname, as long as it matches only one connection. >+ >+account off >+ >+Syntax: >+ >+account off [<account id>] >+ >+This command disconnects the connection for the specified account. If no >+account is specified, BitlBee will deactivate all active accounts and cancel >+all pending reconnects. >+ >+The account ID can be a number (see account list), the protocol name or (part >+of) the screenname, as long as it matches only one connection. >+ >+account list >+ >+Syntax: >+ >+account list >+ >+This command gives you a list of all the accounts known by BitlBee, including >+the numbers you'll need for most account commands. >+ >+account set >+ >+Syntax: >+ >+account set <account id> >+account set <account id>/<setting> >+account set <account id>/<setting> <value> >+account set -del <account id>/<setting> >+ >+This account can be used to change various settings for IM accounts. For all >+protocols, this command can be used to change the handle or the password >+BitlBee uses to log in and if it should be logged in automatically. Some >+protocols have additional settings. You can see the settings available for a >+connection by typing account set <account id>. >+ >+For more infomation about a setting, see help set <setting>. For details about >+the syntax of this command, see help set. >+ >+The account ID can be a number (see account list), the protocol name or (part >+of) the screenname, as long as it matches only one connection. >+ >+add - Add a buddy to your contact list >+ >+Syntax: >+ >+add <connection> <handle> [<nick>] >+add -tmp <connection> <handle> [<nick>] >+ >+Adds the given buddy at the specified connection to your buddy list. The >+account ID can be a number (see account list), the protocol name or (part of) >+the screenname, as long as it matches only one connection. >+ >+If you want, you can also tell BitlBee what nick to give the new contact. Of >+course you can also use the rename command for that, but sometimes this might >+be more convenient. >+ >+Adding -tmp adds the buddy to the internal BitlBee structures only, not to the >+real contact list (like done by set handle_unknown add). This allows you to >+talk to people who are not in your contact list. >+ >+< ctrlsoft> add 3 gryp@jabber.org grijp >+ * grijp has joined &bitlbee >+ >+info - Request user information >+ >+Syntax: >+ >+info <connection> <handle> >+info <nick> >+ >+Requests IM-network-specific information about the specified user. The amount >+of information you'll get differs per protocol. For some protocols (ATM Yahoo! >+and MSN) it'll give you an URL which you can visit with a normal web browser to >+get the information. >+ >+< ctrlsoft> info 0 72696705 >+< root> User info - UIN: 72696705 Nick: Lintux First/Last name: Wilmer van der Gaast E-mail: lintux@lintux.cx >+ >+remove - Remove a buddy from your contact list >+ >+Syntax: >+ >+remove <nick> >+ >+Removes the specified nick from your buddy list. >+ >+< ctrlsoft> remove gryp >+ * gryp has quit [Leaving...] >+ >+block - Block someone >+ >+Syntax: >+ >+block <nick> >+block <connection> <handle> >+block <connection> >+ >+Puts the specified user on your ignore list. Either specify the user's nick >+when you have him/her in your contact list or a connection number and a user >+handle. >+ >+When called with only a connection specification as an argument, the command >+displays the current block list for that connection. >+ >+allow - Unblock someone >+ >+Syntax: >+ >+allow <nick> >+allow <connection> <handle> >+ >+Reverse of block. Unignores the specified user or user handle on specified >+connection. >+ >+When called with only a connection specification as an argument, the command >+displays the current allow list for that connection. >+ >+set - Miscellaneous settings >+ >+Syntax: >+ >+set >+set <variable> >+set <variable> <value> >+set -del <variable> >+ >+Without any arguments, this command lists all the set variables. You can also >+specify a single argument, a variable name, to get that variable's value. To >+change this value, specify the new value as the second argument. With -del you >+can reset a setting to its default value. >+ >+To get more help information about a setting, try: >+ >+< ctrlsoft> help set private >+ >+help - BitlBee help system >+ >+Syntax: >+ >+help [subject] >+ >+This command gives you the help information you're reading right now. If you >+don't give any arguments, it'll give a short help index. >+ >+save - Save your account data >+ >+Syntax: >+ >+save >+ >+This command saves all your nicks and accounts immediately. Handy if you have >+the autosave functionality disabled, or if you don't trust the program's >+stability... ;-) >+ >+auto_connect >+ >+Type: boolean >+ >+With this option enabled, when you identify BitlBee will automatically connect >+to your accounts, with this disabled it will not do this. >+ >+This setting can also be changed for specific accounts using the account set >+command. (However, these values will be ignored if the global auto_connect >+setting is disabled!) >+ >+auto_reconnect >+ >+Type: boolean >+ >+If an IM-connections breaks, you're supposed to bring it back up yourself. >+Having BitlBee do this automatically might not always be a good idea, for >+several reasons. If you want the connections to be restored automatically, you >+can enable this setting. >+ >+See also the auto_reconnect_delay setting. >+ >+This setting can also be changed for specific accounts using the account set >+command. (However, these values will be ignored if the global auto_reconnect >+setting is disabled!) >+ >+auto_reconnect_delay >+ >+Type: integer >+ >+Tell BitlBee after how many seconds it should attempt to bring an IM-connection >+back up after a crash. It's not a good idea to set this value very low, it will >+cause too much useless traffic when an IM-server is down for a few hours. >+ >+See also the auto_reconnect setting. >+ >+away_devoice >+ >+Type: boolean >+ >+With this option enabled, the root user devoices people when they go away (just >+away, not offline) and gives the voice back when they come back. You might >+dislike the voice-floods you'll get if your contact list is huge, so this >+option can be disabled. >+ >+buddy_sendbuffer >+ >+Type: boolean >+ > By default, when you send a message to someone, BitlBee forwards this message > to the user immediately. When you paste a large number of lines, the lines will > be sent in separate messages, which might not be very nice to read. If you > enable this setting, BitlBee will buffer your messages and wait for more data. >+ > Using the buddy_sendbuffer_delay setting you can specify the number of seconds >-BitlBee should wait for more data before the complete message is sent. Please >-note that if you remove a buddy from your list (or if the connection to that >-user drops) and there's still data in the buffer, this data will be lost. >-BitlBee will not try to send the message to the user in those cases. Type: >-integer Tell BitlBee after how many (mili)seconds a buffered message should be >-sent. Values greater than 5 will be interpreted as miliseconds, 5 and lower as >-seconds. See also the buddy_sendbuffer setting. Type: string This setting tells >-BitlBee what your IRC client sends and expects. It should be equal to the >-charset setting of your IRC client if you want to be able to send and receive >-non-ASCII text properly. Most systems use UTF-8 these days. On older systems, >-an iso8859 charset may work better. For example, iso8859-1 is the best choice >-for most Western countries. You can try to find what works best for you on >-http://www.unicodecharacter.com/charsets/iso8859.html Type: boolean Some >-debugging messages can be sent to the control channel if you wish. They're >+BitlBee should wait for more data before the complete message is sent. >+ >+Please note that if you remove a buddy from your list (or if the connection to >+that user drops) and there's still data in the buffer, this data will be lost. >+BitlBee will not try to send the message to the user in those cases. >+ >+buddy_sendbuffer_delay >+ >+Type: integer >+ >+Tell BitlBee after how many (mili)seconds a buffered message should be sent. >+Values greater than 5 will be interpreted as miliseconds, 5 and lower as >+seconds. >+ >+See also the buddy_sendbuffer setting. >+ >+charset >+ >+Type: string >+ >+The charset setting enables you to use different character sets in BitlBee. >+These get converted to UTF-8 before sending and from UTF-8 when receiving. >+ >+If you don't know what's the best value for this, at least iso8859-1 is the >+best choice for most Western countries. You can try to find what works best for >+you on http://czyborra.com/charsets/iso8859.html >+ >+debug >+ >+Type: boolean >+ >+Some debugging messages can be sent to the control channel if you wish. They're > probably not really useful for you, unless you're doing some development on >-BitlBee. Type: string With this value set to root, lines written in the control >-channel without any nickname in front of them will be interpreted as commands. >-If you want BitlBee to send those lines to the last person you addressed in the >-control channel, set this to last. Type: string Currently only available for >-MSN connections. This setting allows you to read and change your "friendly >-name" for this connection. Since this is a server-side setting, it can't be >-changed when the account is off-line. Type: boolean With this option enabled, >-root will inform you when someone in your buddy list changes his/her "friendly >-name". Type: string Messages from unknown users are echoed like this by >-default: If you want this lame user to be added automatically, you can set this >-setting to "add". If you prefer to ignore messages from people you don't know, >-you can set this one to "ignore". "add_private" and "add_channel" are like add, >-but you can use them to make messages from unknown buddies appear in the >-channel instead of a query window. Type: boolean Hereby you can change whether >-you want all lower case nick names or leave the case as it intended by your >-peer. Type: boolean Some protocols (MSN, Yahoo!) can notify via IM about new >-e-mail. Since most people use their Hotmail/Yahoo! addresses as a spam-box, >-this is disabled default. If you want these notifications, you can enable this >-setting. Type: string Some people prefer themself and root to have operator >-status in &bitlbee, other people don't. You can change these states using this >-setting. The value "both" means both user and root get ops. "root" means, well, >-just root. "user" means just the user. "none" means nobody will get operator >-status. Type: string Use this global setting to change your "NickServ" >-password. This setting is also available for all IM accounts to change the >-password BitlBee uses to connect to the service. Note that BitlBee will always >-say this setting is empty. This doesn't mean there is no password, it just >-means that, for security reasons, BitlBee stores passwords somewhere else so >-they can't just be retrieved in plain text. Type: integer Currently only >-available for Jabber connections. Specifies the port number to connect to. >-Usually this should be set to 5222, or 5223 for SSL-connections. Type: integer >+BitlBee. >+ >+default_target >+ >+Type: string >+ >+With this value set to root, lines written in the control channel without any >+nickname in front of them will be interpreted as commands. If you want BitlBee >+to send those lines to the last person you addressed in the control channel, >+set this to last. >+ >+display_name >+ >+Type: string >+ >+Currently only available for MSN connections. This setting allows you to read >+and change your "friendly name" for this connection. Since this is a >+server-side setting, it can't be changed when the account is off-line. >+ >+display_namechanges >+ >+Type: boolean >+ >+With this option enabled, root will inform you when someone in your buddy list >+changes his/her "friendly name". >+ >+handle_unknown >+ >+Type: string >+ >+Messages from unknown users are echoed like this by default: >+ >+If you want this lame user to be added automatically, you can set this setting >+to "add". If you prefer to ignore messages from people you don't know, you can >+set this one to "ignore". "add_private" and "add_channel" are like add, but you >+can use them to make messages from unknown buddies appear in the channel >+instead of a query window. >+ >+lcnicks >+ >+Type: boolean >+ >+Hereby you can change whether you want all lower case nick names or leave the >+case as it intended by your peer. >+ >+ops >+ >+Type: string >+ >+Some people prefer themself and root to have operator status in &bitlbee, other >+people don't. You can change these states using this setting. >+ >+The value "both" means both user and root get ops. "root" means, well, just >+root. "user" means just the user. "none" means nobody will get operator status. >+ >+password >+ >+Type: string >+ >+Use this global setting to change your "NickServ" password. >+ >+This setting is also available for all IM accounts to change the password >+BitlBee uses to connect to the service. >+ >+Note that BitlBee will always say this setting is empty. This doesn't mean >+there is no password, it just means that, for security reasons, BitlBee stores >+passwords somewhere else so they can't just be retrieved in plain text. >+ >+port >+ >+Type: integer >+ >+Currently only available for Jabber connections. Specifies the port number to >+connect to. Usually this should be set to 5222, or 5223 for SSL-connections. >+ >+priority >+ >+Type: integer >+ > Can be set for Jabber connections. When connecting to one account from multiple > places, this priority value will help the server to determine where to deliver > incoming messages (that aren't addressed to a specific resource already). >+ > According to RFC 3921 servers will always deliver messages to the server with > the highest priority value. Mmessages will not be delivered to resources with a > negative priority setting (and should be saved as an off-line message if all >-available resources have a negative priority value). Type: boolean If value is >-true, messages from users will appear in separate query windows. If false, >-messages from users will appear in the control channel. This setting is >-remembered (during one session) per-user, this setting only changes the default >-state. This option takes effect as soon as you reconnect. Type: string This >-changes the order in which the questions from root (usually authorization >+available resources have a negative priority value). >+ >+private >+ >+Type: boolean >+ >+If value is true, messages from users will appear in separate query windows. If >+false, messages from users will appear in the control channel. >+ >+This setting is remembered (during one session) per-user, this setting only >+changes the default state. This option takes effect as soon as you reconnect. >+ >+query_order >+ >+Type: string >+ >+This changes the order in which the questions from root (usually authorization > requests from buddies) should be answered. When set to lifo, BitlBee > immediately displays all new questions and they should be answered in reverse > order. When this is set to fifo, BitlBee displays the first question which >-comes in and caches all the others until you answer the first one. Although the >-fifo setting might sound more logical (and used to be the default behaviour in >-older BitlBee versions), it turned out not to be very convenient for many users >-when they missed the first question (and never received the next ones). Type: >-string Can be set for Jabber connections. You can use this to connect to your >-Jabber account from multiple clients at once, with every client using a >-different resource string. Type: string Because the IRC interface makes it >-pretty hard to specify the resource to talk to (when a buddy is online through >-different resources), this setting was added. Normally it's set to priority >-which means messages will always be delivered to the buddy's resource with the >-highest priority. If the setting is set to time, messages will be delivered to >-the resource that was last used to send you a message (or the resource that >-most recently connected). Type: boolean If enabled causes BitlBee to save all >-current settings and account details when user disconnects. This is enabled by >-default, and these days there's not really a reason to have it disabled >-anymore. Type: string Can be set for Jabber- and OSCAR-connections. For Jabber, >-you might have to set this if the servername isn't equal to the part after the >-@ in the Jabber handle. For OSCAR this shouldn't be necessary anymore in recent >-BitlBee versions. Type: boolean Some IRC clients parse quit messages sent by >-the IRC server to see if someone really left or just disappeared because of a >-netsplit. By default, BitlBee tries to simulate netsplit-like quit messages to >-keep the control channel window clean. If you don't like this (or if your IRC >-client doesn't support this) you can disable this setting. Type: boolean >+comes in and caches all the others until you answer the first one. >+ >+Although the fifo setting might sound more logical (and used to be the default >+behaviour in older BitlBee versions), it turned out not to be very convenient >+for many users when they missed the first question (and never received the next >+ones). >+ >+resource >+ >+Type: string >+ >+Can be set for Jabber connections. You can use this to connect to your Jabber >+account from multiple clients at once, with every client using a different >+resource string. >+ >+resource_select >+ >+Type: string >+ >+Because the IRC interface makes it pretty hard to specify the resource to talk >+to (when a buddy is online through different resources), this setting was >+added. >+ >+Normally it's set to priority which means messages will always be delivered to >+the buddy's resource with the highest priority. If the setting is set to time, >+messages will be delivered to the resource that was last used to send you a >+message (or the resource that most recently connected). >+ >+save_on_quit >+ >+Type: boolean >+ >+If enabled causes BitlBee to save all current settings and account details when >+user disconnects. This is enabled by default, and these days there's not really >+a reason to have it disabled anymore. >+ >+server >+ >+Type: string >+ >+Can be set for Jabber- and OSCAR-connections. For OSCAR, this must be set to >+login.icq.com if it's an ICQ connection, or login.oscar.aol.com if it's an AIM >+connection. For Jabber, you have to set this if the servername isn't equal to >+the part after the @ in the Jabber handle. >+ >+simulate_netsplit >+ >+Type: boolean >+ >+Some IRC clients parse quit messages sent by the IRC server to see if someone >+really left or just disappeared because of a netsplit. By default, BitlBee >+tries to simulate netsplit-like quit messages to keep the control channel >+window clean. If you don't like this (or if your IRC client doesn't support >+this) you can disable this setting. >+ >+ssl >+ >+Type: boolean >+ > Currently only available for Jabber connections. Set this to true if the server >-accepts SSL connections. Type: boolean Determines what BitlBee should do with >-HTML in messages. Normally this is turned on and HTML will be stripped from >-messages, if BitlBee thinks there is HTML. If BitlBee fails to detect this >-sometimes (most likely in AIM messages over an ICQ connection), you can set >-this setting to always, but this might sometimes accidentally strip non-HTML >-things too. Type: boolean Newer Jabber servers allow clients to convert a >-plain-text session to a TLS/SSL-encrypted session. Normally (with this setting >-set to try) BitlBee will do this, if possible. If you want to force BitlBee to >-use TLS sessions only (and to give up if that doesn't seem to be possible) you >-can set this setting to true. Set it to false if you want the session to remain >-plain-text. Type: string It's customary that messages meant for one specific >-person on an IRC channel are prepended by his/her alias followed by a colon >-':'. BitlBee does this by default. If you prefer a different character, you can >-set it using set to_char. Please note that this setting is only used for >-incoming messages. For outgoing messages you can use ':' (colon) or ',' to >-separate the destination nick from the message, and this is not configurable. >-Type: boolean Sends you a /notice when a user starts typing a message (if >-supported by the IM protocol and the user's client). To use this, you most >-likely want to use a script in your IRC client to show this information in a >-more sensible way. Type: string ICQ allows people to see if you're on-line via >-a CGI-script. (http://status.icq.com/online.gif?icq=UIN) This can be nice to >-put on your website, but it seems that spammers also use it to see if you're >-online without having to add you to their contact list. So to prevent ICQ >-spamming, recent versions of BitlBee disable this feature by default. Unless >-you really intend to use this feature somewhere (on forums or maybe a website), >-it's probably better to keep this setting disabled. Type: boolean The Jabber >-module allows you to add a buddy xmlconsole to your contact list, which will >-then show you the raw XMPP stream between you and the server. You can also send >-XMPP packets to this buddy, which will then be sent to the server. If you want >-to enable this XML console permanently (and at login time already), you can set >-this setting. rename <oldnick> <newnick> Renick a user in your buddy list. Very >-useful, in fact just very important, if you got a lot of people with stupid >-account names (or hard ICQ numbers). < itsme> rename itsme_ you * itsme_ is now >-known as you yes [<number>] Sometimes an IM-module might want to ask you a >-question. (Accept this user as your buddy or not?) To accept a question, use >-the yes command. By default, this answers the first unanswered question. You >-can also specify a different question as an argument. You can use the qlist >-command for a list of questions. no [<number>] Sometimes an IM-module might >-want to ask you a question. (Accept this user as your buddy or not?) To reject >-a question, use the no command. By default, this answers the first unanswered >-question. You can also specify a different question as an argument. You can use >-the qlist command for a list of questions. qlist This gives you a list of all >-the unanswered questions from root. register <password> BitlBee can save your >-settings so you won't have to enter all your IM passwords every time you log >-in. If you want the Bee to save your settings, use the register command. Please >-do pick a secure password, don't just use your nick as your password. Please >-note that IRC is not an encrypted protocol, so the passwords still go over the >-network in plaintext. Evil people with evil sniffers will read it all. (So >-don't use your root password.. ;-) To identify yourself in later sessions, you >-can use the identify command. To change your password later, you can use the >-set password command. identify <password> BitlBee saves all your settings >-(contacts, accounts, passwords) on-server. To prevent other users from just >-logging in as you and getting this information, you'll have to identify >-yourself with your password. You can register this password using the register >-command. Once you're registered, you can change your password using set >-password <password>. drop <password> Drop your BitlBee registration. Your >-account files will be removed and your password will be forgotten. For obvious >-security reasons, you have to specify your NickServ password to make this >-command work. blist [all|online|offline|away] You can get a better readable >-buddy list using the blist command. If you want a complete list (including the >-offline users) you can use the all argument. nick <connection> [<new nick>] >-nick <connection> Deprecated: Use the per-account display_name setting to read >-and change this information. < wouter> account set 1/display_name "The majestik >-møøse" < root> display_name = `The majestik møøse' join_chat <connection> <room >-name> [<channel name>] [<room nickname>] [<password>] On most IM-networks >-groupchats can be started using the /join command. (/join #foo to start a >-chatroom with you and foo) This doesn't work with names groupchats though >-(which exist on Jabber networks and AIM, for example), instead you can use this >-command. The first two arguments are required. room name is the name of the >-chatroom on the IM-network. channel name is the IRC channel name BitlBee should >-map this to. room nickname is the nickname you want to have in this channel. If >-you don't give these options, BitlBee will do the right guesses. The following >-command will join you to the chatroom called bitlbee@conference.bitlbee.org. >-The channel will be called &bitlbee-help because &bitlbee will already be in >-use. Your nickname will be help-me. < wilmer> join_chat jabber >-bitlbee@conference.bitlbee.org &bitlbee-help help-me All MSN smileys (except >-one) are case insensitive and work without the nose too. (Y) Thumbs up (N) >-Thumbs down (B) Beer mug (D) Martini glass (X) Girl (Z) Boy (6) Devil smiley :- >-[ Vampire bat (}) Right hug ({) Left hug (M) MSN Messenger or Windows Messenger >-icon (think a BitlBee logo here ;) :-S Crooked smiley (Confused smiley) :-$ >-Embarrassed smiley (H) Smiley with sunglasses :-@ Angry smiley (A) Angel smiley >-(L) Red heart (Love) (U) Broken heart (K) Red lips (Kiss) (G) Gift with bow (F) >-Red rose (W) Wilted rose (P) Camera (~) Film strip (T) Telephone receiver (@) >-Cat face (&) Dog's head (C) Coffee cup (I) Light bulb (S) Half-moon (Case >-sensitive!) (*) Star (8) Musical eighth note (E) Envelope (^) Birthday cake (O) >-Clock BitlBee now supports groupchats on all IM networks. This text will try to >-explain you how they work. As soon as someone invites you into a groupchat, you >-will be force-joined or invited (depending on the protocol) into a new virtual >-channel with all the people in there. You can leave the channel at any time, >-just like you would close the window in regular IM clients. Please note that >-root-commands don't work in groupchat channels, they only work in the control >-channel (or to root directly). Of course you can also create your own >-groupchats. Type help groupchats2 to see how. If you want to start a groupchat >-with the person lisa_msn in it, just join the channel #lisa_msn. BitlBee will >-refuse to join you to the channel with that name, but it will create a new >-virtual channel with root, you and lisa_msn in it. Of course a channel with >-only two people isn't really exciting yet. So the next step is to invite some >-other people to the channel. For this, you can use the /invite command of your >-IRC client. Please do keep in mind that all the people have to be on the same >-network and contact list! You can't invite Yahoo! buddies into an MSN >-groupchat. Some protocols (like Jabber) also support named groupchats. BitlBee >-now supports these too. You can use the join_chat command to join them. See >-help join_chat for more information. As you might've expected, you can just use >-the /away command in your IRC client to set an away-state. BitlBee supports >-most away-states supported by the protocols. Not all away states are supported >-by all protocols, and some protocols have different names for them. BitlBee >-will try to pick the best available alias from this list for every connection: >-Away from computer, Away, Extended away NA, N/A, Not available Busy, Do not >-disturb, DND, Occupied Be right back, BRB On the phone, Phone, On phone Out to >-lunch, Lunch, Food Invisible, Hidden So /away Food will set your state to "Out >-to lunch" on your MSN connection, and for most other connections the default, >-"Away" or "Away from computer" will be chosen. You can also add more >-information to your away message. Setting it to "Busy - Fixing BitlBee bugs" >-will set your IM-away-states to Busy, but your away message will be more >-descriptive for people on IRC. Most IM-protocols can also show this additional >-information to your buddies. >+accepts SSL connections. >+ >+strip_html >+ >+Type: boolean >+ >+Determines what BitlBee should do with HTML in messages. Normally this is >+turned on and HTML will be stripped from messages, if BitlBee thinks there is >+HTML. >+ >+If BitlBee fails to detect this sometimes (most likely in AIM messages over an >+ICQ connection), you can set this setting to always, but this might sometimes >+accidentally strip non-HTML things too. >+ >+tls >+ >+Type: boolean >+ >+Newer Jabber servers allow clients to convert a plain-text session to a TLS/ >+SSL-encrypted session. Normally (with this setting set to try) BitlBee will do >+this, if possible. >+ >+If you want to force BitlBee to use TLS sessions only (and to give up if that >+doesn't seem to be possible) you can set this setting to true. Set it to false >+if you want the session to remain plain-text. >+ >+to_char >+ >+Type: string >+ >+It's customary that messages meant for one specific person on an IRC channel >+are prepended by his/her alias followed by a colon ':'. BitlBee does this by >+default. If you prefer a different character, you can set it using set to_char. >+ >+Please note that this setting is only used for incoming messages. For outgoing >+messages you can use ':' (colon) or ',' to separate the destination nick from >+the message, and this is not configurable. >+ >+typing_notice >+ >+Type: boolean >+ >+Sends you a /notice when a user starts typing a message (if the protocol >+supports it, MSN for example). This is a bug, not a feature. (But please don't >+report it.. ;-) You don't want to use it. Really. In fact the >+typing-notification is just one of the least useful 'innovations' ever. It's >+just there because some guy will probably ask me about it anyway. ;-) >+ >+web_aware >+ >+Type: string >+ >+ICQ allows people to see if you're on-line via a CGI-script. (http:// >+status.icq.com/online.gif?icq=UIN) This can be nice to put on your website, but >+it seems that spammers also use it to see if you're online without having to >+add you to their contact list. So to prevent ICQ spamming, recent versions of >+BitlBee disable this feature by default. >+ >+Unless you really intend to use this feature somewhere (on forums or maybe a >+website), it's probably better to keep this setting disabled. >+ >+xmlconsole >+ >+Type: boolean >+ >+The Jabber module allows you to add a buddy xmlconsole to your contact list, >+which will then show you the raw XMPP stream between you and the server. You >+can also send XMPP packets to this buddy, which will then be sent to the >+server. >+ >+If you want to enable this XML console permanently (and at login time already), >+you can set this setting. >+ >+rename - Rename (renick) a buddy >+ >+Syntax: >+ >+rename <oldnick> <newnick> >+ >+Renick a user in your buddy list. Very useful, in fact just very important, if >+you got a lot of people with stupid account names (or hard ICQ numbers). >+ >+< itsme> rename itsme_ you >+ * itsme_ is now known as you >+ >+yes - Accept a request >+ >+Syntax: >+ >+yes [<number>] >+ >+Sometimes an IM-module might want to ask you a question. (Accept this user as >+your buddy or not?) To accept a question, use the yes command. >+ >+By default, this answers the first unanswered question. You can also specify a >+different question as an argument. You can use the qlist command for a list of >+questions. >+ >+no - Deny a request >+ >+Syntax: >+ >+no [<number>] >+ >+Sometimes an IM-module might want to ask you a question. (Accept this user as >+your buddy or not?) To reject a question, use the no command. >+ >+By default, this answers the first unanswered question. You can also specify a >+different question as an argument. You can use the qlist command for a list of >+questions. >+ >+qlist - List all the unanswered questions root asked >+ >+Syntax: >+ >+qlist >+ >+This gives you a list of all the unanswered questions from root. >+ >+register - Register yourself >+ >+Syntax: >+ >+register <password> >+ >+BitlBee can save your settings so you won't have to enter all your IM passwords >+every time you log in. If you want the Bee to save your settings, use the >+register command. >+ >+Please do pick a secure password, don't just use your nick as your password. >+Please note that IRC is not an encrypted protocol, so the passwords still go >+over the network in plaintext. Evil people with evil sniffers will read it all. >+(So don't use your root password.. ;-) >+ >+To identify yourself in later sessions, you can use the identify command. To >+change your password later, you can use the set password command. >+ >+identify - Identify yourself with your password >+ >+Syntax: >+ >+identify <password> >+ >+BitlBee saves all your settings (contacts, accounts, passwords) on-server. To >+prevent other users from just logging in as you and getting this information, >+you'll have to identify yourself with your password. You can register this >+password using the register command. >+ >+Once you're registered, you can change your password using set password >+<password>. >+ >+drop - Drop your account >+ >+Syntax: >+ >+drop <password> >+ >+Drop your BitlBee registration. Your account files will be removed and your >+password will be forgotten. For obvious security reasons, you have to specify >+your NickServ password to make this command work. >+ >+blist - List all the buddies in your contact list >+ >+Syntax: >+ >+blist [all|online|offline|away] >+ >+You can get a better readable buddy list using the blist command. If you want a >+complete list (including the offline users) you can use the all argument. >+ >+nick - Change friendly name, nick >+ >+Syntax: >+ >+nick <connection> [<new nick>] >+nick >+ >+This command allows to set the friendly name of an im account. If no new name >+is specified the command will report the current name. When the name contains >+spaces, don't forget to quote the whole nick in double quotes. Currently this >+command is only supported by the MSN protocol. >+ >+It is recommended to use the per-account display_name setting to read and >+change this information. The nick command is deprecated. >+ >+< wouter> nick 1 "Wouter Paesen" >+< root> Setting your name on connection 1 to `Wouter Paesen' >+ >+join_chat - Join a named groupchat/conference room >+ >+Syntax: >+ >+join_chat <connection> <room name> [<channel name>] [<room nickname>] [<password>] >+ >+On most IM-networks groupchats can be started using the /join command. (/join # >+foo to start a chatroom with you and foo) This doesn't work with names >+groupchats though (which exist on Jabber networks and AIM, for example), >+instead you can use this command. >+ >+The first two arguments are required. room name is the name of the chatroom on >+the IM-network. channel name is the IRC channel name BitlBee should map this >+to. room nickname is the nickname you want to have in this channel. If you >+don't give these options, BitlBee will do the right guesses. >+ >+The following command will join you to the chatroom called >+bitlbee@conference.bitlbee.org. The channel will be called &bitlbee-help >+because &bitlbee will already be in use. Your nickname will be help-me. >+ >+< wilmer> join_chat jabber bitlbee@conference.bitlbee.org &bitlbee-help help-me >+ >+Chapter 6. Misc Stuff >+ >+Table of Contents >+ >+Smileys >+Groupchats >+Creating groupchats >+Groupchat channel names >+Away states >+ >+Smileys >+ >+All MSN smileys (except one) are case insensitive and work without the nose >+too. >+ >+(Y) >+ >+ Thumbs up >+ >+(N) >+ >+ Thumbs down >+ >+(B) >+ >+ Beer mug >+ >+(D) >+ >+ Martini glass >+ >+(X) >+ >+ Girl >+ >+(Z) >+ >+ Boy >+ >+(6) >+ >+ Devil smiley >+ >+:-[ >+ >+ Vampire bat >+ >+(}) >+ >+ Right hug >+ >+({) >+ >+ Left hug >+ >+(M) >+ >+ MSN Messenger or Windows Messenger icon (think a BitlBee logo here ;) >+ >+:-S >+ >+ Crooked smiley (Confused smiley) >+ >+:-$ >+ >+ Embarrassed smiley >+ >+(H) >+ >+ Smiley with sunglasses >+ >+:-@ >+ >+ Angry smiley >+ >+(A) >+ >+ Angel smiley >+ >+(L) >+ >+ Red heart (Love) >+ >+(U) >+ >+ Broken heart >+ >+(K) >+ >+ Red lips (Kiss) >+ >+(G) >+ >+ Gift with bow >+ >+(F) >+ >+ Red rose >+ >+(W) >+ >+ Wilted rose >+ >+(P) >+ >+ Camera >+ >+(~) >+ >+ Film strip >+ >+(T) >+ >+ Telephone receiver >+ >+(@) >+ >+ Cat face >+ >+(&) >+ >+ Dog's head >+ >+(C) >+ >+ Coffee cup >+ >+(I) >+ >+ Light bulb >+ >+(S) >+ >+ Half-moon (Case sensitive!) >+ >+(*) >+ >+ Star >+ >+(8) >+ >+ Musical eighth note >+ >+(E) >+ >+ Envelope >+ >+(^) >+ >+ Birthday cake >+ >+(O) >+ >+ Clock >+ >+This list was extracted from http://help.msn.com/!data/en_us/data/ >+messengerv50.its51/$content$/EMOTICONS.HTM?H_APP=. >+ >+Groupchats >+ >+Since version 0.8x, BitlBee supports groupchats on the MSN and Yahoo! networks. >+This text will try to explain you how they work. >+ >+As soon as someone invites you into a groupchat, you will be force-joined or >+invited (depending on the protocol) into a new virtual channel with all the >+people in there. You can leave the channel at any time, just like you would >+close the window in regular IM clients. Please note that root-commands don't >+work in groupchat channels, they only work in the control channel (or to root >+directly). >+ >+Of course you can also create your own groupchats. Type help groupchats2 to see >+how. >+ >+Creating groupchats >+ >+If you want to start a groupchat with the person jim_msn in it, just join the >+channel #jim_msn. BitlBee will refuse to join you to the channel with that >+name, but it will create a new virtual channel with root, you and jim_msn in >+it. >+ >+Of course a channel with only two people isn't really exciting yet. So the next >+step is to invite some other people to the channel. For this, you can use the / >+invite command of your IRC client. Please do keep in mind that all the people >+have to be on the same network and contact list! You can't invite Yahoo! >+buddies into an MSN groupchat. >+ >+Some protocols (like Jabber) also support named groupchats. BitlBee now >+supports these too. You can use the join_chat command to join them. See help >+join_chat for more information. >+ >+This is all you'll probably need to know. If you have any problems, please read >+help groupchats3. >+ >+Groupchat channel names >+ >+Obviously the (numbered) channel names don't make a lot of sense. Problem is >+that groupchats usually don't have names at all in the IM-world, while IRC >+insists on a name. So BitlBee just generates something random, just don't pay >+attention to it. :-) >+ >+Please also note that BitlBee doesn't support groupchats for all protocols yet. >+BitlBee will tell you so. Support for other protocols will hopefully come >+later. >+ >+Away states >+ >+As you might've expected, you can just use the /away command in your IRC client >+to set an away-state. BitlBee supports most away-states supported by the >+protocols. >+ >+Not all away states are supported by all protocols, and some protocols have >+different names for them. BitlBee will try to pick the best available alias >+from this list for every connection: >+ >+Away from computer, Away, Extended away >+NA, N/A, Not available >+Busy, Do not disturb, DND, Occupied >+Be right back, BRB >+On the phone, Phone, On phone >+Out to lunch, Lunch, Food >+ >+So /away Food will set your state to "Out to lunch" on your MSN connection, and >+for most other connections the default, "Away" or "Away from computer" will be >+chosen. >+ >+You can also add more information to your away message. Setting it to "Busy - >+Fixing BitlBee bugs" will set your IM-away-states to Busy, but your away >+message will be more descriptive for people on IRC. Protocols like Yahoo! and >+Jabber will also show this complete away message to your buddies. >+ >diff -urN bitlbee-1.2/irc.c bitlbee-1.2-jabberft/irc.c >--- bitlbee-1.2/irc.c 2008-02-07 22:25:16.000000000 +0100 >+++ bitlbee-1.2-jabberft/irc.c 2008-04-14 18:53:33.000000000 +0200 >@@ -27,6 +27,10 @@ > #include "bitlbee.h" > #include "crypting.h" > #include "ipc.h" >+#include "dcc.h" >+ >+#include <regex.h> >+#include <netinet/in.h> > > static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); > >@@ -41,6 +45,35 @@ > return NULL; > } > >+static char *set_eval_charset( set_t *set, char *value ) >+{ >+ irc_t *irc = set->data; >+ GIConv ic, oc; >+ >+ if( g_strcasecmp( value, "none" ) == 0 ) >+ value = g_strdup( "utf-8" ); >+ >+ if( ( ic = g_iconv_open( "utf-8", value ) ) == (GIConv) -1 ) >+ { >+ return NULL; >+ } >+ if( ( oc = g_iconv_open( value, "utf-8" ) ) == (GIConv) -1 ) >+ { >+ g_iconv_close( ic ); >+ return NULL; >+ } >+ >+ if( irc->iconv != (GIConv) -1 ) >+ g_iconv_close( irc->iconv ); >+ if( irc->oconv != (GIConv) -1 ) >+ g_iconv_close( irc->oconv ); >+ >+ irc->iconv = ic; >+ irc->oconv = oc; >+ >+ return value; >+} >+ > irc_t *irc_new( int fd ) > { > irc_t *irc; >@@ -64,6 +97,9 @@ > irc->mynick = g_strdup( ROOT_NICK ); > irc->channel = g_strdup( ROOT_CHAN ); > >+ irc->iconv = (GIConv) -1; >+ irc->oconv = (GIConv) -1; >+ > if( global.conf->hostname ) > { > irc->myhost = g_strdup( global.conf->hostname ); >@@ -118,6 +154,7 @@ > set_add( &irc->set, "password", NULL, passchange, irc ); > set_add( &irc->set, "private", "true", set_eval_bool, irc ); > set_add( &irc->set, "query_order", "lifo", NULL, irc ); >+ set_add( &irc->set, "root_nick", irc->mynick, set_eval_root_nick, irc ); > set_add( &irc->set, "save_on_quit", "true", set_eval_bool, irc ); > set_add( &irc->set, "simulate_netsplit", "true", set_eval_bool, irc ); > set_add( &irc->set, "strip_html", "true", NULL, irc ); >@@ -126,6 +163,9 @@ > > conf_loaddefaults( irc ); > >+ /* Evaluator sets the iconv/oconv structures. */ >+ set_eval_charset( set_find( &irc->set, "charset" ), set_getstr( &irc->set, "charset" ) ); >+ > return( irc ); > } > >@@ -163,12 +203,14 @@ > irc->status |= USTATUS_SHUTDOWN; > if( irc->sendbuffer && !immed ) > { >- /* We won't read from this socket anymore. Instead, we'll connect a timer >- to it that should shut down the connection in a second, just in case >- bitlbee_.._write doesn't do it first. */ >+ /* Set up a timeout event that should shut down the connection >+ in a second, just in case ..._write doesn't do it first. */ > > b_event_remove( irc->r_watch_source_id ); >- irc->r_watch_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc ); >+ irc->r_watch_source_id = 0; >+ >+ b_event_remove( irc->ping_source_id ); >+ irc->ping_source_id = b_timeout_add( 1000, (b_event_handler) irc_free, irc ); > } > else > { >@@ -184,9 +226,8 @@ > } > > /* Because we have no garbage collection, this is quite annoying */ >-void irc_free(irc_t * irc) >+void irc_free( irc_t * irc ) > { >- account_t *account; > user_t *user, *usertmp; > > log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); >@@ -195,76 +236,86 @@ > if( storage_save( irc, TRUE ) != STORAGE_OK ) > irc_usermsg( irc, "Error while saving settings!" ); > >- closesocket( irc->fd ); >- >- if( irc->ping_source_id > 0 ) >- b_event_remove( irc->ping_source_id ); >- b_event_remove( irc->r_watch_source_id ); >- if( irc->w_watch_source_id > 0 ) >- b_event_remove( irc->w_watch_source_id ); >- > irc_connection_list = g_slist_remove( irc_connection_list, irc ); > >- for (account = irc->accounts; account; account = account->next) { >- if (account->ic) { >- imc_logout(account->ic, TRUE); >- } else if (account->reconnect) { >- cancel_auto_reconnect(account); >- } >- } >- >- g_free(irc->sendbuffer); >- g_free(irc->readbuffer); >- >- g_free(irc->nick); >- g_free(irc->user); >- g_free(irc->host); >- g_free(irc->realname); >- g_free(irc->password); >- >- g_free(irc->myhost); >- g_free(irc->mynick); >- >- g_free(irc->channel); >- >- while (irc->queries != NULL) >- query_del(irc, irc->queries); >- >- while (irc->accounts) >- if (irc->accounts->ic == NULL) >- account_del(irc, irc->accounts); >+ while( irc->accounts ) >+ { >+ if( irc->accounts->ic ) >+ imc_logout( irc->accounts->ic, FALSE ); >+ else if( irc->accounts->reconnect ) >+ cancel_auto_reconnect( irc->accounts ); >+ >+ if( irc->accounts->ic == NULL ) >+ account_del( irc, irc->accounts ); > else > /* Nasty hack, but account_del() doesn't work in this > case and we don't want infinite loops, do we? ;-) */ > irc->accounts = irc->accounts->next; >+ } >+ >+ while( irc->queries != NULL ) >+ query_del( irc, irc->queries ); > >- while (irc->set) >- set_del(&irc->set, irc->set->key); >+ while( irc->set ) >+ set_del( &irc->set, irc->set->key ); > >- if (irc->users != NULL) { >+ if (irc->users != NULL) >+ { > user = irc->users; >- while (user != NULL) { >- g_free(user->nick); >- g_free(user->away); >- g_free(user->handle); >- if(user->user!=user->nick) g_free(user->user); >- if(user->host!=user->nick) g_free(user->host); >- if(user->realname!=user->nick) g_free(user->realname); >- b_event_remove(user->sendbuf_timer); >+ while( user != NULL ) >+ { >+ g_free( user->nick ); >+ g_free( user->away ); >+ g_free( user->handle ); >+ if( user->user != user->nick ) g_free( user->user ); >+ if( user->host != user->nick ) g_free( user->host ); >+ if( user->realname != user->nick ) g_free( user->realname ); >+ b_event_remove( user->sendbuf_timer ); > > usertmp = user; > user = user->next; >- g_free(usertmp); >+ g_free( usertmp ); > } > } > >- g_hash_table_foreach_remove(irc->userhash, irc_free_hashkey, NULL); >- g_hash_table_destroy(irc->userhash); >+ if( irc->ping_source_id > 0 ) >+ b_event_remove( irc->ping_source_id ); >+ if( irc->r_watch_source_id > 0 ) >+ b_event_remove( irc->r_watch_source_id ); >+ if( irc->w_watch_source_id > 0 ) >+ b_event_remove( irc->w_watch_source_id ); >+ >+ closesocket( irc->fd ); >+ irc->fd = -1; >+ >+ g_hash_table_foreach_remove( irc->userhash, irc_free_hashkey, NULL ); >+ g_hash_table_destroy( irc->userhash ); >+ >+ g_hash_table_foreach_remove( irc->watches, irc_free_hashkey, NULL ); >+ g_hash_table_destroy( irc->watches ); >+ >+ if( irc->iconv != (GIConv) -1 ) >+ g_iconv_close( irc->iconv ); >+ if( irc->oconv != (GIConv) -1 ) >+ g_iconv_close( irc->oconv ); >+ >+ g_free( irc->sendbuffer ); >+ g_free( irc->readbuffer ); >+ >+ g_free( irc->nick ); >+ g_free( irc->user ); >+ g_free( irc->host ); >+ g_free( irc->realname ); >+ g_free( irc->password ); >+ >+ g_free( irc->myhost ); >+ g_free( irc->mynick ); >+ >+ g_free( irc->channel ); > >- g_hash_table_foreach_remove(irc->watches, irc_free_hashkey, NULL); >- g_hash_table_destroy(irc->watches); >+ g_free( irc->last_target ); > >- g_free(irc); >+ g_free( irc ); > > if( global.conf->runmode == RUNMODE_INETD || global.conf->runmode == RUNMODE_FORKDAEMON ) > b_main_quit(); >@@ -285,7 +336,7 @@ > > void irc_process( irc_t *irc ) > { >- char **lines, *temp, **cmd, *cs; >+ char **lines, *temp, **cmd; > int i; > > if( irc->readbuffer != NULL ) >@@ -294,11 +345,10 @@ > > for( i = 0; *lines[i] != '\0'; i ++ ) > { >- char conv[IRC_MAX_LINE+1]; >+ char *conv = NULL; > >- /* [WvG] Because irc_tokenize splits at every newline, the lines[] list >- should end with an empty string. This is why this actually works. >- Took me a while to figure out, Maurits. :-P */ >+ /* [WvG] If the last line isn't empty, it's an incomplete line and we >+ should wait for the rest to come in before processing it. */ > if( lines[i+1] == NULL ) > { > temp = g_strdup( lines[i] ); >@@ -308,10 +358,14 @@ > break; > } > >- if( ( cs = set_getstr( &irc->set, "charset" ) ) ) >+ if( irc->iconv != (GIConv) -1 ) > { >- conv[IRC_MAX_LINE] = 0; >- if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) == -1 ) >+ gsize bytes_read, bytes_written; >+ >+ conv = g_convert_with_iconv( lines[i], -1, irc->iconv, >+ &bytes_read, &bytes_written, NULL ); >+ >+ if( conv == NULL || bytes_read != strlen( lines[i] ) ) > { > /* GLib can do strange things if things are not in the expected charset, > so let's be a little bit paranoid here: */ >@@ -323,15 +377,18 @@ > "that charset, or tell BitlBee which charset to " > "expect by changing the charset setting. See " > "`help set charset' for more information. Your " >- "message was ignored.", cs ); >- *conv = 0; >+ "message was ignored.", >+ set_getstr( &irc->set, "charset" ) ); >+ >+ g_free( conv ); >+ conv = NULL; > } > else > { > irc_write( irc, ":%s NOTICE AUTH :%s", irc->myhost, >- "Warning: invalid (non-UTF8) characters received at login time." ); >+ "Warning: invalid characters received at login time." ); > >- strncpy( conv, lines[i], IRC_MAX_LINE ); >+ conv = g_strdup( lines[i] ); > for( temp = conv; *temp; temp ++ ) > if( *temp & 0x80 ) > *temp = '?'; >@@ -340,11 +397,15 @@ > lines[i] = conv; > } > >- if( ( cmd = irc_parse_line( lines[i] ) ) == NULL ) >- continue; >- irc_exec( irc, cmd ); >+ if( lines[i] ) >+ { >+ if( ( cmd = irc_parse_line( lines[i] ) ) == NULL ) >+ continue; >+ irc_exec( irc, cmd ); >+ g_free( cmd ); >+ } > >- g_free( cmd ); >+ g_free( conv ); > > /* Shouldn't really happen, but just in case... */ > if( !g_slist_find( irc_connection_list, irc ) ) >@@ -368,42 +429,41 @@ > contains an incomplete line at the end, ends with an empty string. */ > char **irc_tokenize( char *buffer ) > { >- int i, j; >+ int i, j, n = 3; > char **lines; > >- /* Count the number of elements we're gonna need. */ >- for( i = 0, j = 1; buffer[i] != '\0'; i ++ ) >- { >- if( buffer[i] == '\n' ) >- if( buffer[i+1] != '\r' && buffer[i+1] != '\n' ) >- j ++; >- } >- >- /* Allocate j+1 elements. */ >- lines = g_new( char *, j + 1 ); >- >- /* NULL terminate our list. */ >- lines[j] = NULL; >+ /* Allocate n+1 elements. */ >+ lines = g_new( char *, n + 1 ); > > lines[0] = buffer; > >- /* Split the buffer in several strings, using \r\n as our seperator, where \r is optional. >- * Although this is not in the RFC, some braindead ircds (newnet's) use this, so some clients might too. >- */ >- for( i = 0, j = 0; buffer[i] != '\0'; i ++) >+ /* Split the buffer in several strings, and accept any kind of line endings, >+ * knowing that ERC on Windows may send something interesting like \r\r\n, >+ * and surely there must be clients that think just \n is enough... */ >+ for( i = 0, j = 0; buffer[i] != '\0'; i ++ ) > { >- if( buffer[i] == '\n' ) >+ if( buffer[i] == '\r' || buffer[i] == '\n' ) > { >- buffer[i] = '\0'; >+ while( buffer[i] == '\r' || buffer[i] == '\n' ) >+ buffer[i++] = '\0'; >+ >+ lines[++j] = buffer + i; > >- if( i > 0 && buffer[i-1] == '\r' ) >- buffer[i-1] = '\0'; >- if( buffer[i+1] != '\r' && buffer[i+1] != '\n' ) >- lines[++j] = buffer + i + 1; >+ if( j >= n ) >+ { >+ n *= 2; >+ lines = g_renew( char *, lines, n + 1 ); >+ } >+ >+ if( buffer[i] == '\0' ) >+ break; > } > } > >- return( lines ); >+ /* NULL terminate our list. */ >+ lines[++j] = NULL; >+ >+ return lines; > } > > /* Split an IRC-style line into little parts/arguments. */ >@@ -537,31 +597,35 @@ > va_end( params ); > > return; >- > } > > void irc_vawrite( irc_t *irc, char *format, va_list params ) > { > int size; >- char line[IRC_MAX_LINE+1], *cs; >+ char line[IRC_MAX_LINE+1]; > > /* Don't try to write anything new anymore when shutting down. */ > if( irc->status & USTATUS_SHUTDOWN ) > return; > >- line[IRC_MAX_LINE] = 0; >+ memset( line, 0, sizeof( line ) ); > g_vsnprintf( line, IRC_MAX_LINE - 2, format, params ); >- > strip_newlines( line ); >- if( ( cs = set_getstr( &irc->set, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) ) >+ >+ if( irc->oconv != (GIConv) -1 ) > { >- char conv[IRC_MAX_LINE+1]; >+ gsize bytes_read, bytes_written; >+ char *conv; > >- conv[IRC_MAX_LINE] = 0; >- if( do_iconv( "UTF-8", cs, line, conv, 0, IRC_MAX_LINE - 2 ) != -1 ) >- strcpy( line, conv ); >+ conv = g_convert_with_iconv( line, -1, irc->oconv, >+ &bytes_read, &bytes_written, NULL ); >+ >+ if( bytes_read == strlen( line ) ) >+ strncpy( line, conv, IRC_MAX_LINE - 2 ); >+ >+ g_free( conv ); > } >- strcat( line, "\r\n" ); >+ g_strlcat( line, "\r\n", IRC_MAX_LINE + 1 ); > > if( irc->sendbuffer != NULL ) > { >@@ -734,12 +798,27 @@ > u->online = 1; > irc_spawn( irc, u ); > >- irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\nIf you've never used BitlBee before, please do read the help information using the \x02help\x02 command. Lots of FAQs are answered there." ); >+ irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\n" >+ "If you've never used BitlBee before, please do read the help " >+ "information using the \x02help\x02 command. Lots of FAQs are " >+ "answered there.\n" >+ "If you already have an account on this server, just use the " >+ "\x02identify\x02 command to identify yourself." ); > > if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON ) > ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); > > irc->status |= USTATUS_LOGGED_IN; >+ >+ /* This is for bug #209 (use PASS to identify to NickServ). */ >+ if( irc->password != NULL ) >+ { >+ char *send_cmd[] = { "identify", g_strdup( irc->password ), NULL }; >+ >+ irc_setpass( irc, NULL ); >+ root_command( irc, send_cmd ); >+ g_free( send_cmd[1] ); >+ } > } > > void irc_motd( irc_t *irc ) >@@ -994,9 +1073,19 @@ > } > return( 1 ); > } >+ else if( g_strncasecmp( s + 1, "DCC", 3 ) == 0 ) >+ { >+ if( u && u->ic && u->ic->acc->prpl->transfer_request ) >+ { >+ file_transfer_t *ft = dcc_request( u->ic, s + 5 ); >+ if ( ft ) >+ u->ic->acc->prpl->transfer_request( u->ic, ft, u->handle ); >+ } >+ return( 1 ); >+ } > else > { >- irc_usermsg( irc, "Non-ACTION CTCP's aren't supported" ); >+ irc_usermsg( irc, "Supported CTCPs are ACTION, VERSION, PING, TYPING, DCC" ); > return( 0 ); > } > } >diff -urN bitlbee-1.2/irc_commands.c bitlbee-1.2-jabberft/irc_commands.c >--- bitlbee-1.2/irc_commands.c 2008-03-16 18:16:54.000000000 +0100 >+++ bitlbee-1.2-jabberft/irc_commands.c 2008-04-14 18:53:28.000000000 +0200 >@@ -29,7 +29,19 @@ > > static void irc_cmd_pass( irc_t *irc, char **cmd ) > { >- if( global.conf->auth_pass && >+ if( irc->status & USTATUS_LOGGED_IN ) >+ { >+ char *send_cmd[] = { "identify", cmd[1], NULL }; >+ >+ /* We're already logged in, this client seems to send the PASS >+ command last. (Possibly it won't send it at all if it turns >+ out we don't require it, which will break this feature.) >+ Try to identify using the given password. */ >+ return root_command( irc, send_cmd ); >+ } >+ /* Handling in pre-logged-in state, first see if this server is >+ password-protected: */ >+ else if( global.conf->auth_pass && > ( strncmp( global.conf->auth_pass, "md5:", 4 ) == 0 ? > md5_verify_password( cmd[1], global.conf->auth_pass + 4 ) == 0 : > strcmp( cmd[1], global.conf->auth_pass ) == 0 ) ) >@@ -37,10 +49,16 @@ > irc->status |= USTATUS_AUTHORIZED; > irc_check_login( irc ); > } >- else >+ else if( global.conf->auth_pass ) > { > irc_reply( irc, 464, ":Incorrect password" ); > } >+ else >+ { >+ /* Remember the password and try to identify after USER/NICK. */ >+ irc_setpass( irc, cmd[1] ); >+ irc_check_login( irc ); >+ } > } > > static void irc_cmd_user( irc_t *irc, char **cmd ) >@@ -259,8 +277,7 @@ > > if( cmd[1] != irc->last_target ) > { >- if( irc->last_target ) >- g_free( irc->last_target ); >+ g_free( irc->last_target ); > irc->last_target = g_strdup( cmd[1] ); > } > } >@@ -580,7 +597,7 @@ > } > > static const command_t irc_commands[] = { >- { "pass", 1, irc_cmd_pass, IRC_CMD_PRE_LOGIN }, >+ { "pass", 1, irc_cmd_pass, 0 }, > { "user", 4, irc_cmd_user, IRC_CMD_PRE_LOGIN }, > { "nick", 1, irc_cmd_nick, 0 }, > { "quit", 0, irc_cmd_quit, 0 }, >diff -urN bitlbee-1.2/irc.h bitlbee-1.2-jabberft/irc.h >--- bitlbee-1.2/irc.h 2008-02-02 22:46:03.000000000 +0100 >+++ bitlbee-1.2-jabberft/irc.h 2008-04-14 18:53:33.000000000 +0200 >@@ -60,6 +60,7 @@ > int pinging; > char *sendbuffer; > char *readbuffer; >+ GIConv iconv, oconv; > > int sentbytes; > time_t oldtime; >@@ -68,7 +69,9 @@ > char *user; > char *host; > char *realname; >- char *password; >+ char *password; /* HACK: Used to save the user's password, but before >+ logging in, this may contain a password we should >+ send to identify after USER/NICK are received. */ > > char umode[8]; > >@@ -83,6 +86,7 @@ > > struct query *queries; > struct account *accounts; >+ GSList *file_transfers; > > struct __USER *users; > GHashTable *userhash; >diff -urN bitlbee-1.2/lib/arc.h bitlbee-1.2-jabberft/lib/arc.h >--- bitlbee-1.2/lib/arc.h 2008-03-16 14:07:52.000000000 +0100 >+++ bitlbee-1.2-jabberft/lib/arc.h 2008-04-14 18:53:32.000000000 +0200 >@@ -30,6 +30,10 @@ > unsigned char i, j; > }; > >+#ifndef G_GNUC_MALLOC >+#define G_GNUC_MALLOC >+#endif >+ > G_GNUC_MALLOC struct arc_state *arc_keymaker( unsigned char *key, int kl, int cycles ); > unsigned char arc_getbyte( struct arc_state *st ); > int arc_encode( char *clear, int clear_len, unsigned char **crypt, char *password, int pad_to ); >diff -urN bitlbee-1.2/lib/events_glib.c bitlbee-1.2-jabberft/lib/events_glib.c >--- bitlbee-1.2/lib/events_glib.c 2007-12-30 00:51:46.000000000 +0100 >+++ bitlbee-1.2-jabberft/lib/events_glib.c 2008-04-14 18:53:32.000000000 +0200 >@@ -50,11 +50,12 @@ > gpointer data; > } GaimIOClosure; > >-static GMainLoop *loop; >+static GMainLoop *loop = NULL; > > void b_main_init() > { >- loop = g_main_new( FALSE ); >+ if( loop == NULL ) >+ loop = g_main_new( FALSE ); > } > > void b_main_run() >diff -urN bitlbee-1.2/lib/proxy.c bitlbee-1.2-jabberft/lib/proxy.c >--- bitlbee-1.2/lib/proxy.c 2007-12-29 00:18:36.000000000 +0100 >+++ bitlbee-1.2-jabberft/lib/proxy.c 2008-04-14 18:53:32.000000000 +0200 >@@ -529,7 +529,7 @@ > { > struct PHB *phb; > >- if (!host || !port || (port == -1) || !func || strlen(host) > 128) { >+ if (!host || port <= 0 || !func || strlen(host) > 128) { > return -1; > } > >@@ -537,7 +537,7 @@ > phb->func = func; > phb->data = data; > >- if ((proxytype == PROXY_NONE) || strlen(proxyhost) > 0 || !proxyport || (proxyport == -1)) >+ if (proxytype == PROXY_NONE || !proxyhost[0] || proxyport <= 0) > return proxy_connect_none(host, port, phb); > else if (proxytype == PROXY_HTTP) > return proxy_connect_http(host, port, phb); >diff -urN bitlbee-1.2/lib/ssl_client.h bitlbee-1.2-jabberft/lib/ssl_client.h >--- bitlbee-1.2/lib/ssl_client.h 2007-06-30 23:18:42.000000000 +0200 >+++ bitlbee-1.2-jabberft/lib/ssl_client.h 2008-04-14 18:53:32.000000000 +0200 >@@ -59,6 +59,9 @@ > G_MODULE_EXPORT int ssl_read( void *conn, char *buf, int len ); > G_MODULE_EXPORT int ssl_write( void *conn, const char *buf, int len ); > >+/* See ssl_openssl.c for an explanation. */ >+G_MODULE_EXPORT int ssl_pending( void *conn ); >+ > /* Abort the SSL connection and disconnect the socket. Do not use close() > directly, both the SSL library and the peer will be unhappy! */ > G_MODULE_EXPORT void ssl_disconnect( void *conn_ ); >diff -urN bitlbee-1.2/lib/ssl_gnutls.c bitlbee-1.2-jabberft/lib/ssl_gnutls.c >--- bitlbee-1.2/lib/ssl_gnutls.c 2008-03-15 18:32:14.000000000 +0100 >+++ bitlbee-1.2-jabberft/lib/ssl_gnutls.c 2008-04-14 18:53:33.000000000 +0200 >@@ -210,6 +210,12 @@ > return st; > } > >+/* See ssl_openssl.c for an explanation. */ >+int ssl_pending( void *conn ) >+{ >+ return 0; >+} >+ > void ssl_disconnect( void *conn_ ) > { > struct scd *conn = conn_; >diff -urN bitlbee-1.2/lib/ssl_nss.c bitlbee-1.2-jabberft/lib/ssl_nss.c >--- bitlbee-1.2/lib/ssl_nss.c 2007-06-30 23:18:42.000000000 +0200 >+++ bitlbee-1.2-jabberft/lib/ssl_nss.c 2008-04-14 18:53:32.000000000 +0200 >@@ -168,6 +168,12 @@ > return( PR_Write ( ((struct scd*)conn)->prfd, buf, len ) ); > } > >+/* See ssl_openssl.c for an explanation. */ >+int ssl_pending( void *conn ) >+{ >+ return 0; >+} >+ > void ssl_disconnect( void *conn_ ) > { > struct scd *conn = conn_; >diff -urN bitlbee-1.2/lib/ssl_openssl.c bitlbee-1.2-jabberft/lib/ssl_openssl.c >--- bitlbee-1.2/lib/ssl_openssl.c 2007-06-30 23:18:42.000000000 +0200 >+++ bitlbee-1.2-jabberft/lib/ssl_openssl.c 2008-04-14 18:53:32.000000000 +0200 >@@ -61,16 +61,16 @@ > struct scd *conn = g_new0( struct scd, 1 ); > > conn->fd = proxy_connect( host, port, ssl_connected, conn ); >- conn->func = func; >- conn->data = data; >- conn->inpa = -1; >- > if( conn->fd < 0 ) > { > g_free( conn ); > return NULL; > } > >+ conn->func = func; >+ conn->data = data; >+ conn->inpa = -1; >+ > return conn; > } > >@@ -230,6 +230,21 @@ > return st; > } > >+/* Only OpenSSL *really* needs this (and well, maybe NSS). See for more info: >+ http://www.gnu.org/software/gnutls/manual/gnutls.html#index-gnutls_005frecord_005fcheck_005fpending-209 >+ http://www.openssl.org/docs/ssl/SSL_pending.html >+ >+ Required because OpenSSL empties the TCP buffer completely but doesn't >+ necessarily give us all the unencrypted data. >+ >+ Returns 0 if there's nothing left or if we don't have to care (GnuTLS), >+ 1 if there's more data. */ >+int ssl_pending( void *conn ) >+{ >+ return ( ((struct scd*)conn) && ((struct scd*)conn)->established ) ? >+ SSL_pending( ((struct scd*)conn)->ssl ) > 0 : 0; >+} >+ > void ssl_disconnect( void *conn_ ) > { > struct scd *conn = conn_; >diff -urN bitlbee-1.2/Makefile bitlbee-1.2-jabberft/Makefile >--- bitlbee-1.2/Makefile 2008-03-02 18:10:16.000000000 +0100 >+++ bitlbee-1.2-jabberft/Makefile 2008-04-14 18:55:52.000000000 +0200 >@@ -9,8 +9,8 @@ > -include Makefile.settings > > # Program variables >-objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o user.o >-headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h lib/events.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/nogaim.h >+objects = account.o bitlbee.o conf.o crypting.o help.o ipc.o irc.o irc_commands.o log.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) unix.o user.o dcc.o >+headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h dcc.h lib/events.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/nogaim.h protocols/ft.h > subdirs = lib protocols > > # Expansion of variables >diff -urN bitlbee-1.2/protocols/ft.h bitlbee-1.2-jabberft/protocols/ft.h >--- bitlbee-1.2/protocols/ft.h 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/ft.h 2008-04-14 18:53:32.000000000 +0200 >@@ -0,0 +1,173 @@ >+/********************************************************************\ >+* BitlBee -- An IRC to other IM-networks gateway * >+* * >+* Copyright 2006 Marijn Kruisselbrink and others * >+\********************************************************************/ >+ >+/* Generic file transfer header */ >+ >+/* >+ This program is free software; you can redistribute it and/or modify >+ it under the terms of the GNU General Public License as published by >+ the Free Software Foundation; either version 2 of the License, or >+ (at your option) any later version. >+ >+ This program is distributed in the hope that it will be useful, >+ but WITHOUT ANY WARRANTY; without even the implied warranty of >+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ GNU General Public License for more details. >+ >+ You should have received a copy of the GNU General Public License with >+ the Debian GNU/Linux distribution in /usr/share/common-licenses/GPL; >+ if not, write to the Free Software Foundation, Inc., 59 Temple Place, >+ Suite 330, Boston, MA 02111-1307 USA >+*/ >+ >+#ifndef _FT_H >+#define _FT_H >+ >+/* >+ * One buffer is needed for each transfer. The receiver stores a message >+ * in it and gives it to the sender. The sender will stall the receiver >+ * till the buffer has been sent out. >+ */ >+#define FT_BUFFER_SIZE 2048 >+ >+typedef enum { >+ FT_STATUS_LISTENING = 1, >+ FT_STATUS_TRANSFERRING = 2, >+ FT_STATUS_FINISHED = 4, >+ FT_STATUS_CANCELED = 8, >+ FT_STATUS_CONNECTING = 16 >+} file_status_t; >+ >+/* >+ * This structure holds all irc specific information regarding an incoming (from the point of view of >+ * the irc client) file transfer. New instances of this struct should only be created by calling the >+ * imcb_file_send_start() method, which will initialize most of the fields. The data field and the various >+ * methods are zero-initialized. Instances will automatically be deleted once the transfer is completed, >+ * canceled, or the connection to the irc client has been lost (note that also if only the irc connection >+ * and not the file transfer connection is lost, the file transfer will still be canceled and freed). >+ * >+ * The following (poor ascii-art) diagram illustrates what methods are called for which status-changes: >+ * >+ * /-----------\ /----------\ >+ * -------> | LISTENING | -----------------> | CANCELED | >+ * \-----------/ [canceled,]free \----------/ >+ * | >+ * | accept >+ * V >+ * /------ /-------------\ /------------------------\ >+ * out_of_data | | TRANSFERING | -----------------> | TRANSFERING | CANCELED | >+ * \-----> \-------------/ [canceled,]free \------------------------/ >+ * | >+ * | finished,free >+ * V >+ * /------------------------\ >+ * | TRANSFERING | FINISHED | >+ * \------------------------/ >+ */ >+typedef struct file_transfer { >+ >+ /* Are we sending something? */ >+ int sending; >+ >+ /* >+ * The current status of this file transfer. >+ */ >+ file_status_t status; >+ >+ /* >+ * file size >+ */ >+ size_t file_size; >+ >+ /* >+ * Number of bytes that have been successfully transferred. >+ */ >+ size_t bytes_transferred; >+ >+ /* >+ * Time started. Used to calculate kb/s. >+ */ >+ time_t started; >+ >+ /* >+ * file name >+ */ >+ char *file_name; >+ >+ /* >+ * A unique local ID for this file transfer. >+ */ >+ unsigned int local_id; >+ >+ /* >+ * IM-protocol specific data associated with this file transfer. >+ */ >+ gpointer data; >+ >+ /* >+ * Private data. >+ */ >+ gpointer priv; >+ >+ /* >+ * If set, called after succesful connection setup. >+ */ >+ void (*accept) ( struct file_transfer *file ); >+ >+ /* >+ * If set, called when the transfer is canceled or finished. >+ * Subsequently, this structure will be freed. >+ * >+ */ >+ void (*free) ( struct file_transfer *file ); >+ >+ /* >+ * If set, called when the transfer is finished and successful. >+ */ >+ void (*finished) ( struct file_transfer *file ); >+ >+ /* >+ * If set, called when the transfer is canceled. >+ * ( canceled either by the transfer implementation or by >+ * a call to imcb_file_canceled ) >+ */ >+ void (*canceled) ( struct file_transfer *file, char *reason ); >+ >+ /* >+ * called by the sending side to indicate that it is writable. >+ * The callee should check if data is available and call the >+ * function(as seen below) if that is the case. >+ */ >+ gboolean (*write_request) ( struct file_transfer *file ); >+ >+ /* >+ * When sending files, protocols register this function to receive data. >+ * This should only be called once after write_request is called. The caller >+ * should not read more data until write_request is called again. This technique >+ * avoids buffering. >+ */ >+ gboolean (*write) (struct file_transfer *file, char *buffer, unsigned int len ); >+ >+ /* The send buffer associated with this transfer. >+ * Since receivers always wait for a write_request call one is enough. >+ */ >+ char buffer[FT_BUFFER_SIZE]; >+ >+} file_transfer_t; >+ >+/* >+ * This starts a file transfer from bitlbee to the user. >+ */ >+file_transfer_t *imcb_file_send_start( struct im_connection *ic, char *user_nick, char *file_name, size_t file_size ); >+ >+/* >+ * This should be called by a protocol when the transfer is canceled. Note that >+ * the canceled() and free() callbacks given in file will be called by this function. >+ */ >+void imcb_file_canceled( file_transfer_t *file, char *reason ); >+ >+gboolean imcb_file_recv_start( file_transfer_t *ft ); >+#endif >diff -urN bitlbee-1.2/protocols/jabber/io.c bitlbee-1.2-jabberft/protocols/jabber/io.c >--- bitlbee-1.2/protocols/jabber/io.c 2008-02-16 23:39:47.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/io.c 2008-04-14 18:53:32.000000000 +0200 >@@ -240,8 +240,13 @@ > return FALSE; > } > >- /* EAGAIN/etc or a successful read. */ >- return TRUE; >+ if( ssl_pending( jd->ssl ) ) >+ /* OpenSSL empties the TCP buffers completely but may keep some >+ data in its internap buffers. select() won't see that, but >+ ssl_pending() does. */ >+ return jabber_read_callback( data, fd, cond ); >+ else >+ return TRUE; > } > > gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond ) >diff -urN bitlbee-1.2/protocols/jabber/iq.c bitlbee-1.2-jabberft/protocols/jabber/iq.c >--- bitlbee-1.2/protocols/jabber/iq.c 2008-02-16 18:38:18.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/iq.c 2008-04-14 18:53:32.000000000 +0200 >@@ -89,14 +89,17 @@ > xt_add_attr( reply, "id", s ); > pack = 0; > } >- else if( strcmp( s, XMLNS_DISCOVER ) == 0 ) >+ else if( strcmp( s, XMLNS_DISCO_INFO ) == 0 ) > { >- const char *features[] = { XMLNS_DISCOVER, >+ const char *features[] = { XMLNS_DISCO_INFO, > XMLNS_VERSION, > XMLNS_TIME, > XMLNS_CHATSTATES, > XMLNS_MUC, > XMLNS_PING, >+ XMLNS_SI, >+ XMLNS_BYTESTREAMS, >+ XMLNS_FILETRANSFER, > NULL }; > const char **f; > >@@ -116,24 +119,26 @@ > else > { > xt_free_node( reply ); >- reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel" ); >+ reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel", NULL ); > pack = 0; > } > } > else if( strcmp( type, "set" ) == 0 ) > { >- if( !( c = xt_find_node( node->children, "query" ) ) || >+ if( ( c = xt_find_node( node->children, "si" ) ) && >+ ( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_SI ) == 0 ) ) >+ { >+ return jabber_si_handle_request( ic, node, c ); >+ } else if( !( c = xt_find_node( node->children, "query" ) ) || > !( s = xt_find_attr( c, "xmlns" ) ) ) > { > imcb_log( ic, "Warning: Received incomplete IQ-%s packet", type ); > return XT_HANDLED; >- } >- >+ } else if( strcmp( s, XMLNS_ROSTER ) == 0 ) >+ { > /* This is a roster push. XMPP servers send this when someone > was added to (or removed from) the buddy list. AFAIK they're > sent even if we added this buddy in our own session. */ >- if( strcmp( s, XMLNS_ROSTER ) == 0 ) >- { > int bare_len = strlen( ic->acc->user ); > > if( ( s = xt_find_attr( node, "from" ) ) == NULL || >@@ -150,14 +155,17 @@ > imcb_log( ic, "Warning: %s tried to fake a roster push!", s ? s : "(unknown)" ); > > xt_free_node( reply ); >- reply = jabber_make_error_packet( node, "not-allowed", "cancel" ); >+ reply = jabber_make_error_packet( node, "not-allowed", "cancel", NULL ); > pack = 0; > } >- } >- else >+ } else if( strcmp( s, XMLNS_BYTESTREAMS ) == 0 ) >+ { >+ /* Bytestream Request (stage 2 of file transfer) */ >+ return jabber_bs_recv_request( ic, node, c ); >+ } else > { > xt_free_node( reply ); >- reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel" ); >+ reply = jabber_make_error_packet( node, "feature-not-implemented", "cancel", NULL ); > pack = 0; > } > } >@@ -592,3 +600,163 @@ > xt_free_node( node ); > return st; > } >+ >+xt_status jabber_iq_parse_features( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ); >+ >+xt_status jabber_iq_query_features( struct im_connection *ic, char *bare_jid ) >+{ >+ struct xt_node *node, *query; >+ struct jabber_buddy *bud; >+ >+ if( ( bud = jabber_buddy_by_jid( ic, bare_jid , 0 ) ) == NULL ) >+ { >+ /* Who cares about the unknown... */ >+ imcb_log( ic, "Couldnt find the man: %s", bare_jid); >+ return 0; >+ } >+ >+ if( bud->features ) /* been here already */ >+ return XT_HANDLED; >+ >+ node = xt_new_node( "query", NULL, NULL ); >+ xt_add_attr( node, "xmlns", XMLNS_DISCO_INFO ); >+ >+ if( !( query = jabber_make_packet( "iq", "get", bare_jid, node ) ) ) >+ { >+ imcb_log( ic, "WARNING: Couldn't generate feature query" ); >+ xt_free_node( node ); >+ } >+ >+ jabber_cache_add( ic, query, jabber_iq_parse_features ); >+ >+ return jabber_write_packet( ic, query ); >+} >+ >+xt_status jabber_iq_parse_features( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ) >+{ >+ struct xt_node *c; >+ struct jabber_buddy *bud; >+ char *feature; >+ >+ if( !( c = xt_find_node( node->children, "query" ) ) || >+ !( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_DISCO_INFO ) == 0 ) ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete IQ-result packet for discover" ); >+ return XT_HANDLED; >+ } >+ if( ( bud = jabber_buddy_by_jid( ic, xt_find_attr( node, "from") , 0 ) ) == NULL ) >+ { >+ /* Who cares about the unknown... */ >+ imcb_log( ic, "Couldnt find the man: %s", xt_find_attr( node, "from")); >+ return 0; >+ } >+ >+ c = c->children; >+ while( ( c = xt_find_node( c, "feature" ) ) ) { >+ feature = xt_find_attr( c, "var" ); >+ bud->features = g_slist_append(bud->features, g_strdup(feature) ); >+ c = c->next; >+ } >+ >+ return XT_HANDLED; >+} >+ >+xt_status jabber_iq_parse_server_features( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ); >+ >+xt_status jabber_iq_query_server( struct im_connection *ic, char *jid, char *xmlns ) >+{ >+ struct xt_node *node, *query; >+ struct jabber_data *jd = ic->proto_data; >+ >+ node = xt_new_node( "query", NULL, NULL ); >+ xt_add_attr( node, "xmlns", xmlns ); >+ >+ if( !( query = jabber_make_packet( "iq", "get", jid, node ) ) ) >+ { >+ imcb_log( ic, "WARNING: Couldn't generate server query" ); >+ xt_free_node( node ); >+ } >+ >+ jd->have_streamhosts--; >+ jabber_cache_add( ic, query, jabber_iq_parse_server_features ); >+ >+ return jabber_write_packet( ic, query ); >+} >+ >+/* >+ * Query the server for "items", query each "item" for identities, query each "item" that's a proxy for it's bytestream info >+ */ >+xt_status jabber_iq_parse_server_features( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ) >+{ >+ struct xt_node *c; >+ struct jabber_data *jd = ic->proto_data; >+ >+ if( !( c = xt_find_node( node->children, "query" ) ) || >+ !xt_find_attr( node, "from" ) ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete IQ-result packet for discover" ); >+ return XT_HANDLED; >+ } >+ >+ jd->have_streamhosts++; >+ >+ if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_DISCO_ITEMS ) == 0 ) >+ { >+ char *item, *itemjid; >+ >+ /* answer from server */ >+ >+ c = c->children; >+ while( ( c = xt_find_node( c, "item" ) ) ) >+ { >+ item = xt_find_attr( c, "name" ); >+ itemjid = xt_find_attr( c, "jid" ); >+ >+ jabber_iq_query_server( ic, itemjid, XMLNS_DISCO_INFO ); >+ >+ c = c->next; >+ } >+ } else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_DISCO_INFO ) == 0 ) >+ { >+ char *category, *type; >+ >+ /* answer from potential proxy */ >+ >+ c = c->children; >+ while( ( c = xt_find_node( c, "identity" ) ) ) >+ { >+ category = xt_find_attr( c, "category" ); >+ type = xt_find_attr( c, "type" ); >+ >+ if( type && ( strcmp( type, "bytestreams" ) == 0 ) && >+ category && ( strcmp( category, "proxy" ) == 0 ) ) >+ jabber_iq_query_server( ic, xt_find_attr( node, "from" ), XMLNS_BYTESTREAMS ); >+ >+ c = c->next; >+ } >+ } else if( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_BYTESTREAMS ) == 0 ) >+ { >+ char *host, *jid; >+ int port; >+ >+ /* answer from proxy */ >+ >+ if( ( c = xt_find_node( c->children, "streamhost" ) ) && >+ ( host = xt_find_attr( c, "host" ) ) && >+ ( port = atoi( xt_find_attr( c, "port" ) ) ) && >+ ( jid = xt_find_attr( c, "jid" ) ) ) >+ { >+ jabber_streamhost_t *sh = g_new0( jabber_streamhost_t, 1 ); >+ sh->jid = g_strdup( jid ); >+ sh->host = g_strdup( host ); >+ sprintf( sh->port, "%u", port ); >+ >+ imcb_log( ic, "Proxy found: jid %s host %s port %u", jid, host, port ); >+ jd->streamhosts = g_slist_append( jd->streamhosts, sh ); >+ } >+ } >+ >+ if( jd->have_streamhosts == 0 ) >+ jd->have_streamhosts++; >+ return XT_HANDLED; >+} >diff -urN bitlbee-1.2/protocols/jabber/jabber.c bitlbee-1.2-jabberft/protocols/jabber/jabber.c >--- bitlbee-1.2/protocols/jabber/jabber.c 2008-03-16 15:39:12.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/jabber.c 2008-04-14 18:53:32.000000000 +0200 >@@ -529,6 +529,7 @@ > ret->keepalive = jabber_keepalive; > ret->send_typing = jabber_send_typing; > ret->handle_cmp = g_strcasecmp; >+ ret->transfer_request = jabber_si_transfer_request; > > register_protocol( ret ); > } >diff -urN bitlbee-1.2/protocols/jabber/jabber.h bitlbee-1.2-jabberft/protocols/jabber/jabber.h >--- bitlbee-1.2/protocols/jabber/jabber.h 2008-02-03 21:14:25.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/jabber.h 2008-04-14 18:53:32.000000000 +0200 >@@ -58,6 +58,14 @@ > have a real JID. */ > } jabber_buddy_flags_t; > >+/* Stores a streamhost's(a.k.a. proxy) data */ >+typedef struct >+{ >+ char *jid; >+ char *host; >+ char port[6]; >+} jabber_streamhost_t; >+ > typedef enum > { > JCFLAG_MESSAGE_SENT = 1, /* Set this after sending the first message, so >@@ -88,6 +96,10 @@ > char *cached_id_prefix; > GHashTable *node_cache; > GHashTable *buddies; >+ >+ GSList *filetransfers; >+ GSList *streamhosts; >+ int have_streamhosts; > }; > > struct jabber_away_state >@@ -117,6 +129,7 @@ > int priority; > struct jabber_away_state *away_state; > char *away_message; >+ GSList *features; > > time_t last_act; > jabber_buddy_flags_t flags; >@@ -132,6 +145,30 @@ > struct jabber_buddy *me; > }; > >+struct jabber_transfer >+{ >+ /* bitlbee's handle for this transfer */ >+ file_transfer_t *ft; >+ >+ /* the stream's private handle */ >+ gpointer streamhandle; >+ >+ struct im_connection *ic; >+ >+ int watch_in; >+ int watch_out; >+ >+ char *ini_jid; >+ char *tgt_jid; >+ char *iq_id; >+ char *sid; >+ int accepted; >+ >+ size_t bytesread, byteswritten; >+ int fd; >+ struct sockaddr_storage saddr; >+}; >+ > #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" > > #define JABBER_PORT_DEFAULT "5222" >@@ -161,17 +198,24 @@ > #define XMLNS_ROSTER "jabber:iq:roster" > > /* Some supported extensions/legacy stuff */ >-#define XMLNS_AUTH "jabber:iq:auth" /* XEP-0078 */ >-#define XMLNS_VERSION "jabber:iq:version" /* XEP-0092 */ >-#define XMLNS_TIME "jabber:iq:time" /* XEP-0090 */ >-#define XMLNS_PING "urn:xmpp:ping" /* XEP-0199 */ >-#define XMLNS_VCARD "vcard-temp" /* XEP-0054 */ >-#define XMLNS_DELAY "jabber:x:delay" /* XEP-0091 */ >-#define XMLNS_CHATSTATES "http://jabber.org/protocol/chatstates" /* 0085 */ >-#define XMLNS_DISCOVER "http://jabber.org/protocol/disco#info" /* 0030 */ >-#define XMLNS_MUC "http://jabber.org/protocol/muc" /* XEP-0045 */ >-#define XMLNS_MUC_USER "http://jabber.org/protocol/muc#user"/* XEP-0045 */ >-#define XMLNS_CAPS "http://jabber.org/protocol/caps" /* XEP-0115 */ >+#define XMLNS_AUTH "jabber:iq:auth" /* XEP-0078 */ >+#define XMLNS_VERSION "jabber:iq:version" /* XEP-0092 */ >+#define XMLNS_TIME "jabber:iq:time" /* XEP-0090 */ >+#define XMLNS_PING "urn:xmpp:ping" /* XEP-0199 */ >+#define XMLNS_VCARD "vcard-temp" /* XEP-0054 */ >+#define XMLNS_DELAY "jabber:x:delay" /* XEP-0091 */ >+#define XMLNS_XDATA "jabber:x:data" /* XEP-0004 */ >+#define XMLNS_CHATSTATES "http://jabber.org/protocol/chatstates" /* XEP-0085 */ >+#define XMLNS_DISCO_INFO "http://jabber.org/protocol/disco#info" /* XEP-0030 */ >+#define XMLNS_DISCO_ITEMS "http://jabber.org/protocol/disco#items" /* XEP-0030 */ >+#define XMLNS_MUC "http://jabber.org/protocol/muc" /* XEP-0045 */ >+#define XMLNS_MUC_USER "http://jabber.org/protocol/muc#user" /* XEP-0045 */ >+#define XMLNS_CAPS "http://jabber.org/protocol/caps" /* XEP-0115 */ >+#define XMLNS_FEATURE "http://jabber.org/protocol/feature-neg" /* XEP-0020 */ >+#define XMLNS_SI "http://jabber.org/protocol/si" /* XEP-0095 */ >+#define XMLNS_FILETRANSFER "http://jabber.org/protocol/si/profile/file-transfer" /* XEP-0096 */ >+#define XMLNS_BYTESTREAMS "http://jabber.org/protocol/bytestreams" /* XEP-0065 */ >+#define XMLNS_IBB "http://jabber.org/protocol/ibb" /* XEP-0047 */ > > /* iq.c */ > xt_status jabber_pkt_iq( struct xt_node *node, gpointer data ); >@@ -181,6 +225,18 @@ > int jabber_get_vcard( struct im_connection *ic, char *bare_jid ); > int jabber_add_to_roster( struct im_connection *ic, char *handle, char *name ); > int jabber_remove_from_roster( struct im_connection *ic, char *handle ); >+xt_status jabber_iq_query_features( struct im_connection *ic, char *bare_jid ); >+xt_status jabber_iq_query_server( struct im_connection *ic, char *jid, char *xmlns ); >+ >+/* si.c */ >+int jabber_si_handle_request( struct im_connection *ic, struct xt_node *node, struct xt_node *sinode ); >+void jabber_si_transfer_request( struct im_connection *ic, file_transfer_t *ft, char *who ); >+void jabber_si_free_transfer( file_transfer_t *ft); >+ >+/* s5bytestream.c */ >+int jabber_bs_recv_request( struct im_connection *ic, struct xt_node *node, struct xt_node *qnode); >+gboolean jabber_bs_send_start( struct jabber_transfer *tf ); >+gboolean jabber_bs_send_write( file_transfer_t *ft, char *buffer, unsigned int len ); > > /* message.c */ > xt_status jabber_pkt_message( struct xt_node *node, gpointer data ); >@@ -194,7 +250,7 @@ > char *set_eval_priority( set_t *set, char *value ); > char *set_eval_tls( set_t *set, char *value ); > struct xt_node *jabber_make_packet( char *name, char *type, char *to, struct xt_node *children ); >-struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type ); >+struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type, char *err_code ); > void jabber_cache_add( struct im_connection *ic, struct xt_node *node, jabber_cache_event func ); > struct xt_node *jabber_cache_get( struct im_connection *ic, char *id ); > void jabber_cache_entry_free( gpointer entry ); >diff -urN bitlbee-1.2/protocols/jabber/jabber_util.c bitlbee-1.2-jabberft/protocols/jabber/jabber_util.c >--- bitlbee-1.2/protocols/jabber/jabber_util.c 2008-02-03 14:22:02.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/jabber_util.c 2008-04-14 18:53:32.000000000 +0200 >@@ -96,7 +96,7 @@ > return node; > } > >-struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type ) >+struct xt_node *jabber_make_error_packet( struct xt_node *orig, char *err_cond, char *err_type, char *err_code ) > { > struct xt_node *node, *c; > char *to; >@@ -109,6 +109,10 @@ > c = xt_new_node( "error", NULL, c ); > xt_add_attr( c, "type", err_type ); > >+ /* Add the error code, if present */ >+ if (err_code) >+ xt_add_attr( c, "code", err_code ); >+ > /* To make the actual error packet, we copy the original packet and > add our <error>/type="error" tag. Including the original packet > is recommended, so let's just do it. */ >@@ -245,8 +249,10 @@ > char *realname; > }; > >-static void jabber_buddy_ask_yes( gpointer w, struct jabber_buddy_ask_data *bla ) >+static void jabber_buddy_ask_yes( void *data ) > { >+ struct jabber_buddy_ask_data *bla = data; >+ > presence_send_request( bla->ic, bla->handle, "subscribed" ); > > if( imcb_find_buddy( bla->ic, bla->handle ) == NULL ) >@@ -256,8 +262,10 @@ > g_free( bla ); > } > >-static void jabber_buddy_ask_no( gpointer w, struct jabber_buddy_ask_data *bla ) >+static void jabber_buddy_ask_no( void *data ) > { >+ struct jabber_buddy_ask_data *bla = data; >+ > presence_send_request( bla->ic, bla->handle, "subscribed" ); > > g_free( bla->handle ); >@@ -286,7 +294,14 @@ > len = strlen( orig ); > new = g_new( char, len + 1 ); > for( i = 0; i < len; i ++ ) >+ { >+ /* don't normalize the resource */ >+ if( orig[i] == '/' ) >+ break; > new[i] = tolower( orig[i] ); >+ } >+ for( ; i < len; i ++ ) >+ new[i] = orig[i]; > > new[i] = 0; > return new; >diff -urN bitlbee-1.2/protocols/jabber/Makefile bitlbee-1.2-jabberft/protocols/jabber/Makefile >--- bitlbee-1.2/protocols/jabber/Makefile 2008-03-02 18:10:16.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/Makefile 2008-04-14 18:53:32.000000000 +0200 >@@ -9,7 +9,7 @@ > -include ../../Makefile.settings > > # [SH] Program variables >-objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o sasl.o >+objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o sasl.o si.o s5bytestream.o > > CFLAGS += -Wall > LFLAGS += -r >diff -urN bitlbee-1.2/protocols/jabber/s5bytestream.c bitlbee-1.2-jabberft/protocols/jabber/s5bytestream.c >--- bitlbee-1.2/protocols/jabber/s5bytestream.c 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/s5bytestream.c 2008-04-14 18:53:32.000000000 +0200 >@@ -0,0 +1,1088 @@ >+/***************************************************************************\ >+* * >+* BitlBee - An IRC to IM gateway * >+* Jabber module - SOCKS5 Bytestreams ( XEP-0065 ) * >+* * >+* Copyright 2007 Uli Meis <a.sporto+bee@gmail.com> * >+* * >+* This program is free software; you can redistribute it and/or modify * >+* it under the terms of the GNU General Public License as published by * >+* the Free Software Foundation; either version 2 of the License, or * >+* (at your option) any later version. * >+* * >+* This program is distributed in the hope that it will be useful, * >+* but WITHOUT ANY WARRANTY; without even the implied warranty of * >+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * >+* GNU General Public License for more details. * >+* * >+* You should have received a copy of the GNU General Public License along * >+* with this program; if not, write to the Free Software Foundation, Inc., * >+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * >+* * >+\***************************************************************************/ >+ >+#include "jabber.h" >+#include "sha1.h" >+#include <poll.h> >+ >+struct bs_transfer { >+ >+ struct jabber_transfer *tf; >+ >+ jabber_streamhost_t *sh; >+ GSList *streamhosts; >+ >+ enum >+ { >+ BS_PHASE_CONNECT, >+ BS_PHASE_CONNECTED, >+ BS_PHASE_REQUEST, >+ BS_PHASE_REPLY >+ } phase; >+ >+ /* SHA1( SID + Initiator JID + Target JID) */ >+ char *pseudoadr; >+ >+ gint connect_timeout; >+}; >+ >+struct socks5_message >+{ >+ unsigned char ver; >+ union >+ { >+ unsigned char cmd; >+ unsigned char rep; >+ } cmdrep; >+ unsigned char rsv; >+ unsigned char atyp; >+ unsigned char addrlen; >+ unsigned char address[40]; >+ in_port_t port; >+} __attribute__ ((packed)); >+ >+/* connect() timeout in seconds. */ >+#define JABBER_BS_CONTIMEOUT 15 >+/* listen timeout */ >+#define JABBER_BS_LISTEN_TIMEOUT 90 >+ >+/* very useful */ >+#define ASSERTSOCKOP(op, msg) \ >+ if( (op) == -1 ) \ >+ return jabber_bs_abort( bt , msg ": %s", strerror( errno ) ); >+ >+gboolean jabber_bs_abort( struct bs_transfer *bt, char *format, ... ); >+void jabber_bs_canceled( file_transfer_t *ft , char *reason ); >+void jabber_bs_free_transfer( file_transfer_t *ft ); >+gboolean jabber_bs_connect_timeout( gpointer data, gint fd, b_input_condition cond ); >+gboolean jabber_bs_poll( struct bs_transfer *bt, int fd, short *revents ); >+gboolean jabber_bs_peek( struct bs_transfer *bt, void *buffer, int buflen ); >+ >+void jabber_bs_recv_answer_request( struct bs_transfer *bt ); >+gboolean jabber_bs_recv_read( gpointer data, gint fd, b_input_condition cond ); >+gboolean jabber_bs_recv_write_request( file_transfer_t *ft ); >+gboolean jabber_bs_recv_handshake( gpointer data, gint fd, b_input_condition cond ); >+gboolean jabber_bs_recv_handshake_abort( struct bs_transfer *bt, char *error ); >+int jabber_bs_recv_request( struct im_connection *ic, struct xt_node *node, struct xt_node *qnode ); >+ >+gboolean jabber_bs_send_handshake_abort( struct bs_transfer *bt, char *error ); >+gboolean jabber_bs_send_request( struct jabber_transfer *tf, GSList *streamhosts ); >+gboolean jabber_bs_send_handshake( gpointer data, gint fd, b_input_condition cond ); >+gboolean jabber_bs_send_listen( struct bs_transfer *bt, struct sockaddr_storage *saddr, char *host, char *port ); >+static xt_status jabber_bs_send_handle_activate( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ); >+void jabber_bs_send_activate( struct bs_transfer *bt ); >+ >+/* >+ * Frees a bs_transfer struct and calls the SI free function >+ */ >+void jabber_bs_free_transfer( file_transfer_t *ft) { >+ struct jabber_transfer *tf = ft->data; >+ struct bs_transfer *bt = tf->streamhandle; >+ jabber_streamhost_t *sh; >+ >+ if ( bt->connect_timeout ) >+ { >+ b_event_remove( bt->connect_timeout ); >+ bt->connect_timeout = 0; >+ } >+ >+ if ( tf->watch_in ) >+ b_event_remove( tf->watch_in ); >+ >+ if( tf->watch_out ) >+ b_event_remove( tf->watch_out ); >+ >+ g_free( bt->pseudoadr ); >+ >+ while( bt->streamhosts ) >+ { >+ sh = bt->streamhosts->data; >+ bt->streamhosts = g_slist_remove( bt->streamhosts, sh ); >+ g_free( sh->jid ); >+ g_free( sh->host ); >+ g_free( sh ); >+ } >+ >+ g_free( bt ); >+ >+ jabber_si_free_transfer( ft ); >+} >+ >+/* >+ * Checks if buflen data is available on the socket and >+ * writes it to buffer if that's the case. >+ */ >+gboolean jabber_bs_peek( struct bs_transfer *bt, void *buffer, int buflen ) >+{ >+ int ret; >+ int fd = bt->tf->fd; >+ >+ ASSERTSOCKOP( ret = recv( fd, buffer, buflen, MSG_PEEK ), "MSG_PEEK'ing" ); >+ >+ if( ret == 0 ) >+ return jabber_bs_abort( bt, "Remote end closed connection" ); >+ >+ if( ret < buflen ) >+ return ret; >+ >+ ASSERTSOCKOP( ret = recv( fd, buffer, buflen, 0 ), "Dequeuing after MSG_PEEK" ); >+ >+ if( ret != buflen ) >+ return jabber_bs_abort( bt, "recv returned less than previous recv with MSG_PEEK" ); >+ >+ return ret; >+} >+ >+ >+/* >+ * This function is scheduled in bs_handshake via b_timeout_add after a (non-blocking) connect(). >+ */ >+gboolean jabber_bs_connect_timeout( gpointer data, gint fd, b_input_condition cond ) >+{ >+ struct bs_transfer *bt = data; >+ >+ bt->connect_timeout = 0; >+ >+ jabber_bs_abort( bt, "no connection after %d seconds", bt->tf->ft->sending ? JABBER_BS_LISTEN_TIMEOUT : JABBER_BS_CONTIMEOUT ); >+ >+ return FALSE; >+} >+ >+/* >+ * Polls the socket, checks for errors and removes a connect timer >+ * if there is one. >+ */ >+gboolean jabber_bs_poll( struct bs_transfer *bt, int fd, short *revents ) >+{ >+ struct pollfd pfd = { .fd = fd, .events = POLLHUP|POLLERR }; >+ >+ if ( bt->connect_timeout ) >+ { >+ b_event_remove( bt->connect_timeout ); >+ bt->connect_timeout = 0; >+ } >+ >+ ASSERTSOCKOP( poll( &pfd, 1, 0 ), "poll()" ) >+ >+ if( pfd.revents & POLLERR ) >+ { >+ int sockerror; >+ socklen_t errlen = sizeof( sockerror ); >+ >+ if ( getsockopt( fd, SOL_SOCKET, SO_ERROR, &sockerror, &errlen ) ) >+ return jabber_bs_abort( bt, "getsockopt() failed, unknown socket error during SOCKS5 handshake (weird!)" ); >+ >+ if ( bt->phase == BS_PHASE_CONNECTED ) >+ return jabber_bs_abort( bt, "connect failed: %s", strerror( sockerror ) ); >+ >+ return jabber_bs_abort( bt, "Socket error during SOCKS5 handshake(weird!): %s", strerror( sockerror ) ); >+ } >+ >+ if( pfd.revents & POLLHUP ) >+ return jabber_bs_abort( bt, "Remote end closed connection" ); >+ >+ *revents = pfd.revents; >+ >+ return TRUE; >+} >+ >+/* >+ * Used for receive and send path. >+ */ >+gboolean jabber_bs_abort( struct bs_transfer *bt, char *format, ... ) >+{ >+ va_list params; >+ va_start( params, format ); >+ char error[128]; >+ >+ if( vsnprintf( error, 128, format, params ) < 0 ) >+ sprintf( error, "internal error parsing error string (BUG)" ); >+ va_end( params ); >+ if( bt->tf->ft->sending ) >+ return jabber_bs_send_handshake_abort( bt, error ); >+ else >+ return jabber_bs_recv_handshake_abort( bt, error ); >+} >+ >+/* Bad luck */ >+void jabber_bs_canceled( file_transfer_t *ft , char *reason ) >+{ >+ struct jabber_transfer *tf = ft->data; >+ >+ imcb_log( tf->ic, "File transfer aborted: %s", reason ); >+} >+ >+/* >+ * Parses an incoming bytestream request and calls jabber_bs_handshake on success. >+ */ >+int jabber_bs_recv_request( struct im_connection *ic, struct xt_node *node, struct xt_node *qnode) >+{ >+ char *sid, *ini_jid, *tgt_jid, *mode, *iq_id; >+ struct jabber_data *jd = ic->proto_data; >+ struct jabber_transfer *tf = NULL; >+ GSList *tflist; >+ struct bs_transfer *bt; >+ GSList *shlist=NULL; >+ struct xt_node *shnode; >+ >+ sha1_state_t sha; >+ char hash_hex[41]; >+ unsigned char hash[20]; >+ int i; >+ >+ if( !(iq_id = xt_find_attr( node, "id" ) ) || >+ !(ini_jid = xt_find_attr( node, "from" ) ) || >+ !(tgt_jid = xt_find_attr( node, "to" ) ) || >+ !(sid = xt_find_attr( qnode, "sid" ) ) ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete SI bytestream request"); >+ return XT_HANDLED; >+ } >+ >+ if( ( mode = xt_find_attr( qnode, "mode" ) ) && >+ ( strcmp( mode, "tcp" ) != 0 ) ) >+ { >+ imcb_log( ic, "WARNING: Received SI Request for unsupported bytestream mode %s", xt_find_attr( qnode, "mode" ) ); >+ return XT_HANDLED; >+ } >+ >+ shnode = qnode->children; >+ while( ( shnode = xt_find_node( shnode, "streamhost" ) ) ) >+ { >+ char *jid, *host; >+ int port; >+ if( ( jid = xt_find_attr( shnode, "jid" ) ) && >+ ( host = xt_find_attr( shnode, "host" ) ) && >+ ( ( port = atoi( xt_find_attr( shnode, "port" ) ) ) ) ) >+ { >+ jabber_streamhost_t *sh = g_new0( jabber_streamhost_t, 1 ); >+ sh->jid = g_strdup(jid); >+ sh->host = g_strdup(host); >+ sprintf( sh->port, "%u", port ); >+ shlist = g_slist_append( shlist, sh ); >+ } >+ shnode = shnode->next; >+ } >+ >+ if( !shlist ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete SI bytestream request, no parseable streamhost entries"); >+ return XT_HANDLED; >+ } >+ >+ /* Let's see if we can find out what this bytestream should be for... */ >+ >+ for( tflist = jd->filetransfers ; tflist; tflist = g_slist_next(tflist) ) >+ { >+ struct jabber_transfer *tft = tflist->data; >+ if( ( strcmp( tft->sid, sid ) == 0 ) && >+ ( strcmp( tft->ini_jid, ini_jid ) == 0 ) && >+ ( strcmp( tft->tgt_jid, tgt_jid ) == 0 ) ) >+ { >+ tf = tft; >+ break; >+ } >+ } >+ >+ if (!tf) >+ { >+ imcb_log( ic, "WARNING: Received bytestream request from %s that doesn't match an SI request", ini_jid ); >+ return XT_HANDLED; >+ } >+ >+ /* iq_id and canceled can be reused since SI is done */ >+ g_free( tf->iq_id ); >+ tf->iq_id = g_strdup( iq_id ); >+ >+ tf->ft->canceled = jabber_bs_canceled; >+ >+ /* SHA1( SID + Initiator JID + Target JID ) is given to the streamhost which it will match against the initiator's value */ >+ sha1_init( &sha ); >+ sha1_append( &sha, (unsigned char*) sid, strlen( sid ) ); >+ sha1_append( &sha, (unsigned char*) ini_jid, strlen( ini_jid ) ); >+ sha1_append( &sha, (unsigned char*) tgt_jid, strlen( tgt_jid ) ); >+ sha1_finish( &sha, hash ); >+ >+ for( i = 0; i < 20; i ++ ) >+ sprintf( hash_hex + i * 2, "%02x", hash[i] ); >+ >+ bt = g_new0( struct bs_transfer, 1 ); >+ bt->tf = tf; >+ bt->streamhosts = shlist; >+ bt->sh = shlist->data; >+ bt->phase = BS_PHASE_CONNECT; >+ bt->pseudoadr = g_strdup( hash_hex ); >+ tf->streamhandle = bt; >+ tf->ft->free = jabber_bs_free_transfer; >+ >+ jabber_bs_recv_handshake( bt, 0, 0 ); >+ >+ return XT_HANDLED; >+} >+ >+/* >+ * This is what a protocol handshake can look like in cooperative multitasking :) >+ * Might be confusing at first because it's called from different places and is recursing. >+ * (places being the event thread, bs_request, bs_handshake_abort, and itself) >+ * >+ * All in all, it turned out quite nice :) >+ */ >+gboolean jabber_bs_recv_handshake( gpointer data, gint fd, b_input_condition cond ) >+{ >+ >+ struct bs_transfer *bt = data; >+ short revents; >+ int gret; >+ >+ if ( ( fd != 0 ) && !jabber_bs_poll( bt, fd, &revents ) ) >+ return FALSE; >+ >+ switch( bt->phase ) >+ { >+ case BS_PHASE_CONNECT: >+ { >+ struct addrinfo hints, *rp; >+ >+ memset( &hints, 0, sizeof( struct addrinfo ) ); >+ hints.ai_socktype = SOCK_STREAM; >+ >+ if ( ( gret = getaddrinfo( bt->sh->host, bt->sh->port, &hints, &rp ) ) != 0 ) >+ return jabber_bs_abort( bt, "getaddrinfo() failed: %s", gai_strerror( gret ) ); >+ >+ ASSERTSOCKOP( bt->tf->fd = fd = socket( rp->ai_family, rp->ai_socktype, 0 ), "Opening socket" ); >+ >+ sock_make_nonblocking( fd ); >+ >+ imcb_log( bt->tf->ic, "File %s: Connecting to streamhost %s:%s", bt->tf->ft->file_name, bt->sh->host, bt->sh->port ); >+ >+ if( ( connect( fd, rp->ai_addr, rp->ai_addrlen ) == -1 ) && >+ ( errno != EINPROGRESS ) ) >+ return jabber_bs_abort( bt , "connect() failed: %s", strerror( errno ) ); >+ >+ freeaddrinfo( rp ); >+ >+ bt->phase = BS_PHASE_CONNECTED; >+ >+ bt->tf->watch_out = b_input_add( fd, GAIM_INPUT_WRITE, jabber_bs_recv_handshake, bt ); >+ >+ /* since it takes forever(3mins?) till connect() fails on itself we schedule a timeout */ >+ bt->connect_timeout = b_timeout_add( JABBER_BS_CONTIMEOUT * 1000, jabber_bs_connect_timeout, bt ); >+ >+ bt->tf->watch_in = 0; >+ return FALSE; >+ } >+ case BS_PHASE_CONNECTED: >+ { >+ struct { >+ unsigned char ver; >+ unsigned char nmethods; >+ unsigned char method; >+ } socks5_hello = { >+ .ver = 5, >+ .nmethods = 1, >+ .method = 0x00 /* no auth */ >+ /* one could also implement username/password. If you know >+ * a jabber client or proxy that actually does it, tell me. >+ */ >+ }; >+ >+ ASSERTSOCKOP( send( fd, &socks5_hello, sizeof( socks5_hello ) , 0 ), "Sending auth request" ); >+ >+ bt->phase = BS_PHASE_REQUEST; >+ >+ bt->tf->watch_in = b_input_add( fd, GAIM_INPUT_READ, jabber_bs_recv_handshake, bt ); >+ >+ bt->tf->watch_out = 0; >+ return FALSE; >+ } >+ case BS_PHASE_REQUEST: >+ { >+ struct socks5_message socks5_connect = >+ { >+ .ver = 5, >+ .cmdrep.cmd = 0x01, >+ .rsv = 0, >+ .atyp = 0x03, >+ .addrlen = strlen( bt->pseudoadr ), >+ .port = 0 >+ }; >+ int ret; >+ char buf[2]; >+ >+ /* If someone's trying to be funny and sends only one byte at a time we'll fail :) */ >+ ASSERTSOCKOP( ret = recv( fd, buf, 2, 0 ) , "Receiving auth reply" ); >+ >+ if( !( ret == 2 ) || >+ !( buf[0] == 5 ) || >+ !( buf[1] == 0 ) ) >+ return jabber_bs_abort( bt, "Auth not accepted by streamhost (reply: len=%d, ver=%d, status=%d)", >+ ret, buf[0], buf[1] ); >+ >+ /* copy hash into connect message */ >+ memcpy( socks5_connect.address, bt->pseudoadr, socks5_connect.addrlen ); >+ >+ ASSERTSOCKOP( send( fd, &socks5_connect, sizeof( struct socks5_message ), 0 ) , "Sending SOCKS5 Connect" ); >+ >+ bt->phase = BS_PHASE_REPLY; >+ >+ return TRUE; >+ } >+ case BS_PHASE_REPLY: >+ { >+ struct socks5_message socks5_reply; >+ int ret; >+ >+ if ( !( ret = jabber_bs_peek( bt, &socks5_reply, sizeof( struct socks5_message ) ) ) ) >+ return FALSE; >+ >+ if ( ret < sizeof( socks5_reply ) ) >+ return TRUE; >+ >+ if( !( socks5_reply.ver == 5 ) || >+ !( socks5_reply.cmdrep.rep == 0 ) || >+ !( socks5_reply.atyp == 3 ) || >+ !( socks5_reply.addrlen == 40 ) ) >+ return jabber_bs_abort( bt, "SOCKS5 CONNECT failed (reply: ver=%d, rep=%d, atyp=%d, addrlen=%d", >+ socks5_reply.ver, >+ socks5_reply.cmdrep.rep, >+ socks5_reply.atyp, >+ socks5_reply.addrlen); >+ >+ if( bt->tf->ft->sending ) >+ jabber_bs_send_activate( bt ); >+ else >+ jabber_bs_recv_answer_request( bt ); >+ >+ return FALSE; >+ } >+ default: >+ /* BUG */ >+ imcb_log( bt->tf->ic, "BUG in file transfer code: undefined handshake phase" ); >+ >+ bt->tf->watch_in = 0; >+ return FALSE; >+ } >+} >+ >+/* >+ * If the handshake failed we can try the next streamhost, if there is one. >+ * An intelligent sender would probably specify himself as the first streamhost and >+ * a proxy as the second (Kopete and PSI are examples here). That way, a (potentially) >+ * slow proxy is only used if neccessary. This of course also means, that the timeout >+ * per streamhost should be kept short. If one or two firewalled adresses are specified, >+ * they have to timeout first before a proxy is tried. >+ */ >+gboolean jabber_bs_recv_handshake_abort( struct bs_transfer *bt, char *error ) >+{ >+ struct jabber_transfer *tf = bt->tf; >+ struct xt_node *reply, *iqnode; >+ GSList *shlist; >+ >+ imcb_log( tf->ic, "Transferring file %s: connection to streamhost %s:%s failed (%s)", >+ tf->ft->file_name, >+ bt->sh->host, >+ bt->sh->port, >+ error ); >+ >+ /* Alright, this streamhost failed, let's try the next... */ >+ bt->phase = BS_PHASE_CONNECT; >+ shlist = g_slist_find( bt->streamhosts, bt->sh ); >+ if( shlist && shlist->next ) >+ { >+ bt->sh = shlist->next->data; >+ return jabber_bs_recv_handshake( bt, 0, 0 ); >+ } >+ >+ >+ /* out of stream hosts */ >+ >+ iqnode = jabber_make_packet( "iq", "result", tf->ini_jid, NULL ); >+ reply = jabber_make_error_packet( iqnode, "item-not-found", "cancel" , "404" ); >+ xt_free_node( iqnode ); >+ >+ xt_add_attr( reply, "id", tf->iq_id ); >+ >+ if( !jabber_write_packet( tf->ic, reply ) ) >+ imcb_log( tf->ic, "WARNING: Error transmitting bytestream response" ); >+ xt_free_node( reply ); >+ >+ imcb_file_canceled( tf->ft, "couldn't connect to any streamhosts" ); >+ >+ bt->tf->watch_in = 0; >+ return FALSE; >+} >+ >+/* >+ * After the SOCKS5 handshake succeeds we need to inform the initiator which streamhost we chose. >+ * If he is the streamhost himself, he might already know that. However, if it's a proxy, >+ * the initiator will have to make a connection himself. >+ */ >+void jabber_bs_recv_answer_request( struct bs_transfer *bt ) >+{ >+ struct jabber_transfer *tf = bt->tf; >+ struct xt_node *reply; >+ >+ imcb_log( tf->ic, "File %s: established SOCKS5 connection to %s:%s", >+ tf->ft->file_name, >+ bt->sh->host, >+ bt->sh->port ); >+ >+ tf->ft->data = tf; >+ tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_recv_read, bt ); >+ tf->ft->write_request = jabber_bs_recv_write_request; >+ >+ reply = xt_new_node( "streamhost-used", NULL, NULL ); >+ xt_add_attr( reply, "jid", bt->sh->jid ); >+ >+ reply = xt_new_node( "query", NULL, reply ); >+ xt_add_attr( reply, "xmlns", XMLNS_BYTESTREAMS ); >+ >+ reply = jabber_make_packet( "iq", "result", tf->ini_jid, reply ); >+ >+ xt_add_attr( reply, "id", tf->iq_id ); >+ >+ if( !jabber_write_packet( tf->ic, reply ) ) >+ imcb_file_canceled( tf->ft, "Error transmitting bytestream response" ); >+ xt_free_node( reply ); >+} >+ >+/* >+ * This function is called from write_request directly. If no data is available, it will install itself >+ * as a watcher for input on fd and once that happens, deliver the data and unschedule itself again. >+ */ >+gboolean jabber_bs_recv_read( gpointer data, gint fd, b_input_condition cond ) >+{ >+ int ret; >+ struct bs_transfer *bt = data; >+ struct jabber_transfer *tf = bt->tf; >+ >+ if( fd != 0 ) /* called via event thread */ >+ { >+ tf->watch_in = 0; >+ ASSERTSOCKOP( ret = recv( fd, tf->ft->buffer, sizeof( tf->ft->buffer ), 0 ) , "Receiving" ); >+ } >+ else >+ { >+ /* called directly. There might not be any data available. */ >+ if( ( ( ret = recv( tf->fd, tf->ft->buffer, sizeof( tf->ft->buffer ), 0 ) ) == -1 ) && >+ ( errno != EAGAIN ) ) >+ return jabber_bs_abort( bt, "Receiving: %s", strerror( errno ) ); >+ >+ if( ( ret == -1 ) && ( errno == EAGAIN ) ) >+ { >+ tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_recv_read, bt ); >+ return FALSE; >+ } >+ } >+ >+ /* shouldn't happen since we know the file size */ >+ if( ret == 0 ) >+ return jabber_bs_abort( bt, "Remote end closed connection" ); >+ >+ if( tf->bytesread == 0 ) >+ tf->ft->started = time( NULL ); >+ >+ tf->bytesread += ret; >+ >+ tf->ft->write( tf->ft, tf->ft->buffer, ret ); >+ >+ return FALSE; >+} >+ >+/* >+ * imc callback that is invoked when it is ready to receive some data. >+ */ >+gboolean jabber_bs_recv_write_request( file_transfer_t *ft ) >+{ >+ struct jabber_transfer *tf = ft->data; >+ >+ if( tf->watch_in ) >+ { >+ imcb_file_canceled( ft, "BUG in jabber file transfer: write_request called when already watching for input" ); >+ return FALSE; >+ } >+ >+ jabber_bs_recv_read( tf->streamhandle, 0 , 0 ); >+ >+ return TRUE; >+} >+ >+/* >+ * Issues a write_request to imc. >+ * */ >+gboolean jabber_bs_send_can_write( gpointer data, gint fd, b_input_condition cond ) >+{ >+ struct bs_transfer *bt = data; >+ >+ bt->tf->watch_out = 0; >+ >+ bt->tf->ft->write_request( bt->tf->ft ); >+ >+ return FALSE; >+} >+ >+/* >+ * This should only be called if we can write, so just do it. >+ * Add a write watch so we can write more during the next cycle (if possible). >+ */ >+gboolean jabber_bs_send_write( file_transfer_t *ft, char *buffer, unsigned int len ) >+{ >+ struct jabber_transfer *tf = ft->data; >+ struct bs_transfer *bt = tf->streamhandle; >+ int ret; >+ >+ if( tf->watch_out ) >+ return jabber_bs_abort( bt, "BUG: write() called while watching " ); >+ >+ /* TODO: catch broken pipe */ >+ ASSERTSOCKOP( ret = send( tf->fd, buffer, len, 0 ), "Sending" ); >+ >+ if( tf->byteswritten == 0 ) >+ tf->ft->started = time( NULL ); >+ >+ tf->byteswritten += ret; >+ >+ /* TODO: this should really not be fatal */ >+ if( ret < len ) >+ return jabber_bs_abort( bt, "send() sent %d instead of %d (send buffer too big!)", ret, len ); >+ >+ bt->tf->watch_out = b_input_add( tf->fd, GAIM_INPUT_WRITE, jabber_bs_send_can_write, bt ); >+ >+ return TRUE; >+} >+ >+/* >+ * Handles the reply by the receiver containing the used streamhost. >+ */ >+static xt_status jabber_bs_send_handle_reply(struct im_connection *ic, struct xt_node *node, struct xt_node *orig ) { >+ struct jabber_transfer *tf = NULL; >+ struct jabber_data *jd = ic->proto_data; >+ struct bs_transfer *bt; >+ GSList *tflist; >+ struct xt_node *c; >+ char *sid, *jid; >+ >+ if( !( c = xt_find_node( node->children, "query" ) ) || >+ !( c = xt_find_node( c->children, "streamhost-used" ) ) || >+ !( jid = xt_find_attr( c, "jid" ) ) ) >+ >+ { >+ imcb_log( ic, "WARNING: Received incomplete bytestream reply" ); >+ return XT_HANDLED; >+ } >+ >+ if( !( c = xt_find_node( orig->children, "query" ) ) || >+ !( sid = xt_find_attr( c, "sid" ) ) ) >+ { >+ imcb_log( ic, "WARNING: Error parsing request corresponding to the incoming bytestream reply" ); >+ return XT_HANDLED; >+ } >+ >+ /* Let's see if we can find out what this bytestream should be for... */ >+ >+ for( tflist = jd->filetransfers ; tflist; tflist = g_slist_next(tflist) ) >+ { >+ struct jabber_transfer *tft = tflist->data; >+ if( ( strcmp( tft->sid, sid ) == 0 ) ) >+ { >+ tf = tft; >+ break; >+ } >+ } >+ >+ if( !tf ) >+ { >+ imcb_log( ic, "WARNING: Received SOCKS5 bytestream reply to unknown request" ); >+ return XT_HANDLED; >+ } >+ >+ bt = tf->streamhandle; >+ >+ tf->accepted = TRUE; >+ >+ if( strcmp( jid, tf->ini_jid ) == 0 ) >+ { >+ /* we're streamhost and target */ >+ if( bt->phase == BS_PHASE_REPLY ) >+ { >+ /* handshake went through, let's start transferring */ >+ tf->ft->write_request( tf->ft ); >+ } >+ } else >+ { >+ /* using a proxy, abort listen */ >+ >+ closesocket( tf->fd ); >+ tf->fd = 0; >+ >+ if ( bt->connect_timeout ) >+ { >+ b_event_remove( bt->connect_timeout ); >+ bt->connect_timeout = 0; >+ } >+ >+ GSList *shlist; >+ for( shlist = jd->streamhosts ; shlist ; shlist = g_slist_next( shlist ) ) >+ { >+ jabber_streamhost_t *sh = shlist->data; >+ if( strcmp( sh->jid, jid ) == 0 ) >+ { >+ bt->sh = sh; >+ jabber_bs_recv_handshake( bt, 0, 0 ); >+ return XT_HANDLED; >+ } >+ } >+ >+ imcb_log( ic, "WARNING: Received SOCKS5 bytestream reply with unknown streamhost %s", jid ); >+ } >+ >+ return XT_HANDLED; >+} >+ >+/* >+ * Tell the proxy to activate the stream. Looks like this: >+ * >+ * <iq type=set> >+ * <query xmlns=bs sid=sid> >+ * <activate>tgt_jid</activate> >+ * </query> >+ * </iq> >+ */ >+void jabber_bs_send_activate( struct bs_transfer *bt ) >+{ >+ struct xt_node *node; >+ >+ node = xt_new_node( "activate", bt->tf->tgt_jid, NULL ); >+ node = xt_new_node( "query", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_BYTESTREAMS ); >+ xt_add_attr( node, "sid", bt->tf->sid ); >+ node = jabber_make_packet( "iq", "set", bt->sh->jid, node ); >+ >+ jabber_cache_add( bt->tf->ic, node, jabber_bs_send_handle_activate ); >+ >+ jabber_write_packet( bt->tf->ic, node ); >+} >+ >+/* >+ * The proxy has activated the bytestream. >+ * We can finally start pushing some data out. >+ */ >+static xt_status jabber_bs_send_handle_activate( struct im_connection *ic, struct xt_node *node, struct xt_node *orig ) >+{ >+ char *sid; >+ GSList *tflist; >+ struct jabber_transfer *tf; >+ struct xt_node *query; >+ struct jabber_data *jd = ic->proto_data; >+ >+ query = xt_find_node( orig->children, "query" ); >+ sid = xt_find_attr( query, "sid" ); >+ >+ for( tflist = jd->filetransfers ; tflist; tflist = g_slist_next(tflist) ) >+ { >+ struct jabber_transfer *tft = tflist->data; >+ if( ( strcmp( tft->sid, sid ) == 0 ) ) >+ { >+ tf = tft; >+ break; >+ } >+ } >+ >+ if( !tf ) >+ { >+ imcb_log( ic, "WARNING: Received SOCKS5 bytestream activation for unknown stream" ); >+ return XT_HANDLED; >+ } >+ >+ /* handshake went through, let's start transferring */ >+ tf->ft->write_request( tf->ft ); >+ >+ return XT_HANDLED; >+} >+ >+/* >+ * Starts a bytestream. >+ */ >+gboolean jabber_bs_send_start( struct jabber_transfer *tf ) >+{ >+ char host[INET6_ADDRSTRLEN]; >+ struct bs_transfer *bt; >+ sha1_state_t sha; >+ char hash_hex[41]; >+ unsigned char hash[20]; >+ int i,ret; >+ struct jabber_data *jd = tf->ic->proto_data; >+ jabber_streamhost_t sh; >+ GSList *streamhosts = jd->streamhosts; >+ >+ /* SHA1( SID + Initiator JID + Target JID ) is given to the streamhost which it will match against the initiator's value */ >+ sha1_init( &sha ); >+ sha1_append( &sha, (unsigned char*) tf->sid, strlen( tf->sid ) ); >+ sha1_append( &sha, (unsigned char*) tf->ini_jid, strlen( tf->ini_jid ) ); >+ sha1_append( &sha, (unsigned char*) tf->tgt_jid, strlen( tf->tgt_jid ) ); >+ sha1_finish( &sha, hash ); >+ >+ for( i = 0; i < 20; i ++ ) >+ sprintf( hash_hex + i * 2, "%02x", hash[i] ); >+ >+ bt = g_new0( struct bs_transfer, 1 ); >+ bt->tf = tf; >+ bt->phase = BS_PHASE_CONNECT; >+ bt->pseudoadr = g_strdup( hash_hex ); >+ tf->streamhandle = bt; >+ tf->ft->free = jabber_bs_free_transfer; >+ tf->ft->canceled = jabber_bs_canceled; >+ >+ if ( !jabber_bs_send_listen( bt, &tf->saddr, sh.host = host, sh.port ) ) >+ return FALSE; >+ >+ bt->tf->watch_in = b_input_add( tf->fd, GAIM_INPUT_READ, jabber_bs_send_handshake, bt ); >+ bt->connect_timeout = b_timeout_add( JABBER_BS_LISTEN_TIMEOUT * 1000, jabber_bs_connect_timeout, bt ); >+ >+ sh.jid = tf->ini_jid; >+ >+ /* temporarily add listen address to streamhosts, send the request and remove it */ >+ streamhosts = g_slist_prepend( streamhosts, &sh ); >+ ret = jabber_bs_send_request( tf, streamhosts); >+ streamhosts = g_slist_remove( streamhosts, &sh ); >+ >+ return ret; >+} >+ >+gboolean jabber_bs_send_request( struct jabber_transfer *tf, GSList *streamhosts ) >+{ >+ struct xt_node *shnode, *query, *iq; >+ >+ query = xt_new_node( "query", NULL, NULL ); >+ xt_add_attr( query, "xmlns", XMLNS_BYTESTREAMS ); >+ xt_add_attr( query, "sid", tf->sid ); >+ xt_add_attr( query, "mode", "tcp" ); >+ >+ while( streamhosts ) { >+ jabber_streamhost_t *sh = streamhosts->data; >+ shnode = xt_new_node( "streamhost", NULL, NULL ); >+ xt_add_attr( shnode, "jid", sh->jid ); >+ xt_add_attr( shnode, "host", sh->host ); >+ xt_add_attr( shnode, "port", sh->port ); >+ >+ xt_add_child( query, shnode ); >+ >+ streamhosts = g_slist_next( streamhosts ); >+ } >+ >+ >+ iq = jabber_make_packet( "iq", "set", tf->tgt_jid, query ); >+ xt_add_attr( iq, "from", tf->ini_jid ); >+ >+ jabber_cache_add( tf->ic, iq, jabber_bs_send_handle_reply ); >+ >+ if( !jabber_write_packet( tf->ic, iq ) ) >+ imcb_file_canceled( tf->ft, "Error transmitting bytestream request" ); >+ return TRUE; >+} >+ >+gboolean jabber_bs_send_handshake_abort(struct bs_transfer *bt, char *error ) >+{ >+ struct jabber_transfer *tf = bt->tf; >+ struct jabber_data *jd = tf->ic->proto_data; >+ >+ /* TODO: did the receiver get here somehow??? */ >+ imcb_log( tf->ic, "Transferring file %s: SOCKS5 handshake failed: %s", >+ tf->ft->file_name, >+ error ); >+ >+ if( jd->streamhosts==NULL ) /* we're done here unless we have a proxy to try */ >+ imcb_file_canceled( tf->ft, error ); >+ >+ return FALSE; >+} >+ >+/* >+ * Creates a listening socket and returns it in saddr_ptr. >+ */ >+gboolean jabber_bs_send_listen( struct bs_transfer *bt, struct sockaddr_storage *saddr, char *host, char *port ) >+{ >+ struct jabber_transfer *tf = bt->tf; >+ int fd,gret; >+ char hostname[ HOST_NAME_MAX + 1 ]; >+ struct addrinfo hints, *rp; >+ socklen_t ssize = sizeof( struct sockaddr_storage ); >+ >+ /* won't be long till someone asks for this to be configurable :) */ >+ >+ ASSERTSOCKOP( gethostname( hostname, sizeof( hostname ) ), "gethostname()" ); >+ >+ memset( &hints, 0, sizeof( struct addrinfo ) ); >+ hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_NUMERICSERV; >+ >+ if ( ( gret = getaddrinfo( hostname, "0", &hints, &rp ) ) != 0 ) >+ return jabber_bs_abort( bt, "getaddrinfo() failed: %s", gai_strerror( gret ) ); >+ >+ memcpy( saddr, rp->ai_addr, rp->ai_addrlen ); >+ >+ ASSERTSOCKOP( fd = tf->fd = socket( saddr->ss_family, SOCK_STREAM, 0 ), "Opening socket" ); >+ >+ ASSERTSOCKOP( bind( fd, ( struct sockaddr *)saddr, rp->ai_addrlen ), "Binding socket" ); >+ >+ freeaddrinfo( rp ); >+ >+ ASSERTSOCKOP( listen( fd, 1 ), "Making socket listen" ); >+ >+ if ( !inet_ntop( saddr->ss_family, saddr->ss_family == AF_INET ? >+ ( void * )&( ( struct sockaddr_in * ) saddr )->sin_addr.s_addr : ( void * )&( ( struct sockaddr_in6 * ) saddr )->sin6_addr.s6_addr >+ , host, INET6_ADDRSTRLEN ) ) >+ return jabber_bs_abort( bt, "inet_ntop failed on listening socket" ); >+ >+ ASSERTSOCKOP( getsockname( fd, ( struct sockaddr *)saddr, &ssize ), "Getting socket name" ); >+ >+ if( saddr->ss_family == AF_INET ) >+ sprintf( port, "%d", ntohs( ( ( struct sockaddr_in *) saddr )->sin_port ) ); >+ else >+ sprintf( port, "%d", ntohs( ( ( struct sockaddr_in6 *) saddr )->sin6_port ) ); >+ >+ return TRUE; >+} >+ >+/* >+ * SOCKS5BYTESTREAM protocol for the sender >+ */ >+gboolean jabber_bs_send_handshake( gpointer data, gint fd, b_input_condition cond ) >+{ >+ struct bs_transfer *bt = data; >+ struct jabber_transfer *tf = bt->tf; >+ short revents; >+ >+ if ( !jabber_bs_poll( bt, fd, &revents ) ) >+ return FALSE; >+ >+ switch( bt->phase ) >+ { >+ case BS_PHASE_CONNECT: >+ { >+ struct sockaddr_storage clt_addr; >+ socklen_t ssize = sizeof( clt_addr ); >+ >+ /* Connect */ >+ >+ ASSERTSOCKOP( tf->fd = accept( fd, (struct sockaddr *) &clt_addr, &ssize ), "Accepting connection" ); >+ >+ closesocket( fd ); >+ fd = tf->fd; >+ sock_make_nonblocking( fd ); >+ >+ bt->phase = BS_PHASE_CONNECTED; >+ >+ bt->tf->watch_in = b_input_add( fd, GAIM_INPUT_READ, jabber_bs_send_handshake, bt ); >+ return FALSE; >+ } >+ case BS_PHASE_CONNECTED: >+ { >+ int ret, have_noauth=FALSE; >+ struct { >+ unsigned char ver; >+ unsigned char method; >+ } socks5_auth_reply = { .ver = 5, .method = 0 }; >+ struct { >+ unsigned char ver; >+ unsigned char nmethods; >+ unsigned char method; >+ } socks5_hello; >+ >+ if( !( ret = jabber_bs_peek( bt, &socks5_hello, sizeof( socks5_hello ) ) ) ) >+ return FALSE; >+ >+ if( ret < sizeof( socks5_hello ) ) >+ return TRUE; >+ >+ if( !( socks5_hello.ver == 5 ) || >+ !( socks5_hello.nmethods >= 1 ) || >+ !( socks5_hello.nmethods < 32 ) ) >+ return jabber_bs_abort( bt, "Invalid auth request ver=%d nmethods=%d method=%d", socks5_hello.ver, socks5_hello.nmethods, socks5_hello.method ); >+ >+ have_noauth = socks5_hello.method == 0; >+ >+ if( socks5_hello.nmethods > 1 ) >+ { >+ char mbuf[32]; >+ int i; >+ ASSERTSOCKOP( ret = recv( fd, mbuf, socks5_hello.nmethods - 1, 0 ) , "Receiving auth methods" ); >+ if( ret < ( socks5_hello.nmethods - 1 ) ) >+ return jabber_bs_abort( bt, "Partial auth request"); >+ for( i = 0 ; !have_noauth && ( i < socks5_hello.nmethods - 1 ) ; i ++ ) >+ if( mbuf[i] == 0 ) >+ have_noauth = TRUE; >+ } >+ >+ if( !have_noauth ) >+ return jabber_bs_abort( bt, "Auth request didn't include no authentication" ); >+ >+ ASSERTSOCKOP( send( fd, &socks5_auth_reply, sizeof( socks5_auth_reply ) , 0 ), "Sending auth reply" ); >+ >+ bt->phase = BS_PHASE_REQUEST; >+ >+ return TRUE; >+ } >+ case BS_PHASE_REQUEST: >+ { >+ struct socks5_message socks5_connect; >+ int msgsize = sizeof( struct socks5_message ); >+ >+ if( !jabber_bs_peek( bt, &socks5_connect, msgsize ) ) >+ return FALSE; >+ >+ if( !( socks5_connect.ver == 5) || >+ !( socks5_connect.cmdrep.cmd == 1 ) || >+ !( socks5_connect.atyp == 3 ) || >+ !(socks5_connect.addrlen == 40 ) ) >+ return jabber_bs_abort( bt, "Invalid SOCKS5 Connect message (addrlen=%d, ver=%d, cmd=%d, atyp=%d)", socks5_connect.addrlen, socks5_connect.ver, socks5_connect.cmdrep.cmd, socks5_connect.atyp ); >+ if( !( memcmp( socks5_connect.address, bt->pseudoadr, 40 ) == 0 ) ) >+ return jabber_bs_abort( bt, "SOCKS5 Connect message contained wrong digest"); >+ >+ socks5_connect.cmdrep.rep = 0; >+ >+ ASSERTSOCKOP( send( fd, &socks5_connect, msgsize, 0 ), "Sending connect reply" ); >+ >+ bt->phase = BS_PHASE_REPLY; >+ >+ imcb_log( tf->ic, "File %s: SOCKS5 handshake successful! Transfer about to start...", tf->ft->file_name ); >+ >+ if( tf->accepted ) >+ { >+ /* streamhost-used message came already in(possible?), let's start sending */ >+ tf->ft->write_request( tf->ft ); >+ } >+ >+ tf->watch_in = 0; >+ return FALSE; >+ >+ } >+ default: >+ /* BUG */ >+ imcb_log( bt->tf->ic, "BUG in file transfer code: undefined handshake phase" ); >+ >+ bt->tf->watch_in = 0; >+ return FALSE; >+ } >+} >+#undef ASSERTSOCKOP >diff -urN bitlbee-1.2/protocols/jabber/si.c bitlbee-1.2-jabberft/protocols/jabber/si.c >--- bitlbee-1.2/protocols/jabber/si.c 1970-01-01 01:00:00.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/jabber/si.c 2008-04-14 18:53:32.000000000 +0200 >@@ -0,0 +1,438 @@ >+/***************************************************************************\ >+* * >+* BitlBee - An IRC to IM gateway * >+* Jabber module - SI packets * >+* * >+* Copyright 2007 Uli Meis <a.sporto+bee@gmail.com> * >+* * >+* This program is free software; you can redistribute it and/or modify * >+* it under the terms of the GNU General Public License as published by * >+* the Free Software Foundation; either version 2 of the License, or * >+* (at your option) any later version. * >+* * >+* This program is distributed in the hope that it will be useful, * >+* but WITHOUT ANY WARRANTY; without even the implied warranty of * >+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * >+* GNU General Public License for more details. * >+* * >+* You should have received a copy of the GNU General Public License along * >+* with this program; if not, write to the Free Software Foundation, Inc., * >+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * >+* * >+\***************************************************************************/ >+ >+#include "jabber.h" >+#include "sha1.h" >+ >+void jabber_si_answer_request( file_transfer_t *ft ); >+int jabber_si_send_request(struct im_connection *ic, char *who, struct jabber_transfer *tf ); >+ >+/* file_transfer free() callback */ >+void jabber_si_free_transfer( file_transfer_t *ft) >+{ >+ struct jabber_transfer *tf = ft->data; >+ struct jabber_data *jd = tf->ic->proto_data; >+ >+ if ( tf->watch_in ) >+ b_event_remove( tf->watch_in ); >+ >+ jd->filetransfers = g_slist_remove( jd->filetransfers, tf ); >+ >+ if( tf->fd ) >+ { >+ close( tf->fd ); >+ tf->fd = 0; >+ } >+ >+ g_free( tf->ini_jid ); >+ g_free( tf->tgt_jid ); >+ g_free( tf->iq_id ); >+ g_free( tf->sid ); >+} >+ >+/* file_transfer finished() callback */ >+void jabber_si_finished( file_transfer_t *ft ) >+{ >+ struct jabber_transfer *tf = ft->data; >+ >+ imcb_log( tf->ic, "File %s transferred successfully!" , ft->file_name ); >+} >+ >+/* file_transfer canceled() callback */ >+void jabber_si_canceled( file_transfer_t *ft, char *reason ) >+{ >+ struct jabber_transfer *tf = ft->data; >+ struct xt_node *reply, *iqnode; >+ >+ if( tf->accepted ) >+ return; >+ >+ iqnode = jabber_make_packet( "iq", "error", tf->ini_jid, NULL ); >+ xt_add_attr( iqnode, "id", tf->iq_id ); >+ reply = jabber_make_error_packet( iqnode, "forbidden", "cancel", "403" ); >+ xt_free_node( iqnode ); >+ >+ if( !jabber_write_packet( tf->ic, reply ) ) >+ imcb_log( tf->ic, "WARNING: Error generating reply to file transfer request" ); >+ xt_free_node( reply ); >+ >+} >+ >+void jabber_si_transfer_request( struct im_connection *ic, file_transfer_t *ft, char *who ) >+{ >+ struct jabber_transfer *tf; >+ struct jabber_data *jd = ic->proto_data; >+ char *server = jd->server; >+ >+ imcb_log( ic, "Trying to send %s(%zd bytes) to %s", ft->file_name, ft->file_size, who ); >+ >+ tf = g_new0( struct jabber_transfer, 1 ); >+ >+ tf->ic = ic; >+ tf->ft = ft; >+ tf->ft->data = tf; >+ tf->ft->free = jabber_si_free_transfer; >+ tf->ft->finished = jabber_si_finished; >+ ft->write = jabber_bs_send_write; >+ >+ jd->filetransfers = g_slist_prepend( jd->filetransfers, tf ); >+ >+ /* query the buddy's features */ >+ jabber_iq_query_features( ic, who ); >+ >+ /* query proxies from the server */ >+ if( !jd->have_streamhosts ) >+ jabber_iq_query_server( ic, server, XMLNS_DISCO_ITEMS ); >+ >+ /* send the request to our buddy */ >+ jabber_si_send_request( ic, who, tf ); >+ >+ /* and start the receive logic */ >+ imcb_file_recv_start( ft ); >+} >+ >+/* >+ * First function that gets called when a file transfer request comes in. >+ * A lot to parse. >+ * >+ * We choose a stream type from the options given by the initiator. >+ * Then we wait for imcb to call the accept or cancel callbacks. >+ */ >+int jabber_si_handle_request( struct im_connection *ic, struct xt_node *node, struct xt_node *sinode) >+{ >+ struct xt_node *c, *d, *reply; >+ char *sid, *ini_jid, *tgt_jid, *iq_id, *s, *ext_jid; >+ struct jabber_buddy *bud; >+ int requestok = FALSE; >+ char *name; >+ size_t size; >+ struct jabber_transfer *tf; >+ struct jabber_data *jd = ic->proto_data; >+ file_transfer_t *ft; >+ >+ /* All this means we expect something like this: ( I think ) >+ * <iq from=... to=... id=...> >+ * <si id=id xmlns=si profile=ft> >+ * <file xmlns=ft/> >+ * <feature xmlns=feature> >+ * <x xmlns=xdata type=submit> >+ * <field var=stream-method> >+ * >+ */ >+ if( !( ini_jid = xt_find_attr( node, "from" ) ) || >+ !( tgt_jid = xt_find_attr( node, "to" ) ) || >+ !( iq_id = xt_find_attr( node, "id" ) ) || >+ !( sid = xt_find_attr( sinode, "id" ) ) || >+ !( strcmp( xt_find_attr( sinode, "profile" ), XMLNS_FILETRANSFER ) == 0 ) || >+ !( d = xt_find_node( sinode->children, "file" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FILETRANSFER ) == 0 ) || >+ !( name = xt_find_attr( d, "name" ) ) || >+ !( size = (size_t) atoll( xt_find_attr( d, "size" ) ) ) || >+ !( d = xt_find_node( sinode->children, "feature" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FEATURE ) == 0 ) || >+ !( d = xt_find_node( d->children, "x" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_XDATA ) == 0 ) || >+ !( strcmp( xt_find_attr( d, "type" ), "form" ) == 0 ) || >+ !( d = xt_find_node( d->children, "field" ) ) || >+ !( strcmp( xt_find_attr( d, "var" ), "stream-method" ) == 0 ) ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete Stream Initiation request" ); >+ } else >+ { >+ /* Check if we support one of the options */ >+ >+ c = d->children; >+ while( ( c = xt_find_node( c, "option" ) ) ) >+ if( ( d = xt_find_node( c->children, "value" ) ) && >+ ( strcmp( d->text, XMLNS_BYTESTREAMS ) == 0 ) ) >+ { >+ requestok = TRUE; >+ break; >+ } >+ >+ if ( !requestok ) >+ imcb_log( ic, "WARNING: Unsupported file transfer request from %s", ini_jid); >+ } >+ >+ if ( requestok ) >+ { >+ /* Figure out who the transfer should come frome... */ >+ >+ if( ( s = strchr( ini_jid, '/' ) ) ) >+ { >+ if( ( bud = jabber_buddy_by_jid( ic, ini_jid, GET_BUDDY_EXACT ) ) ) >+ { >+ bud->last_act = time( NULL ); >+ ext_jid = bud->ext_jid ? : bud->bare_jid; >+ } >+ else >+ *s = 0; /* We need to generate a bare JID now. */ >+ } >+ >+ if( !( ft = imcb_file_send_start( ic, ext_jid, name, size ) ) ) >+ { >+ imcb_log( ic, "WARNING: Error handling transfer request from %s", ini_jid); >+ requestok = FALSE; >+ } >+ >+ *s = '/'; >+ } >+ >+ if ( !requestok ) >+ { >+ reply = jabber_make_error_packet( node, "item-not-found", "cancel", NULL ); >+ if (!jabber_write_packet( ic, reply )) >+ imcb_log( ic, "WARNING: Error generating reply to file transfer request" ); >+ xt_free_node( reply ); >+ return XT_HANDLED; >+ } >+ >+ /* Request is fine. */ >+ >+ imcb_log( ic, "File transfer request from %s for %s (%zd kb). ", xt_find_attr( node, "from" ), name, size/1024 ); >+ >+ imcb_log( ic, "Accept the file transfer if you'd like the file. If you don't, issue the 'transfers reject' command."); >+ >+ tf = g_new0( struct jabber_transfer, 1 ); >+ >+ tf->ini_jid = g_strdup( ini_jid ); >+ tf->tgt_jid = g_strdup( tgt_jid ); >+ tf->iq_id = g_strdup( iq_id ); >+ tf->sid = g_strdup( sid ); >+ tf->ic = ic; >+ tf->ft = ft; >+ tf->ft->data = tf; >+ tf->ft->accept = jabber_si_answer_request; >+ tf->ft->free = jabber_si_free_transfer; >+ tf->ft->finished = jabber_si_finished; >+ tf->ft->canceled = jabber_si_canceled; >+ >+ jd->filetransfers = g_slist_prepend( jd->filetransfers, tf ); >+ >+ return XT_HANDLED; >+} >+ >+/* >+ * imc called the accept callback which probably means that the user accepted this file transfer. >+ * We send our response to the initiator. >+ * In the next step, the initiator will send us a request for the given stream type. >+ * (currently that can only be a SOCKS5 bytestream) >+ */ >+void jabber_si_answer_request( file_transfer_t *ft ) { >+ struct jabber_transfer *tf = ft->data; >+ struct xt_node *node, *sinode, *reply; >+ >+ /* generate response, start with the SI tag */ >+ sinode = xt_new_node( "si", NULL, NULL ); >+ xt_add_attr( sinode, "xmlns", XMLNS_SI ); >+ xt_add_attr( sinode, "profile", XMLNS_FILETRANSFER ); >+ xt_add_attr( sinode, "id", tf->sid ); >+ >+ /* now the file tag */ >+ node = xt_new_node( "file", NULL, NULL ); >+ xt_add_attr( node, "xmlns", XMLNS_FILETRANSFER ); >+ >+ xt_add_child( sinode, node ); >+ >+ /* and finally the feature tag */ >+ node = xt_new_node( "field", NULL, NULL ); >+ xt_add_attr( node, "var", "stream-method" ); >+ xt_add_attr( node, "type", "list-single" ); >+ >+ /* Currently all we can do. One could also implement in-band (IBB) */ >+ xt_add_child( node, xt_new_node( "value", XMLNS_BYTESTREAMS, NULL ) ); >+ >+ node = xt_new_node( "x", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_XDATA ); >+ xt_add_attr( node, "type", "submit" ); >+ >+ node = xt_new_node( "feature", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_FEATURE ); >+ >+ xt_add_child( sinode, node ); >+ >+ reply = jabber_make_packet( "iq", "result", tf->ini_jid, sinode ); >+ xt_add_attr( reply, "id", tf->iq_id ); >+ >+ if( !jabber_write_packet( tf->ic, reply ) ) >+ imcb_log( tf->ic, "WARNING: Error generating reply to file transfer request" ); >+ else >+ tf->accepted = TRUE; >+ xt_free_node( reply ); >+} >+ >+static xt_status jabber_si_handle_response(struct im_connection *ic, struct xt_node *node, struct xt_node *orig ) >+{ >+ struct xt_node *c, *d; >+ char *ini_jid, *tgt_jid, *iq_id; >+ GSList *tflist; >+ struct jabber_transfer *tf=NULL; >+ struct jabber_data *jd = ic->proto_data; >+ >+ if( !( tgt_jid = xt_find_attr( node, "from" ) ) || >+ !( ini_jid = xt_find_attr( node, "to" ) ) ) >+ { >+ imcb_log( ic, "Invalid SI response from=%s to=%s", tgt_jid, ini_jid ); >+ return XT_HANDLED; >+ } >+ >+ /* All this means we expect something like this: ( I think ) >+ * <iq from=... to=... id=...> >+ * <si xmlns=si> >+ * [ <file xmlns=ft/> ] <-- not neccessary >+ * <feature xmlns=feature> >+ * <x xmlns=xdata type=submit> >+ * <field var=stream-method> >+ * <value> >+ */ >+ if( !( tgt_jid = xt_find_attr( node, "from" ) ) || >+ !( ini_jid = xt_find_attr( node, "to" ) ) || >+ !( iq_id = xt_find_attr( node, "id" ) ) || >+ !( c = xt_find_node( node->children, "si" ) ) || >+ !( strcmp( xt_find_attr( c, "xmlns" ), XMLNS_SI ) == 0 ) || >+/* !( d = xt_find_node( c->children, "file" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FILETRANSFER ) == 0 ) || */ >+ !( d = xt_find_node( c->children, "feature" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_FEATURE ) == 0 ) || >+ !( d = xt_find_node( d->children, "x" ) ) || >+ !( strcmp( xt_find_attr( d, "xmlns" ), XMLNS_XDATA ) == 0 ) || >+ !( strcmp( xt_find_attr( d, "type" ), "submit" ) == 0 ) || >+ !( d = xt_find_node( d->children, "field" ) ) || >+ !( strcmp( xt_find_attr( d, "var" ), "stream-method" ) == 0 ) || >+ !( d = xt_find_node( d->children, "value" ) ) ) >+ { >+ imcb_log( ic, "WARNING: Received incomplete Stream Initiation response" ); >+ return XT_HANDLED; >+ } >+ >+ if( !( strcmp( d->text, XMLNS_BYTESTREAMS ) == 0 ) ) { >+ /* since we should only have advertised what we can do and the peer should >+ * only have chosen what we offered, this should never happen */ >+ imcb_log( ic, "WARNING: Received invalid Stream Initiation response, method %s", d->text ); >+ >+ return XT_HANDLED; >+ } >+ >+ /* Let's see if we can find out what this bytestream should be for... */ >+ >+ for( tflist = jd->filetransfers ; tflist; tflist = g_slist_next(tflist) ) >+ { >+ struct jabber_transfer *tft = tflist->data; >+ if( ( strcmp( tft->iq_id, iq_id ) == 0 ) ) >+ { >+ tf = tft; >+ break; >+ } >+ } >+ >+ if (!tf) >+ { >+ imcb_log( ic, "WARNING: Received bytestream request from %s that doesn't match an SI request", ini_jid ); >+ return XT_HANDLED; >+ } >+ >+ tf->ini_jid = g_strdup( ini_jid ); >+ tf->tgt_jid = g_strdup( tgt_jid ); >+ >+ imcb_log( ic, "File %s: %s accepted the transfer!", tf->ft->file_name, tgt_jid ); >+ >+ jabber_bs_send_start( tf ); >+ >+ return XT_HANDLED; >+} >+ >+int jabber_si_send_request(struct im_connection *ic, char *who, struct jabber_transfer *tf ) >+{ >+ struct xt_node *node, *sinode; >+ struct jabber_buddy *bud; >+ >+ /* who knows how many bits the future holds :) */ >+ char filesizestr[ 1 + ( int ) ( 0.301029995663981198f * sizeof( size_t ) * 8 ) ]; >+ >+ const char *methods[] = >+ { >+ XMLNS_BYTESTREAMS, >+ //XMLNS_IBB, >+ NULL >+ }; >+ const char **m; >+ char *s; >+ >+ /* Maybe we should hash this? */ >+ tf->sid = g_strdup_printf( "BitlBeeJabberSID%d", tf->ft->local_id ); >+ >+ if( ( s = strchr( who, '=' ) ) && jabber_chat_by_jid( ic, s + 1 ) ) >+ bud = jabber_buddy_by_ext_jid( ic, who, 0 ); >+ else >+ bud = jabber_buddy_by_jid( ic, who, 0 ); >+ >+ /* start with the SI tag */ >+ sinode = xt_new_node( "si", NULL, NULL ); >+ xt_add_attr( sinode, "xmlns", XMLNS_SI ); >+ xt_add_attr( sinode, "profile", XMLNS_FILETRANSFER ); >+ xt_add_attr( sinode, "id", tf->sid ); >+ >+/* if( mimetype ) >+ xt_add_attr( node, "mime-type", mimetype ); */ >+ >+ /* now the file tag */ >+/* if( desc ) >+ node = xt_new_node( "desc", descr, NULL ); */ >+ node = xt_new_node( "range", NULL, NULL ); >+ >+ sprintf( filesizestr, "%zd", tf->ft->file_size ); >+ node = xt_new_node( "file", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_FILETRANSFER ); >+ xt_add_attr( node, "name", tf->ft->file_name ); >+ xt_add_attr( node, "size", filesizestr ); >+/* if (hash) >+ xt_add_attr( node, "hash", hash ); >+ if (date) >+ xt_add_attr( node, "date", date ); */ >+ >+ xt_add_child( sinode, node ); >+ >+ /* and finally the feature tag */ >+ node = xt_new_node( "field", NULL, NULL ); >+ xt_add_attr( node, "var", "stream-method" ); >+ xt_add_attr( node, "type", "list-single" ); >+ >+ for ( m = methods ; *m ; m ++ ) >+ xt_add_child( node, xt_new_node( "option", NULL, xt_new_node( "value", (char *)*m, NULL ) ) ); >+ >+ node = xt_new_node( "x", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_XDATA ); >+ xt_add_attr( node, "type", "form" ); >+ >+ node = xt_new_node( "feature", NULL, node ); >+ xt_add_attr( node, "xmlns", XMLNS_FEATURE ); >+ >+ xt_add_child( sinode, node ); >+ >+ /* and we are there... */ >+ node = jabber_make_packet( "iq", "set", bud ? bud->full_jid : who, sinode ); >+ jabber_cache_add( ic, node, jabber_si_handle_response ); >+ tf->iq_id = g_strdup( xt_find_attr( node, "id" ) ); >+ >+ return jabber_write_packet( ic, node ); >+} >diff -urN bitlbee-1.2/protocols/msn/msn.h bitlbee-1.2-jabberft/protocols/msn/msn.h >--- bitlbee-1.2/protocols/msn/msn.h 2008-01-12 18:09:05.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/msn/msn.h 2008-04-14 18:53:32.000000000 +0200 >@@ -28,7 +28,7 @@ > #define TYPING_NOTIFICATION_MESSAGE "\r\r\rBEWARE, ME R TYPINK MESSAGE!!!!\r\r\r" > #define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r" > >-#ifdef DEBUG >+#ifdef DEBUG_MSN > #define debug( text... ) imcb_log( ic, text ); > #else > #define debug( text... ) >diff -urN bitlbee-1.2/protocols/msn/msn_util.c bitlbee-1.2-jabberft/protocols/msn/msn_util.c >--- bitlbee-1.2/protocols/msn/msn_util.c 2008-01-06 13:35:03.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/msn/msn_util.c 2008-04-14 18:53:32.000000000 +0200 >@@ -89,8 +89,10 @@ > char *realname; > }; > >-static void msn_buddy_ask_yes( gpointer w, struct msn_buddy_ask_data *bla ) >+static void msn_buddy_ask_yes( void *data ) > { >+ struct msn_buddy_ask_data *bla = data; >+ > msn_buddy_list_add( bla->ic, "AL", bla->handle, bla->realname ); > > if( imcb_find_buddy( bla->ic, bla->handle ) == NULL ) >@@ -101,8 +103,10 @@ > g_free( bla ); > } > >-static void msn_buddy_ask_no( gpointer w, struct msn_buddy_ask_data *bla ) >+static void msn_buddy_ask_no( void *data ) > { >+ struct msn_buddy_ask_data *bla = data; >+ > msn_buddy_list_add( bla->ic, "BL", bla->handle, bla->realname ); > > g_free( bla->handle ); >diff -urN bitlbee-1.2/protocols/nogaim.c bitlbee-1.2-jabberft/protocols/nogaim.c >--- bitlbee-1.2/protocols/nogaim.c 2008-01-20 01:17:52.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/nogaim.c 2008-04-14 18:53:32.000000000 +0200 >@@ -342,7 +342,8 @@ > > /* dialogs.c */ > >-void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont ) >+void imcb_ask( struct im_connection *ic, char *msg, void *data, >+ query_callback doit, query_callback dont ) > { > query_add( ic->irc, ic, msg, doit, dont, data ); > } >@@ -494,18 +495,20 @@ > char *handle; > }; > >-void show_got_added_no( gpointer w, struct show_got_added_data *data ) >+void show_got_added_no( void *data ) > { >- g_free( data->handle ); >+ g_free( ((struct show_got_added_data*)data)->handle ); > g_free( data ); > } > >-void show_got_added_yes( gpointer w, struct show_got_added_data *data ) >+void show_got_added_yes( void *data ) > { >- data->ic->acc->prpl->add_buddy( data->ic, data->handle, NULL ); >- /* imcb_add_buddy( data->ic, NULL, data->handle, data->handle ); */ >+ struct show_got_added_data *sga = data; > >- return show_got_added_no( w, data ); >+ sga->ic->acc->prpl->add_buddy( sga->ic, sga->handle, NULL ); >+ /* imcb_add_buddy( sga->ic, NULL, sga->handle, sga->handle ); */ >+ >+ return show_got_added_no( data ); > } > > void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ) >diff -urN bitlbee-1.2/protocols/nogaim.h bitlbee-1.2-jabberft/protocols/nogaim.h >--- bitlbee-1.2/protocols/nogaim.h 2008-01-19 23:50:10.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/nogaim.h 2008-04-14 18:53:32.000000000 +0200 >@@ -41,7 +41,9 @@ > #include "bitlbee.h" > #include "account.h" > #include "proxy.h" >+#include "query.h" > #include "md5.h" >+#include "ft.h" > > #define BUF_LEN MSG_LEN > #define BUF_LONG ( BUF_LEN * 2 ) >@@ -227,6 +229,9 @@ > /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* > * - Most protocols will just want to set this to g_strcasecmp().*/ > int (* handle_cmp) (const char *who1, const char *who2); >+ >+ /* Incoming transfer request */ >+ void (* transfer_request) (struct im_connection *, file_transfer_t *ft, char *handle ); > }; > > /* im_api core stuff. */ >@@ -260,7 +265,7 @@ > * - 'data' can be your custom struct - it will be passed to the callbacks. > * - 'doit' or 'dont' will be called depending of the answer of the user. > */ >-G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont ); >+G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); > G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); > > /* Buddy management */ >diff -urN bitlbee-1.2/protocols/oscar/oscar.c bitlbee-1.2-jabberft/protocols/oscar/oscar.c >--- bitlbee-1.2/protocols/oscar/oscar.c 2008-01-31 00:03:16.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/oscar/oscar.c 2008-04-14 18:53:32.000000000 +0200 >@@ -1083,8 +1083,8 @@ > return 1; > } > >-void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv); >-void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv); >+void oscar_accept_chat(void *data); >+void oscar_reject_chat(void *data); > > static int incomingim_chan2(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *userinfo, struct aim_incomingim_ch2_args *args) { > struct im_connection *ic = sess->aux_data; >@@ -1118,7 +1118,8 @@ > return 1; > } > >-static void gaim_icq_authgrant(gpointer w, struct icq_auth *data) { >+static void gaim_icq_authgrant(void *data_) { >+ struct icq_auth *data = data_; > char *uin, message; > struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; > >@@ -1133,7 +1134,8 @@ > g_free(data); > } > >-static void gaim_icq_authdeny(gpointer w, struct icq_auth *data) { >+static void gaim_icq_authdeny(void *data_) { >+ struct icq_auth *data = data_; > char *uin, *message; > struct oscar_data *od = (struct oscar_data *)data->ic->proto_data; > >@@ -2587,15 +2589,19 @@ > return NULL; > } > >-void oscar_accept_chat(gpointer w, struct aim_chat_invitation * inv) >+void oscar_accept_chat(void *data) > { >+ struct aim_chat_invitation * inv = data; >+ > oscar_chat_join(inv->ic, inv->name, NULL, NULL); > g_free(inv->name); > g_free(inv); > } > >-void oscar_reject_chat(gpointer w, struct aim_chat_invitation * inv) >+void oscar_reject_chat(void *data) > { >+ struct aim_chat_invitation * inv = data; >+ > g_free(inv->name); > g_free(inv); > } >diff -urN bitlbee-1.2/protocols/yahoo/yahoo.c bitlbee-1.2-jabberft/protocols/yahoo/yahoo.c >--- bitlbee-1.2/protocols/yahoo/yahoo.c 2008-03-15 22:05:25.000000000 +0100 >+++ bitlbee-1.2-jabberft/protocols/yahoo/yahoo.c 2008-04-14 18:53:32.000000000 +0200 >@@ -796,16 +796,20 @@ > return -1; > } > >-static void byahoo_accept_conf( gpointer w, struct byahoo_conf_invitation *inv ) >+static void byahoo_accept_conf( void *data ) > { >+ struct byahoo_conf_invitation *inv = data; >+ > yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name ); > imcb_chat_add_buddy( inv->c, inv->ic->acc->user ); > g_free( inv->name ); > g_free( inv ); > } > >-static void byahoo_reject_conf( gpointer w, struct byahoo_conf_invitation *inv ) >+static void byahoo_reject_conf( void *data ) > { >+ struct byahoo_conf_invitation *inv = data; >+ > yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" ); > imcb_chat_free( inv->c ); > g_free( inv->name ); >diff -urN bitlbee-1.2/query.c bitlbee-1.2-jabberft/query.c >--- bitlbee-1.2/query.c 2008-03-04 00:09:41.000000000 +0100 >+++ bitlbee-1.2-jabberft/query.c 2008-04-14 18:53:32.000000000 +0200 >@@ -29,7 +29,8 @@ > static void query_display( irc_t *irc, query_t *q ); > static query_t *query_default( irc_t *irc ); > >-query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ) >+query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, >+ query_callback yes, query_callback no, void *data ) > { > query_t *q = g_new0( query_t, 1 ); > >@@ -143,7 +144,7 @@ > imcb_log( q->ic, "Accepted: %s", q->question ); > else > irc_usermsg( irc, "Accepted: %s", q->question ); >- q->yes( NULL, q->data ); >+ q->yes( q->data ); > } > else > { >@@ -151,7 +152,7 @@ > imcb_log( q->ic, "Rejected: %s", q->question ); > else > irc_usermsg( irc, "Rejected: %s", q->question ); >- q->no( NULL, q->data ); >+ q->no( q->data ); > } > q->data = NULL; > >diff -urN bitlbee-1.2/query.h bitlbee-1.2-jabberft/query.h >--- bitlbee-1.2/query.h 2007-06-30 23:18:42.000000000 +0200 >+++ bitlbee-1.2-jabberft/query.h 2008-04-14 18:53:33.000000000 +0200 >@@ -26,17 +26,19 @@ > #ifndef _QUERY_H > #define _QUERY_H > >+typedef void (*query_callback) ( void *data ); >+ > typedef struct query > { > struct im_connection *ic; > char *question; >- void (* yes) ( gpointer w, void *data ); >- void (* no) ( gpointer w, void *data ); >+ query_callback yes, no; > void *data; > struct query *next; > } query_t; > >-query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, void *yes, void *no, void *data ); >+query_t *query_add( irc_t *irc, struct im_connection *ic, char *question, >+ query_callback yes, query_callback no, void *data ); > void query_del( irc_t *irc, query_t *q ); > void query_del_by_conn( irc_t *irc, struct im_connection *ic ); > void query_answer( irc_t *irc, query_t *q, int ans ); >diff -urN bitlbee-1.2/root_commands.c bitlbee-1.2-jabberft/root_commands.c >--- bitlbee-1.2/root_commands.c 2008-03-04 00:15:51.000000000 +0100 >+++ bitlbee-1.2-jabberft/root_commands.c 2008-04-14 18:53:31.000000000 +0200 >@@ -203,24 +203,38 @@ > } > } > >-void cmd_account_del_yes( gpointer w, void *data ) >+struct cmd_account_del_data > { >- account_t *a = data; >- irc_t *irc = a->irc; >+ account_t *a; >+ irc_t *irc; >+}; >+ >+void cmd_account_del_yes( void *data ) >+{ >+ struct cmd_account_del_data *cad = data; >+ account_t *a; >+ >+ for( a = cad->irc->accounts; a && a != cad->a; a = a->next ); > >- if( a->ic ) >+ if( a == NULL ) > { >- irc_usermsg( irc, "Account is still logged in, can't delete" ); >+ irc_usermsg( cad->irc, "Account already deleted" ); >+ } >+ else if( a->ic ) >+ { >+ irc_usermsg( cad->irc, "Account is still logged in, can't delete" ); > } > else > { >- account_del( irc, a ); >- irc_usermsg( irc, "Account deleted" ); >+ account_del( cad->irc, a ); >+ irc_usermsg( cad->irc, "Account deleted" ); > } >+ g_free( data ); > } > >-void cmd_account_del_no( gpointer w, void *data ) >+void cmd_account_del_no( void *data ) > { >+ g_free( data ); > } > > static void cmd_account( irc_t *irc, char **cmd ) >@@ -277,14 +291,19 @@ > } > else > { >+ struct cmd_account_del_data *cad; > char *msg; > >+ cad = g_malloc( sizeof( struct cmd_account_del_data ) ); >+ cad->a = a; >+ cad->irc = irc; >+ > msg = g_strdup_printf( "If you remove this account (%s(%s)), BitlBee will " > "also forget all your saved nicknames. If you want " > "to change your username/password, use the `account " > "set' command. Are you sure you want to delete this " > "account?", a->prpl->name, a->user ); >- query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, a ); >+ query_add( irc, NULL, msg, cmd_account_del_yes, cmd_account_del_no, cad ); > g_free( msg ); > } > } >@@ -583,6 +602,9 @@ > { > g_free( irc->mynick ); > irc->mynick = g_strdup( cmd[2] ); >+ >+ if( strcmp( cmd[0], "set_rename" ) != 0 ) >+ set_setstr( &irc->set, "root_nick", cmd[2] ); > } > else if( u->send_handler == buddy_send_handler ) > { >@@ -593,6 +615,20 @@ > } > } > >+char *set_eval_root_nick( set_t *set, char *new_nick ) >+{ >+ irc_t *irc = set->data; >+ >+ if( strcmp( irc->mynick, new_nick ) != 0 ) >+ { >+ char *cmd[] = { "set_rename", irc->mynick, new_nick, NULL }; >+ >+ cmd_rename( irc, cmd ); >+ } >+ >+ return strcmp( irc->mynick, new_nick ) == 0 ? new_nick : NULL; >+} >+ > static void cmd_remove( irc_t *irc, char **cmd ) > { > user_t *u; >@@ -1001,6 +1037,71 @@ > } > } > >+static void cmd_transfers( irc_t *irc, char **cmd ) >+{ >+ GSList *files = irc->file_transfers; >+ enum { LIST, REJECT, CANCEL }; >+ int subcmd = LIST; >+ int fid; >+ >+ if( !files ) >+ { >+ irc_usermsg( irc, "No pending transfers" ); >+ return; >+ } >+ >+ if( cmd[1] && >+ ( strcmp( cmd[1], "reject" ) == 0 ) ) >+ { >+ subcmd = REJECT; >+ } >+ else if( cmd[1] && >+ ( strcmp( cmd[1], "cancel" ) == 0 ) && >+ cmd[2] && >+ ( fid = atoi( cmd[2] ) ) ) >+ { >+ subcmd = CANCEL; >+ } >+ >+ for( ; files; files = g_slist_next( files ) ) >+ { >+ file_transfer_t *file = files->data; >+ >+ switch( subcmd ) { >+ case LIST: >+ if ( file->status == FT_STATUS_LISTENING ) >+ irc_usermsg( irc, >+ "Pending file(id %d): %s (Listening...)", file->local_id, file->file_name); >+ else >+ { >+ int kb_per_s = 0; >+ time_t diff = time( NULL ) - file->started; >+ if ( ( file->started > 0 ) && ( file->bytes_transferred > 0 ) ) >+ kb_per_s = file->bytes_transferred / 1024 / diff; >+ >+ irc_usermsg( irc, >+ "Pending file(id %d): %s (%10zd/%zd kb, %d kb/s)", file->local_id, file->file_name, >+ file->bytes_transferred/1024, file->file_size/1024, kb_per_s); >+ } >+ break; >+ case REJECT: >+ if( file->status == FT_STATUS_LISTENING ) >+ { >+ irc_usermsg( irc, "Rejecting file transfer for %s", file->file_name ); >+ imcb_file_canceled( file, "Denied by user" ); >+ } >+ break; >+ case CANCEL: >+ if( file->local_id == fid ) >+ { >+ irc_usermsg( irc, "Canceling file transfer for %s", file->file_name ); >+ imcb_file_canceled( file, "Canceled by user" ); >+ } >+ break; >+ } >+ } >+} >+ > const command_t commands[] = { > { "help", 0, cmd_help, 0 }, > { "identify", 1, cmd_identify, 0 }, >@@ -1021,5 +1122,6 @@ > { "nick", 1, cmd_nick, 0 }, > { "qlist", 0, cmd_qlist, 0 }, > { "join_chat", 2, cmd_join_chat, 0 }, >+ { "transfers", 0, cmd_transfers, 0 }, > { NULL } > }; >diff -urN bitlbee-1.2/set.c bitlbee-1.2-jabberft/set.c >--- bitlbee-1.2/set.c 2007-11-17 11:52:54.000000000 +0100 >+++ bitlbee-1.2-jabberft/set.c 2008-04-14 18:53:28.000000000 +0200 >@@ -229,18 +229,3 @@ > > return value; > } >- >-char *set_eval_charset( set_t *set, char *value ) >-{ >- GIConv cd; >- >- if ( g_strncasecmp( value, "none", 4 ) == 0 ) >- return value; >- >- cd = g_iconv_open( "UTF-8", value ); >- if( cd == (GIConv) -1 ) >- return NULL; >- >- g_iconv_close( cd ); >- return value; >-} >diff -urN bitlbee-1.2/set.h bitlbee-1.2-jabberft/set.h >--- bitlbee-1.2/set.h 2007-11-15 23:44:12.000000000 +0100 >+++ bitlbee-1.2-jabberft/set.h 2008-04-14 18:53:32.000000000 +0200 >@@ -96,6 +96,5 @@ > /* Some not very generic evaluators that really shouldn't be here... */ > char *set_eval_to_char( set_t *set, char *value ); > char *set_eval_ops( set_t *set, char *value ); >-char *set_eval_charset( set_t *set, char *value ); > > #endif /* __SET_H__ */ >diff -urN bitlbee-1.2/tests/check_irc.c bitlbee-1.2-jabberft/tests/check_irc.c >--- bitlbee-1.2/tests/check_irc.c 2007-06-30 23:18:43.000000000 +0200 >+++ bitlbee-1.2-jabberft/tests/check_irc.c 2008-04-14 18:53:31.000000000 +0200 >@@ -36,8 +36,8 @@ > > irc = irc_new(g_io_channel_unix_get_fd(ch1)); > >- fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\n" >- "USER a a a a\r\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL); >+ fail_unless(g_io_channel_write_chars(ch2, "NICK bla\r\r\n" >+ "USER a a a a\n", -1, NULL, NULL) == G_IO_STATUS_NORMAL); > fail_unless(g_io_channel_flush(ch2, NULL) == G_IO_STATUS_NORMAL); > > g_main_iteration(FALSE);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217660
:
149707
| 149708