diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/message.c | 29 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 1 |
2 files changed, 1 insertions, 29 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 16a51829..b0b17214 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -136,18 +136,6 @@ _message_send_groupchat_subject(const char * const room, const char * const subj } static void -_message_send_duck(const char * const query) -{ - xmpp_conn_t * const conn = connection_get_conn(); - xmpp_ctx_t * const ctx = connection_get_ctx(); - xmpp_stanza_t *message = stanza_create_message(ctx, "im@ddg.gg", - STANZA_TYPE_CHAT, query, NULL); - - xmpp_send(conn, message); - xmpp_stanza_release(message); -} - -static void _message_send_invite(const char * const room, const char * const contact, const char * const reason) { @@ -438,22 +426,8 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, gchar *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM); Jid *jid = jid_create(from); - // handle ddg searches - if (strcmp(jid->barejid, "im@ddg.gg") == 0) { - xmpp_stanza_t *body = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_BODY); - if (body != NULL) { - char *message = xmpp_stanza_get_text(body); - if (message != NULL) { - handle_duck_result(message); - xmpp_free(ctx, message); - } - } - - jid_destroy(jid); - return 1; - // private message from chat room use full jid (room/nick) - } else if (muc_active(jid->barejid)) { + if (muc_active(jid->barejid)) { // determine if the notifications happened whilst offline GTimeVal tv_stamp; gboolean delayed = stanza_get_delay(stanza, &tv_stamp); @@ -533,7 +507,6 @@ message_init_module(void) { message_send = _message_send; message_send_groupchat = _message_send_groupchat; - message_send_duck = _message_send_duck; message_send_invite = _message_send_invite; message_send_composing = _message_send_composing; message_send_paused = _message_send_paused; diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 798cb339..1d391cbc 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -164,7 +164,6 @@ void (*message_send_paused)(const char * const recipient); void (*message_send_gone)(const char * const recipient); void (*message_send_invite)(const char * const room, const char * const contact, const char * const reason); -void (*message_send_duck)(const char * const query); // presence functions void (*presence_subscription)(const char * const jid, const jabber_subscr_t action); |