Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 12031:bef758a67e48
[gaim-migrate @ 14324]
These rapid IRC pings are a Really Bad Idea. I'm not sure how they
got in, and I don't really want to know. In any case, I'm removing
them. If we want to add a keepalive which fires only when there is a
truly idle connection, and after some suitable delay, then that's fine
... but this was not that.
committer: Tailor Script <tailor@pidgin.im>
| author | Ethan Blanton <elb@pidgin.im> |
|---|---|
| date | Wed, 09 Nov 2005 19:02:48 +0000 |
| parents | 8bcccf2988fa |
| children | 5d9a74c47108 |
comparison
equal
deleted
inserted
replaced
| 12030:7165a7a444da | 12031:bef758a67e48 |
|---|---|
| 49 static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); | 49 static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); |
| 50 static void irc_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, gpointer data); | 50 static void irc_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, gpointer data); |
| 51 static void irc_close(GaimConnection *gc); | 51 static void irc_close(GaimConnection *gc); |
| 52 static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags); | 52 static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags); |
| 53 static int irc_chat_send(GaimConnection *gc, int id, const char *what); | 53 static int irc_chat_send(GaimConnection *gc, int id, const char *what); |
| 54 static void irc_ping_server(GaimConnection *gc); | |
| 55 static void irc_chat_join (GaimConnection *gc, GHashTable *data); | 54 static void irc_chat_join (GaimConnection *gc, GHashTable *data); |
| 56 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond); | 55 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond); |
| 57 static void irc_input_cb_ssl(gpointer data, GaimSslConnection *gsc, GaimInputCondition cond); | 56 static void irc_input_cb_ssl(gpointer data, GaimSslConnection *gsc, GaimInputCondition cond); |
| 58 | 57 |
| 59 static guint irc_nick_hash(const char *nick); | 58 static guint irc_nick_hash(const char *nick); |
| 618 | 617 |
| 619 tmp = g_markup_escape_text(what, -1); | 618 tmp = g_markup_escape_text(what, -1); |
| 620 serv_got_chat_in(gc, id, gaim_connection_get_display_name(gc), 0, tmp, time(NULL)); | 619 serv_got_chat_in(gc, id, gaim_connection_get_display_name(gc), 0, tmp, time(NULL)); |
| 621 g_free(tmp); | 620 g_free(tmp); |
| 622 return 0; | 621 return 0; |
| 623 } | |
| 624 | |
| 625 static void irc_ping_server(GaimConnection *gc) | |
| 626 { | |
| 627 struct irc_conn *irc = gc->proto_data; | |
| 628 gchar *buf; | |
| 629 | |
| 630 buf = irc_format(irc, "vv", "PING", irc->server); | |
| 631 irc_send(irc, buf); | |
| 632 g_free(buf); | |
| 633 } | 622 } |
| 634 | 623 |
| 635 static guint irc_nick_hash(const char *nick) | 624 static guint irc_nick_hash(const char *nick) |
| 636 { | 625 { |
| 637 char *lc; | 626 char *lc; |
| 759 irc_get_chat_name, /* get_chat_name */ | 748 irc_get_chat_name, /* get_chat_name */ |
| 760 irc_chat_invite, /* chat_invite */ | 749 irc_chat_invite, /* chat_invite */ |
| 761 irc_chat_leave, /* chat_leave */ | 750 irc_chat_leave, /* chat_leave */ |
| 762 NULL, /* chat_whisper */ | 751 NULL, /* chat_whisper */ |
| 763 irc_chat_send, /* chat_send */ | 752 irc_chat_send, /* chat_send */ |
| 764 irc_ping_server, /* keepalive */ | 753 NULL, /* keepalive */ |
| 765 NULL, /* register_user */ | 754 NULL, /* register_user */ |
| 766 NULL, /* get_cb_info */ | 755 NULL, /* get_cb_info */ |
| 767 NULL, /* get_cb_away */ | 756 NULL, /* get_cb_away */ |
| 768 NULL, /* alias_buddy */ | 757 NULL, /* alias_buddy */ |
| 769 NULL, /* group_buddy */ | 758 NULL, /* group_buddy */ |
