- Timestamp:
- 2007-03-31T05:40:45Z (17 years ago)
- Branches:
- master
- Children:
- aef4828
- Parents:
- fa29d093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
rfa29d093 r0da65d5 230 230 231 231 for (account = irc->accounts; account; account = account->next) { 232 if (account-> gc) {233 account-> gc->wants_to_die = TRUE;234 signoff(account-> gc);232 if (account->ic) { 233 account->ic->wants_to_die = TRUE; 234 signoff(account->ic); 235 235 } else if (account->reconnect) { 236 236 cancel_auto_reconnect(account); … … 256 256 257 257 while (irc->accounts) 258 if (irc->accounts-> gc == NULL)258 if (irc->accounts->ic == NULL) 259 259 account_del(irc, irc->accounts); 260 260 else … … 633 633 user_t *u; 634 634 char namelist[385] = ""; 635 struct conversation*c = NULL;635 struct groupchat *c = NULL; 636 636 char *ops = set_getstr( &irc->set, "ops" ); 637 637 … … 649 649 } 650 650 651 if( u-> gc && !u->away && set_getbool( &irc->set, "away_devoice" ) )651 if( u->ic && !u->away && set_getbool( &irc->set, "away_devoice" ) ) 652 652 strcat( namelist, "+" ); 653 653 else if( ( strcmp( u->nick, irc->mynick ) == 0 && ( strcmp( ops, "root" ) == 0 || strcmp( ops, "both" ) == 0 ) ) || … … 668 668 strcmp( ops, "user" ) == 0 || strcmp( ops, "both" ) ? "@" : "", irc->nick ); 669 669 670 for( l = c->in_room; l; l = l->next ) if( ( u = user_findhandle( c-> gc, l->data ) ) )670 for( l = c->in_room; l; l = l->next ) if( ( u = user_findhandle( c->ic, l->data ) ) ) 671 671 { 672 672 if( strlen( namelist ) + strlen( u->nick ) > sizeof( namelist ) - 4 ) … … 812 812 else 813 813 { 814 struct conversation*c = chat_by_channel( channel );814 struct groupchat *c = chat_by_channel( channel ); 815 815 816 816 if( c ) … … 911 911 char reason[128]; 912 912 913 if( u-> gc && u->gc->flags & OPT_LOGGING_OUT )914 { 915 if( u-> gc->acc->server )913 if( u->ic && u->ic->flags & OPT_LOGGING_OUT ) 914 { 915 if( u->ic->acc->server ) 916 916 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 917 u-> gc->acc->server );918 else if( ( s = strchr( u-> gc->username, '@' ) ) )917 u->ic->acc->server ); 918 else if( ( s = strchr( u->ic->username, '@' ) ) ) 919 919 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 920 920 s + 1 ); 921 921 else 922 922 g_snprintf( reason, sizeof( reason ), "%s %s.%s", irc->myhost, 923 u-> gc->acc->prpl->name, irc->myhost );923 u->ic->acc->prpl->name, irc->myhost ); 924 924 925 925 /* proto_opt might contain garbage after the : */ … … 945 945 int irc_send( irc_t *irc, char *nick, char *s, int flags ) 946 946 { 947 struct conversation*c = NULL;947 struct groupchat *c = NULL; 948 948 user_t *u = NULL; 949 949 … … 997 997 else if( g_strncasecmp( s + 1, "TYPING", 6 ) == 0 ) 998 998 { 999 if( u && u-> gc && u->gc->acc->prpl->send_typing && strlen( s ) >= 10 )999 if( u && u->ic && u->ic->acc->prpl->send_typing && strlen( s ) >= 10 ) 1000 1000 { 1001 1001 time_t current_typing_notice = time( NULL ); … … 1003 1003 if( current_typing_notice - u->last_typing_notice >= 5 ) 1004 1004 { 1005 u-> gc->acc->prpl->send_typing( u->gc, u->handle, s[8] == '1' );1005 u->ic->acc->prpl->send_typing( u->ic, u->handle, s[8] == '1' ); 1006 1006 u->last_typing_notice = current_typing_notice; 1007 1007 } … … 1036 1036 } 1037 1037 } 1038 else if( c && c-> gc && c->gc->acc && c->gc->acc->prpl )1039 { 1040 return( bim_chat_msg( c, s ) );1038 else if( c && c->ic && c->ic->acc && c->ic->acc->prpl ) 1039 { 1040 return( bim_chat_msg( c, s, 0 ) ); 1041 1041 } 1042 1042 … … 1053 1053 1054 1054 u->sendbuf[u->sendbuf_len-2] = 0; /* Cut off the last newline */ 1055 bim_buddy_msg( u-> gc, u->handle, u->sendbuf, u->sendbuf_flags );1055 bim_buddy_msg( u->ic, u->handle, u->sendbuf, u->sendbuf_flags ); 1056 1056 1057 1057 g_free( u->sendbuf ); … … 1066 1066 void buddy_send_handler( irc_t *irc, user_t *u, char *msg, int flags ) 1067 1067 { 1068 if( !u || !u-> gc ) return;1068 if( !u || !u->ic ) return; 1069 1069 1070 1070 if( set_getbool( &irc->set, "buddy_sendbuffer" ) && set_getint( &irc->set, "buddy_sendbuffer_delay" ) > 0 ) … … 1105 1105 else 1106 1106 { 1107 bim_buddy_msg( u-> gc, u->handle, msg, flags );1107 bim_buddy_msg( u->ic, u->handle, msg, flags ); 1108 1108 } 1109 1109 }
Note: See TracChangeset
for help on using the changeset viewer.