Changes in irc.c [674a01d:51e9a1d]
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r674a01d r51e9a1d 29 29 30 30 GSList *irc_connection_list; 31 GSList *irc_plugins; 31 32 32 33 static gboolean irc_userping( gpointer _irc, gint fd, b_input_condition cond ); … … 42 43 char *host = NULL, *myhost = NULL; 43 44 irc_user_t *iu; 45 GSList *l; 44 46 set_t *s; 45 47 bee_t *b; … … 112 114 s = set_add( &b->set, "last_version", NULL, NULL, irc ); 113 115 s->flags |= SET_HIDDEN; 114 s->value = g_strdup_printf( "%d", BITLBEE_VERSION_CODE );115 116 s = set_add( &b->set, "lcnicks", "true", set_eval_bool, irc ); 116 117 s = set_add( &b->set, "nick_format", "%-@nick", NULL, irc ); … … 165 166 nogaim_init(); 166 167 168 for( l = irc_plugins; l; l = l->next ) 169 { 170 irc_plugin_t *p = l->data; 171 if( p->irc_new ) 172 p->irc_new( irc ); 173 } 174 167 175 return irc; 168 176 } … … 208 216 void irc_free( irc_t * irc ) 209 217 { 218 GSList *l; 219 210 220 irc->status |= USTATUS_SHUTDOWN; 211 221 … … 215 225 if( storage_save( irc, NULL, TRUE ) != STORAGE_OK ) 216 226 log_message( LOGLVL_WARNING, "Error while saving settings for user %s", irc->user->nick ); 227 228 for( l = irc_plugins; l; l = l->next ) 229 { 230 irc_plugin_t *p = l->data; 231 if( p->irc_free ) 232 p->irc_free( irc ); 233 } 217 234 218 235 irc_connection_list = g_slist_remove( irc_connection_list, irc ); … … 933 950 return SET_INVALID; 934 951 } 952 953 void register_irc_plugin( const struct irc_plugin *p ) 954 { 955 irc_plugins = g_slist_prepend( irc_plugins, (gpointer) p ); 956 }
Note: See TracChangeset
for help on using the changeset viewer.