comparison src/protocols/irc/irc.c @ 4111:ee884f1d7ae3

[gaim-migrate @ 4326] <Robot101> adds a gc->flag called OPT_CONN_AUTO_RESP so that gc->away can always store the away message even if the prpl doesn't support autoresponding <Robot101> makes all protos correctly free and set gc->away to avoid leaks <Robot101> stores the current away state in gc->away_state whenever gc->away is non-NULL (ie it's not just a plain on-line) <Robot101> also minor change to Jabber to make Chatty an away state, and to Gadu-Gadu to make some other thing an away state too committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 21 Dec 2002 19:33:54 +0000
parents bb4aabb9ba53
children 474265997752
comparison
equal deleted inserted replaced
4110:64d983d6b7bb 4111:ee884f1d7ae3
2288 irc_set_away(struct gaim_connection *gc, char *state, char *msg) 2288 irc_set_away(struct gaim_connection *gc, char *state, char *msg)
2289 { 2289 {
2290 struct irc_data *idata = gc->proto_data; 2290 struct irc_data *idata = gc->proto_data;
2291 char buf[IRC_BUF_LEN]; 2291 char buf[IRC_BUF_LEN];
2292 2292
2293 if (gc->away) 2293 if (gc->away) {
2294 g_free(gc->away);
2294 gc->away = NULL; 2295 gc->away = NULL;
2296 }
2295 2297
2296 if (msg) { 2298 if (msg) {
2297 g_snprintf(buf, sizeof(buf), "AWAY :%s\r\n", msg); 2299 g_snprintf(buf, sizeof(buf), "AWAY :%s\r\n", msg);
2298 gc->away = ""; 2300 gc->away = g_strdup(msg);
2299 } else 2301 } else
2300 g_snprintf(buf, sizeof(buf), "AWAY\r\n"); 2302 g_snprintf(buf, sizeof(buf), "AWAY\r\n");
2303
2301 irc_write(idata->fd, buf, strlen(buf)); 2304 irc_write(idata->fd, buf, strlen(buf));
2302 } 2305 }
2303 2306
2304 static char ** 2307 static char **
2305 irc_list_icon(int uc) 2308 irc_list_icon(int uc)