- assert( Mask != NULL );
- assert( Chan != NULL );
-
- if( Already_Registered( My_Invites, Mask, Chan )) return true;
-
- c2c = New_C2C( Mask, Chan, OnlyOnce );
- if( ! c2c )
- {
- Log( LOG_ERR, "Can't add new invite list entry!" );
- return false;
- }
-
- /* verketten */
- c2c->next = My_Invites;
- My_Invites = c2c;
-
- Log( LOG_DEBUG, "Added \"%s\" to invite list for \"%s\".", Mask, Channel_Name( Chan ));
- return true;
-} /* Lists_AddInvited */
-
-
-GLOBAL void
-Lists_DelInvited( char *Mask, CHANNEL *Chan )
+/**
+ * Add a new mask to a list.
+ *
+ * @param h List head.
+ * @param Mask The IRC mask to add to the list.
+ * @param ValidUntil 0: unlimited, 1: only once, t>1: until given time_t.
+ * @param Reason Reason string or NULL, if no reason should be saved.
+ * @return true on success, false otherwise.
+ */
+bool
+Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
+ const char *Reason)