+GLOBAL char *
+Lists_MakeMask( char *Pattern )
+{
+ /* This function generats a valid IRC mask of "any" string. This
+ * mask is only valid until the next call to Lists_MakeMask(),
+ * because a single global buffer is used. You have to copy the
+ * generated mask to some sane location yourself! */
+
+ static char TheMask[MASK_LEN];
+ char *excl, *at;
+
+ assert( Pattern != NULL );
+
+ excl = strchr( Pattern, '!' );
+ at = strchr( Pattern, '@' );
+
+ if(( at ) && ( at < excl )) excl = NULL;
+
+ if(( ! at ) && ( ! excl ))
+ {
+ /* Neither "!" nor "@" found: use string as nick name */
+ strlcpy( TheMask, Pattern, sizeof( TheMask ) - 5 );
+ strlcat( TheMask, "!*@*", sizeof( TheMask ));
+ return TheMask;
+ }
+
+ if(( ! at ) && ( excl ))
+ {
+ /* Domain part is missing */
+ strlcpy( TheMask, Pattern, sizeof( TheMask ) - 3 );
+ strlcat( TheMask, "@*", sizeof( TheMask ));
+ return TheMask;
+ }
+
+ if(( at ) && ( ! excl ))
+ {
+ /* User name is missing */
+ *at = '\0'; at++;
+ strlcpy( TheMask, Pattern, sizeof( TheMask ) - 5 );
+ strlcat( TheMask, "!*@", sizeof( TheMask ));
+ strlcat( TheMask, at, sizeof( TheMask ));
+ return TheMask;
+ }
+
+ /* All parts (nick, user and domain name) are given */
+ strlcpy( TheMask, Pattern, sizeof( TheMask ));
+ return TheMask;
+} /* Lists_MakeMask */
+
+
+static C2C *
+New_C2C( char *Mask, CHANNEL *Chan, bool OnlyOnce )