static void addSubstitutions(int i, XMLNode xmlnode, StartupFileParser startupfileparser)
        throws InvalidStartupElementException
    {
        int j = startupfileparser.nodeCount("substitute", xmlnode.XMLChild, true);
        Bot bot = startupfileparser.getCurrentBot();
        for(int k = j; k > 0; k--)
        {
            XMLNode xmlnode1 = startupfileparser.getNode("substitute", xmlnode.XMLChild, k);
            if(xmlnode1.XMLType == 1)
            {
                String s = Toolkit.getAttributeValue("find", xmlnode1.XMLAttr);
                String s1 = Toolkit.getAttributeValue("replace", xmlnode1.XMLAttr);
                if(s != null && s1 != null)
                    switch(i)
                    {
                    case 0: // '\0'
                        bot.addInputSubstitution(s, s1);
                        break;

                    case 1: // '\001'
                        bot.addGenderSubstitution(s, s1);
                        break;

                    case 2: // '\002'
                        bot.addPersonSubstitution(s, s1);
                        break;

                    case 3: // '\003'
                        bot.addPerson2Substitution(s, s1);
                        break;
                    }
            } else
            {
                throw new InvalidStartupElementException("<" + xmlnode.XMLData + "/> cannot have content!");
            }
        }

        if(Globals.showConsole())
            Log.userinfo("Loaded " + j + " " + xmlnode.XMLData + " substitutions.", Log.STARTUP);
    }