private static function normalizeInterface($iface)
    {
        if (!is_string($iface)) {
            throw new \Erebot\InvalidValueException('Not an interface name');
        }

        $ifaceName = str_replace('!', '\\Erebot\\Interfaces\\', $iface);
        if (interface_exists($ifaceName, true)) {
            return strtolower($ifaceName);
        }

        $ifaceName = str_replace('!', '\\Erebot\\', $iface) . 'Interface';
        if (interface_exists($ifaceName, true)) {
            return strtolower($ifaceName);
        }
        throw new \Erebot\InvalidValueException('No such interface ('.$iface.')');
    }