From 2c2df7dd91930345a9b22a8bb61327d1dcc7e3d5 Mon Sep 17 00:00:00 2001 From: ulim Date: Wed, 28 Nov 2007 22:07:30 +0100 Subject: Initial import of jabber file receive and DCC send support. This introduces only a few changes to bitlbees code, mainly the addition of the "transfers" command. This is known to work with Kopete, Psi, and Pidgin (formerly known as gaim). At least with Pidgin also over a proxy. DCC has only been tested with irssi. IPV6 is untested but should work. Currently, only receiving via SOCKS5BYTESREAMS is implemented. I'm not sure if the alternative(in-band bytestreams IBB) is worth implementing since I didn't see a client yet that can do it. Additionally, it is probably very slow and needs support by the server as well. --- protocols/nogaim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 0e890464..8651754a 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -42,6 +42,7 @@ #include "account.h" #include "proxy.h" #include "md5.h" +#include "ft.h" #define BUF_LEN MSG_LEN #define BUF_LONG ( BUF_LEN * 2 ) -- cgit v1.2.3 From 2ff20765990c756533957e8da9c7c29dd3102e79 Mon Sep 17 00:00:00 2001 From: ulim Date: Mon, 3 Dec 2007 15:28:45 +0100 Subject: Intermediate commit. Sending seems to work. TODOs: * move from out_of_data to is_writable, eliminate buffers * implement "transfers reject [id]" * documentation in commands.xml * implement throughput and cummulative throughput boundaries * feature discovery before sending * implement sending over a proxy (proxy discovery, socks5 client handshake for sending, activate message) * integrate toxik-mek-ft --- protocols/nogaim.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 8651754a..f17c5a1e 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -228,6 +228,9 @@ struct prpl { /* 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. */ -- cgit v1.2.3 From cd741d8e2bb0b7d08cf36d90f5332a639f190281 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 23 Nov 2009 23:23:37 +0000 Subject: Fixed compatibility with non-libpurple version: oscar is now recognized as a protocol name, and removed prpl- hack from nogaim.c. --- protocols/nogaim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index dc6154e2..ae329b91 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -132,6 +132,7 @@ struct prpl { /* You should set this to the name of your protocol. * - The user sees this name ie. when imcb_log() is used. */ const char *name; + void *data; /* Added this one to be able to add per-account settings, don't think * it should be used for anything else. You are supposed to use the -- cgit v1.2.3 From 81e04e162bdc4517b2f357fd16dfd76f68245464 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 31 Mar 2010 22:32:25 -0400 Subject: nogaim.c is close to doing something useful again without speaking any IRC itself. --- protocols/nogaim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 324a2b46..4a334bf2 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -86,7 +86,7 @@ struct im_connection int evil; /* BitlBee */ - irc_t *irc; + bee_t *bee; struct groupchat *groupchats; }; -- cgit v1.2.3 From d860a8ddf5039f7208bff4c179bc9fe1549da6da Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 31 Mar 2010 23:38:50 -0400 Subject: Restored "account" root command and restored enough stuff to be able to send messages. Also started moving stuff out from nogaim.* into bee_* files. --- protocols/nogaim.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 4a334bf2..a93dc5d2 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -1,7 +1,7 @@ /********************************************************************\ * BitlBee -- An IRC to other IM-networks gateway * * * - * Copyright 2002-2004 Wilmer van der Gaast and others * + * Copyright 2002-2010 Wilmer van der Gaast and others * \********************************************************************/ /* @@ -285,16 +285,8 @@ G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *h G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ); G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick ); -/* Buddy activity */ -/* To manipulate the status of a handle. - * - flags can be |='d with OPT_* constants. You will need at least: - * OPT_LOGGED_IN and OPT_AWAY. - * - 'state' and 'message' can be NULL */ -G_MODULE_EXPORT void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message ); -/* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ); -/* Call when a handle says something. 'flags' and 'sent_at may be just 0. */ -G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ); G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ); +G_MODULE_EXPORT struct bee_user *imcb_buddy_by_handle( struct im_connection *ic, const char *handle ); G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); /* Groupchats */ @@ -319,7 +311,6 @@ G_MODULE_EXPORT void imcb_chat_free( struct groupchat *c ); /* Actions, or whatever. */ int imc_away_send_update( struct im_connection *ic ); -int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags ); int imc_chat_msg( struct groupchat *c, char *msg, int flags ); void imc_add_allow( struct im_connection *ic, char *handle ); -- cgit v1.2.3 From aea8b68bd0e057441d671c008200e71dd046a211 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 6 May 2010 01:28:56 +0100 Subject: Starting to restore chatroom stuff. Only enough to create and be joined into a room. More will follow soon. --- protocols/nogaim.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 6632827c..580b4001 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -88,7 +88,7 @@ struct im_connection /* BitlBee */ bee_t *bee; - struct groupchat *groupchats; + GSList *groupchats; }; struct groupchat { @@ -99,10 +99,9 @@ struct groupchat { * "nick list". This is how you can check who is in the group chat * already, for example to avoid adding somebody two times. */ GList *in_room; - GList *ignored; + //GList *ignored; - struct groupchat *next; - char *channel; + //struct groupchat *next; /* The title variable contains the ID you gave when you created the * chat using imcb_chat_new(). */ char *title; @@ -113,6 +112,7 @@ struct groupchat { /* This is for you, you can add your own structure here to extend this * structure for your protocol's needs. */ void *data; + void *ui_data; }; struct buddy { -- cgit v1.2.3 From d0527c1845ed1230bbc3b0f94b8643cd8f9fddc3 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 17 Jul 2010 12:34:24 +0100 Subject: libpurple: Handle incoming authorization requests. --- protocols/nogaim.h | 1 + 1 file changed, 1 insertion(+) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 5ce62742..e2933e4a 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -268,6 +268,7 @@ G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G * - '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, query_callback doit, query_callback dont ); +G_MODULE_EXPORT void imcb_ask_with_free( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont, query_callback myfree ); /* Two common questions you may want to ask: * - X added you to his contact list, allow? -- cgit v1.2.3 From 6d8cc053c4b247ad721a0760b13cd383d758c2c5 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 19 Jul 2010 00:50:27 +0100 Subject: Adding easy migration from old show_offline/away_devoice settings, and documentation. --- protocols/nogaim.h | 1 - 1 file changed, 1 deletion(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index e2933e4a..1d9ac71e 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -323,7 +323,6 @@ void imc_rem_block( struct im_connection *ic, char *handle ); /* Misc. stuff */ char *set_eval_timezone( set_t *set, char *value ); -char *set_eval_away_devoice( set_t *set, char *value ); gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond ); void cancel_auto_reconnect( struct account *a ); -- cgit v1.2.3 From 03f38289e15c27b93f8fdecf22a03353e4d01096 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 24 Jul 2010 16:06:22 +0200 Subject: Adding protocol-specific chatroom settings. First one to use this: AIM chatrooms to use exchange numbers other than 4. --- protocols/nogaim.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'protocols/nogaim.h') diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 1d9ac71e..46f6535a 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -211,13 +211,19 @@ struct prpl { * your protocol does not support publicly named group chats, then do * not implement this. */ struct groupchat * - (* chat_join) (struct im_connection *, const char *room, const char *nick, const char *password); + (* chat_join) (struct im_connection *, const char *room, + const char *nick, const char *password, set_t **sets); /* Change the topic, if supported. Note that BitlBee expects the IM server to confirm the topic change with a regular topic change event. If it doesn't do that, you have to fake it to make it visible to the user. */ void (* chat_topic) (struct groupchat *, char *topic); + /* If your protocol module needs any special info for joining chatrooms + other than a roomname + nickname, add them here. */ + void (* chat_add_settings) (account_t *acc, set_t **head); + void (* chat_free_settings) (account_t *acc, set_t **head); + /* You can tell what away states your protocol supports, so that * BitlBee will try to map the IRC away reasons to them. If your * protocol doesn't have any, just return one generic "Away". */ @@ -233,6 +239,13 @@ struct prpl { /* Incoming transfer request */ void (* transfer_request) (struct im_connection *, file_transfer_t *ft, char *handle ); + + /* Some placeholders so eventually older plugins may cooperate with newer BitlBees. */ + void *resv1; + void *resv2; + void *resv3; + void *resv4; + void *resv5; }; /* im_api core stuff. */ -- cgit v1.2.3