| 39 static void irc_buddy_append(char *name, struct irc_buddy *ib, GString *string); |
39 static void irc_buddy_append(char *name, struct irc_buddy *ib, GString *string); |
| 40 |
40 |
| 41 static const char *irc_blist_icon(GaimAccount *a, GaimBuddy *b); |
41 static const char *irc_blist_icon(GaimAccount *a, GaimBuddy *b); |
| 42 static void irc_blist_emblems(GaimBuddy *b, char **se, char **sw, char **nw, char **ne); |
42 static void irc_blist_emblems(GaimBuddy *b, char **se, char **sw, char **nw, char **ne); |
| 43 static GList *irc_away_states(GaimConnection *gc); |
43 static GList *irc_away_states(GaimConnection *gc); |
| 44 static GList *irc_actions(GaimConnection *gc); |
44 static GList *irc_actions(GaimPlugin *plugin, gpointer context); |
| 45 /* static GList *irc_chat_info(GaimConnection *gc); */ |
45 /* static GList *irc_chat_info(GaimConnection *gc); */ |
| 46 static void irc_login(GaimAccount *account); |
46 static void irc_login(GaimAccount *account); |
| 47 static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); |
47 static void irc_login_cb(gpointer data, gint source, GaimInputCondition cond); |
| 48 static void irc_close(GaimConnection *gc); |
48 static void irc_close(GaimConnection *gc); |
| 49 static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags); |
49 static int irc_im_send(GaimConnection *gc, const char *who, const char *what, GaimConvImFlags flags); |
| 57 |
57 |
| 58 static GaimPlugin *_irc_plugin = NULL; |
58 static GaimPlugin *_irc_plugin = NULL; |
| 59 |
59 |
| 60 static const char *status_chars = "@+%&"; |
60 static const char *status_chars = "@+%&"; |
| 61 |
61 |
| 62 static void irc_view_motd(GaimConnection *gc) |
62 static void irc_view_motd(GaimPluginAction *action) |
| 63 { |
63 { |
| |
64 GaimConnection *gc = (GaimConnection *) action->context; |
| 64 struct irc_conn *irc; |
65 struct irc_conn *irc; |
| 65 char *title; |
66 char *title; |
| 66 |
67 |
| 67 if (gc == NULL || gc->proto_data == NULL) { |
68 if (gc == NULL || gc->proto_data == NULL) { |
| 68 gaim_debug(GAIM_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); |
69 gaim_debug(GAIM_DEBUG_ERROR, "irc", "got MOTD request for NULL gc\n"); |
| 129 static GList *irc_away_states(GaimConnection *gc) |
130 static GList *irc_away_states(GaimConnection *gc) |
| 130 { |
131 { |
| 131 return g_list_append(NULL, (gpointer)GAIM_AWAY_CUSTOM); |
132 return g_list_append(NULL, (gpointer)GAIM_AWAY_CUSTOM); |
| 132 } |
133 } |
| 133 |
134 |
| 134 static GList *irc_actions(GaimConnection *gc) |
135 static GList *irc_actions(GaimPlugin *plugin, gpointer context) |
| 135 { |
136 { |
| 136 struct proto_actions_menu *pam; |
|
| 137 GList *list = NULL; |
137 GList *list = NULL; |
| 138 |
138 GaimPluginAction *act = NULL; |
| 139 pam = g_new0(struct proto_actions_menu, 1); |
139 |
| 140 pam->label = _("View MOTD"); |
140 act = gaim_plugin_action_new(_("View MOTD"), irc_view_motd); |
| 141 pam->callback = irc_view_motd; |
141 list = g_list_append(list, act); |
| 142 pam->gc = gc; |
|
| 143 list = g_list_append(list, pam); |
|
| 144 |
142 |
| 145 return list; |
143 return list; |
| 146 } |
144 } |
| 147 |
145 |
| 148 static GList *irc_buddy_menu(GaimConnection *gc, const char *who) |
146 static GList *irc_buddy_menu(GaimConnection *gc, const char *who) |
| 619 NULL, /**< destroy */ |
616 NULL, /**< destroy */ |
| 620 |
617 |
| 621 NULL, /**< ui_info */ |
618 NULL, /**< ui_info */ |
| 622 &prpl_info, /**< extra_info */ |
619 &prpl_info, /**< extra_info */ |
| 623 NULL, |
620 NULL, |
| 624 NULL |
621 irc_actions |
| 625 }; |
622 }; |
| 626 |
623 |
| 627 static void _init_plugin(GaimPlugin *plugin) |
624 static void _init_plugin(GaimPlugin *plugin) |
| 628 { |
625 { |
| 629 GaimAccountUserSplit *split; |
626 GaimAccountUserSplit *split; |