@Override
    public void onConnect()
    {
        String channel = config.get("Chan0");
        int i = 0;
        while(channel != null)
        {
            this.joinChannel(channel);
            channel = config.get("Chan" + ++i);
        }
        components = new LinkedList<ComponentInterface>();
        i = 0;
        channel = config.get("Module0");
        while(channel != null)
        {
            String component = channel + channel.substring(channel.lastIndexOf("."));
            try
            {
                Class cl = Class.forName(component);
                ComponentInterface obj = (ComponentInterface)cl.newInstance();
                obj.init(moduleconfig.get(channel));
                components.add(obj);
                channel = config.get("Module" + ++i);
            }
            catch (Exception e)
            {
                System.err.println("Unable to Load Module " + channel);
                System.err.println(e.getMessage());
                System.exit(1);
            }
        }
    }