mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 00:30:19 +00:00
initial plugin config framework, can't save multiple entries
This commit is contained in:
@@ -1830,3 +1830,21 @@ safe_strcpy (char *dest, const char *src, int bytes_left)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
canonalize_key (char *key)
|
||||
{
|
||||
char *pos, token;
|
||||
|
||||
for (pos = key; (token = *pos) != 0; pos++)
|
||||
{
|
||||
if (token != '_' && (token < '0' || token > '9') && (token < 'A' || token > 'Z') && (token < 'a' || token > 'z'))
|
||||
{
|
||||
*pos = '_';
|
||||
}
|
||||
else
|
||||
{
|
||||
*pos = tolower(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user