- Timestamp:
- 2010-08-31T23:18:21Z (14 years ago)
- Branches:
- master
- Children:
- 934db064
- Parents:
- f5c0d8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
rf5c0d8e r0c85c08 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; … … 164 166 nogaim_init(); 165 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 166 175 return irc; 167 176 } … … 207 216 void irc_free( irc_t * irc ) 208 217 { 218 GSList *l; 219 209 220 irc->status |= USTATUS_SHUTDOWN; 210 221 211 222 log_message( LOGLVL_INFO, "Destroying connection with fd %d", irc->fd ); 223 224 for( l = irc_plugins; l; l = l->next ) 225 { 226 irc_plugin_t *p = l->data; 227 if( p->irc_free ) 228 p->irc_free( irc ); 229 } 212 230 213 231 if( irc->status & USTATUS_IDENTIFIED && set_getbool( &irc->b->set, "save_on_quit" ) ) … … 932 950 return SET_INVALID; 933 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.