comparison src/server.c @ 1938:c9db54d8d8dc

[gaim-migrate @ 1948] uh committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 01 Jun 2001 21:33:08 +0000
parents 6a9109c79034
children 24aed1c31342
comparison
equal deleted inserted replaced
1937:6a9109c79034 1938:c9db54d8d8dc
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 {
168 char *buf=NULL; 167 char *buf=NULL;
169 if(message) 168 if(message) {
170 { 169 buf = g_malloc(strlen(message)+1);
171 buf = g_malloc(strlen(message)+1); 170 if(gc->prpl->options & OPT_PROTO_HTML)
172 if(gc->prpl->options & OPT_PROTO_HTML) 171 strncpy(buf, message, strlen(message)+1);
173 { 172 else
174 strncpy(buf, message, strlen(message)+1); 173 strncpy_nohtml(buf, message, strlen(message)+1);
175 }
176 else
177 {
178 strncpy_nohtml(buf, message, strlen(message)+1);
179 } 174 }
180 } 175
181 176 (*gc->prpl->set_away)(gc, state, buf);
182 (*gc->prpl->set_away)(gc, state, buf); 177 plugin_event(event_away, gc, state, buf, 0);
183 plugin_event(event_away, gc, state, buf, 0); 178
184 179 if(buf)
185 if(buf) 180 g_free(buf);
186 g_free(buf); 181 }
187 } 182
188 183 system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON);
189 system_log(log_away, gc, NULL, OPT_LOG_BUDDY_AWAY | OPT_LOG_MY_SIGNON);
190 } 184 }
191 185
192 void serv_set_away_all(char *message) 186 void serv_set_away_all(char *message)
193 { 187 {
194 GSList *c = connections; 188 GSList *c = connections;