Changeset 1f0224c
- Timestamp:
- 2010-06-06T01:11:13Z (14 years ago)
- Branches:
- master
- Children:
- 88eaf4b
- Parents:
- 18da20b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.h
r18da20b r1f0224c 239 239 void irc_send_join( irc_channel_t *ic, irc_user_t *iu ); 240 240 void irc_send_part( irc_channel_t *ic, irc_user_t *iu, const char *reason ); 241 void irc_send_quit( irc_user_t *iu, const char *reason ); 241 242 void irc_send_names( irc_channel_t *ic ); 242 243 void irc_send_topic( irc_channel_t *ic, gboolean topic_change ); -
irc_send.c
r18da20b r1f0224c 153 153 } 154 154 155 void irc_send_quit( irc_user_t *iu, const char *reason ) 156 { 157 irc_write( iu->irc, ":%s!%s@%s QUIT :%s", iu->nick, iu->user, iu->host, reason ? : "" ); 158 } 159 155 160 void irc_send_names( irc_channel_t *ic ) 156 161 { -
irc_user.c
r18da20b r1f0224c 50 50 { 51 51 GSList *l; 52 gboolean send_quit = FALSE; 52 53 53 54 if( !iu ) … … 58 59 59 60 for( l = irc->channels; l; l = l->next ) 60 irc_channel_del_user( (irc_channel_t*) l->data, iu, FALSE, NULL ); 61 send_quit |= irc_channel_del_user( (irc_channel_t*) l->data, iu, TRUE, NULL ); 62 63 if( send_quit ) 64 { 65 static struct im_connection *last_ic; 66 static char *msg; 67 68 if( iu->bu && 69 ( iu->bu->ic->flags & OPT_LOGGING_OUT ) && 70 iu->bu->ic != last_ic ) 71 { 72 char host_prefix[] = "bitlbee."; 73 char *s; 74 75 /* Irssi recognises netsplits by quitmsgs with two 76 hostnames, where a hostname is a "word" with one 77 of more dots. Mangle no-dot hostnames a bit. */ 78 if( strchr( irc->root->host, '.' ) ) 79 *host_prefix = '\0'; 80 81 last_ic = iu->bu->ic; 82 g_free( msg ); 83 if( !set_getbool( &irc->b->set, "simulate_netsplit" ) ) 84 msg = g_strdup( "Account off-line" ); 85 else if( ( s = strchr( iu->bu->ic->acc->user, '@' ) ) ) 86 msg = g_strdup_printf( "%s%s %s", host_prefix, 87 irc->root->host, s + 1 ); 88 else 89 msg = g_strdup_printf( "%s%s %s.%s", 90 host_prefix, irc->root->host, 91 iu->bu->ic->acc->prpl->name, irc->root->host ); 92 } 93 else if( !iu->bu || !( iu->bu->ic->flags & OPT_LOGGING_OUT ) ) 94 { 95 g_free( msg ); 96 msg = g_strdup( "Removed" ); 97 last_ic = NULL; 98 } 99 irc_send_quit( iu, msg ); 100 } 61 101 62 102 g_free( iu->nick );
Note: See TracChangeset
for help on using the changeset viewer.