Changeset fb11647a
- Timestamp:
- 2011-10-01T14:55:24Z (13 years ago)
- Branches:
- master
- Children:
- 3231485
- Parents:
- da44b08
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.h
rda44b08 rfb11647a 350 350 void bee_irc_channel_update( irc_t *irc, irc_channel_t *ic, irc_user_t *iu ); 351 351 void bee_irc_user_nick_reset( irc_user_t *iu ); 352 void bee_irc_msg_from_user( irc_user_t *iu, const char *msg, time_t sent_at ); 352 353 353 354 #endif -
irc_im.c
rda44b08 rfb11647a 193 193 } 194 194 195 static gboolean bee_irc_user_msg( bee_t *bee, bee_user_t *bu, const char *msg_, time_t sent_at ) 196 { 197 irc_t *irc = bee->ui_data; 198 irc_user_t *iu = (irc_user_t *) bu->ui_data; 195 void bee_irc_msg_from_user( irc_user_t *iu, const char *msg, time_t sent_at ) 196 { 197 irc_t *irc = iu->irc; 198 bee_t *bee = irc->b; 199 irc_channel_t *ic = NULL; 199 200 char *dst, *prefix = NULL; 200 201 char *wrapped, *ts = NULL; 201 irc_channel_t *ic = NULL; 202 char *msg = g_strdup( msg_ ); 203 GSList *l; 204 202 205 203 if( sent_at > 0 && set_getbool( &irc->b->set, "display_timestamps" ) ) 206 204 ts = irc_format_timestamp( irc, sent_at ); … … 226 224 ts = NULL; 227 225 } 226 227 wrapped = word_wrap( msg, 425 ); 228 irc_send_msg( iu, "PRIVMSG", dst, wrapped, prefix ); 229 230 g_free( wrapped ); 231 g_free( prefix ); 232 g_free( ts ); 233 } 234 235 static gboolean bee_irc_user_msg( bee_t *bee, bee_user_t *bu, const char *msg_, time_t sent_at ) 236 { 237 irc_user_t *iu = (irc_user_t *) bu->ui_data; 238 char *msg = g_strdup( msg_ ); 239 GSList *l; 228 240 229 241 for( l = irc_plugins; l; l = l->next ) … … 256 268 } 257 269 258 wrapped = word_wrap( msg, 425 ); 259 irc_send_msg( iu, "PRIVMSG", dst, wrapped, prefix ); 260 261 g_free( wrapped ); 262 g_free( prefix ); 270 bee_irc_msg_from_user( iu, msg, sent_at ); 271 263 272 g_free( msg ); 264 g_free( ts );265 266 273 return TRUE; 267 274 }
Note: See TracChangeset
for help on using the changeset viewer.