- last = NULL;
- c2c = My_Invites;
- while( c2c )
- {
- next = c2c->next;
- if(( c2c->channel == Chan ) && ( strcasecmp( c2c->mask, Mask ) == 0 ))
- {
- /* dieser Eintrag muss geloescht werden */
- Log( LOG_DEBUG, "Deleted \"%s\" from invite list for \"%s\"." , c2c->mask, Channel_Name( Chan ));
- if( last ) last->next = next;
- else My_Invites = next;
- free( c2c );
- }
- else last = c2c;
- c2c = next;
- }
-} /* Lists_DelInvited */
-
-
-GLOBAL BOOLEAN
-Lists_ShowInvites( CLIENT *Client, CHANNEL *Channel )
-{
- C2C *c2c;
-
- assert( Client != NULL );
- assert( Channel != NULL );
-
- c2c = My_Invites;
- while( c2c )
- {
- if( c2c->channel == Channel )
- {
- /* Eintrag fuer Channel gefunden; ausgeben: */
- if( ! IRC_WriteStrClient( Client, RPL_INVITELIST_MSG, Client_ID( Client ), Channel_Name( Channel ), c2c->mask )) return DISCONNECTED;
- }
- c2c = c2c->next;
+ newelem = malloc(sizeof(struct list_elem));
+ if( ! newelem ) {
+ Log( LOG_EMERG, "Can't allocate memory for new Ban/Invite entry!" );
+ return false;