comparison src/server.c @ 1937:6a9109c79034

[gaim-migrate @ 1947] Laddy Daaaaaaaaa. Thanks faceprint :) committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 01 Jun 2001 21:27:59 +0000
parents 5bed3bc833b5
children c9db54d8d8dc
comparison
equal deleted inserted replaced
1936:f0b54f592486 1937:6a9109c79034
161 } 161 }
162 162
163 163
164 void serv_set_away(struct gaim_connection *gc, char *state, char *message) 164 void serv_set_away(struct gaim_connection *gc, char *state, char *message)
165 { 165 {
166 if (gc && gc->prpl && gc->prpl->set_away) { 166 if (gc && gc->prpl && gc->prpl->set_away)
167 (*gc->prpl->set_away)(gc, state, message); 167 {
168 plugin_event(event_away, gc, state, message, 0); 168 char *buf=NULL;
169 } 169 if(message)
170 system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON); 170 {
171 buf = g_malloc(strlen(message)+1);
172 if(gc->prpl->options & OPT_PROTO_HTML)
173 {
174 strncpy(buf, message, strlen(message)+1);
175 }
176 else
177 {
178 strncpy_nohtml(buf, message, strlen(message)+1);
179 }
180 }
181
182 (*gc->prpl->set_away)(gc, state, buf);
183 plugin_event(event_away, gc, state, buf, 0);
184
185 if(buf)
186 g_free(buf);
187 }
188
189 system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON);
171 } 190 }
172 191
173 void serv_set_away_all(char *message) 192 void serv_set_away_all(char *message)
174 { 193 {
175 GSList *c = connections; 194 GSList *c = connections;