- /* Hier wird aus einem "beliebigen" Pattern eine gueltige IRC-Mask erzeugt.
- * Diese ist aber nur bis zum naechsten Aufruf von Lists_MakeMask() gueltig,
- * da ein einziger globaler Puffer verwendet wird. ->Umkopieren!*/
-
- 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 ))
- {
- /* weder ! noch @ vorhanden: als Nick annehmen */
- strlcpy( TheMask, Pattern, sizeof( TheMask ) - 5 );
- strlcat( TheMask, "!*@*", sizeof( TheMask ));
- return TheMask;
- }
-
- if(( ! at ) && ( excl ))
- {
- /* Domain fehlt */
- strlcpy( TheMask, Pattern, sizeof( TheMask ) - 3 );
- strlcat( TheMask, "@*", sizeof( TheMask ));
- return TheMask;
- }
-
- if(( at ) && ( ! excl ))
- {
- /* User fehlt */
+ 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 nickname */
+ strlcpy(mask, Pattern, len - 5);
+ strlcat(mask, "!*@*", len);
+ } else if (!at && excl) {
+ /* Domain part is missing */
+ strlcpy(mask, Pattern, len - 3);
+ strlcat(mask, "@*", len);
+ } else if (at && !excl) {
+ /* User name is missing */