Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 11083:8faabf4081ca
[gaim-migrate @ 13101]
sf patch #1225691, from Levi Bard
Implements gc->keepalive for irc
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 11 Jul 2005 00:36:28 +0000 |
| parents | b2ace57224e2 |
| children | 8e600ee6ec61 |
comparison
equal
deleted
inserted
replaced
| 11082:e25575a59f01 | 11083:8faabf4081ca |
|---|---|
| 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); | |
| 54 static void irc_chat_join (GaimConnection *gc, GHashTable *data); | 55 static void irc_chat_join (GaimConnection *gc, GHashTable *data); |
| 55 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond); | 56 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond); |
| 56 static void irc_input_cb_ssl(gpointer data, GaimSslConnection *gsc, GaimInputCondition cond); | 57 static void irc_input_cb_ssl(gpointer data, GaimSslConnection *gsc, GaimInputCondition cond); |
| 57 | 58 |
| 58 static guint irc_nick_hash(const char *nick); | 59 static guint irc_nick_hash(const char *nick); |
| 623 | 624 |
| 624 tmp = g_markup_escape_text(what, -1); | 625 tmp = g_markup_escape_text(what, -1); |
| 625 serv_got_chat_in(gc, id, gaim_connection_get_display_name(gc), 0, tmp, time(NULL)); | 626 serv_got_chat_in(gc, id, gaim_connection_get_display_name(gc), 0, tmp, time(NULL)); |
| 626 g_free(tmp); | 627 g_free(tmp); |
| 627 return 0; | 628 return 0; |
| 629 } | |
| 630 | |
| 631 static void irc_ping_server(GaimConnection *gc) | |
| 632 { | |
| 633 struct irc_conn *irc = gc->proto_data; | |
| 634 gchar *buf; | |
| 635 | |
| 636 buf = irc_format(irc, "vv", "PING", irc->server); | |
| 637 irc_send(irc, buf); | |
| 638 g_free(buf); | |
| 628 } | 639 } |
| 629 | 640 |
| 630 static guint irc_nick_hash(const char *nick) | 641 static guint irc_nick_hash(const char *nick) |
| 631 { | 642 { |
| 632 char *lc; | 643 char *lc; |
| 776 irc_get_chat_name, /* get_chat_name */ | 787 irc_get_chat_name, /* get_chat_name */ |
| 777 irc_chat_invite, /* chat_invite */ | 788 irc_chat_invite, /* chat_invite */ |
| 778 irc_chat_leave, /* chat_leave */ | 789 irc_chat_leave, /* chat_leave */ |
| 779 NULL, /* chat_whisper */ | 790 NULL, /* chat_whisper */ |
| 780 irc_chat_send, /* chat_send */ | 791 irc_chat_send, /* chat_send */ |
| 781 NULL, /* keepalive */ | 792 irc_ping_server, /* keepalive */ |
| 782 NULL, /* register_user */ | 793 NULL, /* register_user */ |
| 783 NULL, /* get_cb_info */ | 794 NULL, /* get_cb_info */ |
| 784 NULL, /* get_cb_away */ | 795 NULL, /* get_cb_away */ |
| 785 NULL, /* alias_buddy */ | 796 NULL, /* alias_buddy */ |
| 786 NULL, /* group_buddy */ | 797 NULL, /* group_buddy */ |
