Changes in irc.c [574af7e:3af70b0]
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r574af7e r3af70b0 179 179 } 180 180 181 irc->status = USTATUS_SHUTDOWN;181 irc->status |= USTATUS_SHUTDOWN; 182 182 if( irc->sendbuffer && !immed ) 183 183 { … … 213 213 log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); 214 214 215 if( irc->status >=USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) )215 if( irc->status & USTATUS_IDENTIFIED && set_getint( irc, "save_on_quit" ) ) 216 216 if( storage_save( irc, TRUE ) != STORAGE_OK ) 217 217 irc_usermsg( irc, "Error while saving settings!" ); … … 701 701 if( irc->user && irc->nick ) 702 702 { 703 if( global.conf->authmode == AUTHMODE_CLOSED && irc->status < USTATUS_AUTHORIZED)703 if( global.conf->authmode == AUTHMODE_CLOSED && !( irc->status & USTATUS_AUTHORIZED ) ) 704 704 { 705 705 irc_reply( irc, 464, ":This server is password-protected." ); … … 758 758 ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname ); 759 759 760 irc->status = USTATUS_LOGGED_IN;760 irc->status |= USTATUS_LOGGED_IN; 761 761 } 762 762 … … 899 899 void irc_kill( irc_t *irc, user_t *u ) 900 900 { 901 char *nick; 902 903 irc_write( irc, ":%s!%s@%s QUIT :%s", u->nick, u->user, u->host, "Leaving..." ); 901 char *nick, *s; 902 char reason[64]; 903 904 if( u->gc && u->gc->flags & OPT_LOGGING_OUT ) 905 { 906 if( u->gc->user->proto_opt[0][0] ) 907 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 908 u->gc->user->proto_opt[0] ); 909 else if( ( s = strchr( u->gc->username, '@' ) ) ) 910 g_snprintf( reason, sizeof( reason ), "%s %s", irc->myhost, 911 s + 1 ); 912 else 913 g_snprintf( reason, sizeof( reason ), "%s %s.%s", irc->myhost, 914 u->gc->prpl->name, irc->myhost ); 915 916 /* proto_opt might contain garbage after the : */ 917 if( ( s = strchr( reason, ':' ) ) ) 918 *s = 0; 919 } 920 else 921 { 922 strcpy( reason, "Leaving..." ); 923 } 924 925 irc_write( irc, ":%s!%s@%s QUIT :%s", u->nick, u->user, u->host, reason ); 904 926 905 927 nick = g_strdup( u->nick ); … … 1159 1181 int rv = 0; 1160 1182 1161 if( irc->status < USTATUS_LOGGED_IN)1183 if( !( irc->status & USTATUS_LOGGED_IN ) ) 1162 1184 { 1163 1185 if( gettime() > ( irc->last_pong + IRC_LOGIN_TIMEOUT ) )
Note: See TracChangeset
for help on using the changeset viewer.