git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@932
959494ce-11ee-0310-bf91-
de5d638817bd
+static void regsigs(void)
+{
+ static GaimPlugin *regged = NULL;
+
+ if(regged != me) {
+ gaim_signal_connect(gaim_conversations_get_handle(), "chat-buddy-joining", me, GAIM_CALLBACK(gi_chatjoincb), NULL);
+ gaim_signal_connect(gaim_conversations_get_handle(), "chat-buddy-leaving", me, GAIM_CALLBACK(gi_chatleavecb), NULL);
+ regged = me;
+ }
+}
+
static void newpeercb(struct dc_fnetpeer *peer)
{
struct conndata *data;
static void newpeercb(struct dc_fnetpeer *peer)
{
struct conndata *data;
char *buf;
data = peer->fn->udata;
char *buf;
data = peer->fn->udata;
- if((conv = gaim_find_chat(data->gc, peer->fn->id)) != NULL)
- {
+ if((conv = gaim_find_chat(data->gc, peer->fn->id)) != NULL) {
buf = sprintf2("%s", icswcstombs(peer->nick, "UTF-8", NULL));
gaim_conv_chat_add_user(GAIM_CONV_CHAT(conv), buf, NULL, GAIM_CBFLAGS_NONE, TRUE);
free(buf);
buf = sprintf2("%s", icswcstombs(peer->nick, "UTF-8", NULL));
gaim_conv_chat_add_user(GAIM_CONV_CHAT(conv), buf, NULL, GAIM_CBFLAGS_NONE, TRUE);
free(buf);
char *buf;
data = peer->fn->udata;
char *buf;
data = peer->fn->udata;
- if((conv = gaim_find_chat(data->gc, peer->fn->id)) != NULL)
- {
+ if((conv = gaim_find_chat(data->gc, peer->fn->id)) != NULL) {
buf = sprintf2("%s", icswcstombs(peer->nick, "UTF-8", NULL));
gaim_conv_chat_remove_user(GAIM_CONV_CHAT(conv), buf, NULL);
free(buf);
buf = sprintf2("%s", icswcstombs(peer->nick, "UTF-8", NULL));
gaim_conv_chat_remove_user(GAIM_CONV_CHAT(conv), buf, NULL);
free(buf);
GaimConversation *conv;
char *peer, *msg;
GaimConversation *conv;
char *peer, *msg;
- if(((condition & GAIM_INPUT_READ) && dc_handleread()) || ((condition & GAIM_INPUT_WRITE) && dc_handlewrite()))
- {
+ if(((condition & GAIM_INPUT_READ) && dc_handleread()) || ((condition & GAIM_INPUT_WRITE) && dc_handlewrite())) {
disconnected(data);
gaim_connection_error(data->gc, "Server has disconnected");
return;
disconnected(data);
gaim_connection_error(data->gc, "Server has disconnected");
return;
char *buf;
GList *ul, *fl, *c;
char *buf;
GList *ul, *fl, *c;
data = gc->proto_data;
if((fn = dc_findfnetnode(GPOINTER_TO_INT(g_hash_table_lookup(chatdata, "id")))) == NULL)
return;
data = gc->proto_data;
if((fn = dc_findfnetnode(GPOINTER_TO_INT(g_hash_table_lookup(chatdata, "id")))) == NULL)
return;
protinfo.protocol_options = g_list_append(protinfo.protocol_options, opt);
opt = gaim_account_option_bool_new("Do not pop up private messages automatically", "represspm", FALSE);
protinfo.protocol_options = g_list_append(protinfo.protocol_options, opt);
protinfo.protocol_options = g_list_append(protinfo.protocol_options, opt);
opt = gaim_account_option_bool_new("Do not pop up private messages automatically", "represspm", FALSE);
protinfo.protocol_options = g_list_append(protinfo.protocol_options, opt);
- gaim_signal_connect(gaim_conversations_get_handle(), "chat-buddy-joining", pl, GAIM_CALLBACK(gi_chatjoincb), NULL);
- gaim_signal_connect(gaim_conversations_get_handle(), "chat-buddy-leaving", pl, GAIM_CALLBACK(gi_chatleavecb), NULL);