Changeset a87754b
- Timestamp:
- 2010-05-08T01:02:12Z (15 years ago)
- Branches:
- master
- Children:
- bfb99ee
- Parents:
- e4816ea
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.h
re4816ea ra87754b 152 152 struct irc_channel_funcs 153 153 { 154 gboolean (*privmsg)( irc_channel_t *i u, const char *msg );154 gboolean (*privmsg)( irc_channel_t *ic, const char *msg ); 155 155 }; 156 156 -
irc_im.c
re4816ea ra87754b 252 252 253 253 /* IM->IRC: Groupchats */ 254 gboolean bee_irc_chat_new( bee_t *bee, struct groupchat *c ) 254 static const struct irc_channel_funcs irc_channel_im_chat_funcs; 255 256 static gboolean bee_irc_chat_new( bee_t *bee, struct groupchat *c ) 255 257 { 256 258 irc_t *irc = bee->ui_data; … … 272 274 c->ui_data = ic; 273 275 ic->data = c; 276 ic->f = &irc_channel_im_chat_funcs; 274 277 275 278 topic = g_strdup_printf( "BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", c->title ); … … 280 283 } 281 284 282 gboolean bee_irc_chat_free( bee_t *bee, struct groupchat *c )285 static gboolean bee_irc_chat_free( bee_t *bee, struct groupchat *c ) 283 286 { 284 287 irc_channel_t *ic = c->ui_data; … … 292 295 } 293 296 294 gboolean bee_irc_chat_log( bee_t *bee, struct groupchat *c, const char *text )297 static gboolean bee_irc_chat_log( bee_t *bee, struct groupchat *c, const char *text ) 295 298 { 296 299 irc_channel_t *ic = c->ui_data; … … 301 304 } 302 305 303 gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at )306 static gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at ) 304 307 { 305 308 irc_t *irc = bee->ui_data; … … 317 320 } 318 321 319 gboolean bee_irc_chat_add_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )322 static gboolean bee_irc_chat_add_user( bee_t *bee, struct groupchat *c, bee_user_t *bu ) 320 323 { 321 324 irc_t *irc = bee->ui_data; … … 326 329 } 327 330 328 gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )331 static gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_user_t *bu ) 329 332 { 330 333 irc_t *irc = bee->ui_data; … … 334 337 return TRUE; 335 338 } 339 340 /* IRC->IM */ 341 342 static gboolean bee_irc_channel_chat_privmsg( irc_channel_t *ic, const char *msg ) 343 { 344 struct groupchat *c = ic->data; 345 346 bee_chat_msg( ic->irc->b, c, msg, 0 ); 347 348 return TRUE; 349 350 } 351 352 static const struct irc_channel_funcs irc_channel_im_chat_funcs = { 353 bee_irc_channel_chat_privmsg, 354 }; 336 355 337 356 … … 342 361 } 343 362 344 gboolean bee_irc_ft_out_start( struct im_connection *ic, file_transfer_t *ft )363 static gboolean bee_irc_ft_out_start( struct im_connection *ic, file_transfer_t *ft ) 345 364 { 346 365 return dccs_recv_start( ft ); 347 366 } 348 367 349 void bee_irc_ft_close( struct im_connection *ic, file_transfer_t *ft )368 static void bee_irc_ft_close( struct im_connection *ic, file_transfer_t *ft ) 350 369 { 351 370 return dcc_close( ft ); 352 371 } 353 372 354 void bee_irc_ft_finished( struct im_connection *ic, file_transfer_t *file )373 static void bee_irc_ft_finished( struct im_connection *ic, file_transfer_t *file ) 355 374 { 356 375 dcc_file_transfer_t *df = file->priv; -
protocols/bee.h
re4816ea ra87754b 126 126 static int remove_chat_buddy_silent( struct groupchat *b, const char *handle ); 127 127 #endif 128 int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ); 128 129 129 130 #endif /* __BEE_H__ */ -
protocols/bee_chat.c
re4816ea ra87754b 247 247 } 248 248 #endif 249 250 int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags ) 251 { 252 struct im_connection *ic = c->ic; 253 char *buf = NULL; 254 int st; 255 256 if( ( ic->flags & OPT_DOES_HTML ) && ( g_strncasecmp( msg, "<html>", 6 ) != 0 ) ) 257 { 258 buf = escape_html( msg ); 259 msg = buf; 260 } 261 else 262 buf = g_strdup( msg ); 263 264 ic->acc->prpl->chat_msg( c, buf, flags ); 265 g_free( buf ); 266 267 return 1; 268 }
Note: See TracChangeset
for help on using the changeset viewer.