- Timestamp:
- 2010-04-02T03:25:41Z (14 years ago)
- Branches:
- master
- Children:
- 1d39159
- Parents:
- 231b08b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
r231b08b rf012a9f 63 63 } 64 64 65 if( set_getbool( &bee->set, "private" ) ) 66 iu->flags |= IRC_USER_PRIVATE; 67 65 68 iu->f = &irc_user_im_funcs; 66 69 //iu->last_typing_notice = 0; … … 90 93 } 91 94 95 static gboolean bee_irc_user_msg( bee_t *bee, bee_user_t *bu, const char *msg, time_t sent_at ) 96 { 97 irc_t *irc = bee->ui_data; 98 irc_channel_t *ic = irc->channels->data; 99 irc_user_t *iu = (irc_user_t *) bu->ui_data; 100 char *dst, *prefix = NULL; 101 char *wrapped; 102 103 if( iu->flags & IRC_USER_PRIVATE ) 104 { 105 dst = irc->user->nick; 106 } 107 else 108 { 109 dst = ic->name; 110 prefix = g_strdup_printf( "%s%s", irc->user->nick, set_getstr( &bee->set, "to_char" ) ); 111 } 112 113 wrapped = word_wrap( msg, 425 ); 114 irc_send_msg( iu, "PRIVMSG", dst, wrapped, prefix ); 115 116 g_free( wrapped ); 117 g_free( prefix ); 118 119 return TRUE; 120 } 121 92 122 const struct bee_ui_funcs irc_ui_funcs = { 93 123 bee_irc_user_new, 94 124 bee_irc_user_free, 95 125 bee_irc_user_status, 126 bee_irc_user_msg, 96 127 }; 97 128
Note: See TracChangeset
for help on using the changeset viewer.