const Map map = &gwion->data->plug;
for(m_uint i = 0; i < map_size(map); ++i) {
const Plug plug = (Plug)VVAL(map, i);
- const m_str name = (m_str)VKEY(map, i);
- if(!strcmp(name, iname)) {
+ const m_str base = (m_str)VKEY(map, i);
+ const size_t size = strlen(iname);
+ char name[size + 1];
+ strcpy(name, iname);
+ for(size_t i = 0; i < size; i++) {
+ if(name[i] == ':' || name[i] == '[' || name[i] == ']')
+ name[i] = '_';
+ }
+ if(!strcmp(name, base)) {
if(plug->imp)
return GW_OK;
const plugin imp = DLSYM(plug->dl, plugin, GWIMPORT_NAME);