mCurrentBot.initialize(nick, alt_nick, real_name, new Server(server_name, (ServerInfo)mServerInfos.get(server_name)));
mCurrentBot.initialize(nick, alt_nick, real_name, new Server(server_name, (ServerInfo)mServerInfos.get(server_name), mCurrentBot));
	public void startElement(String namespaceURI, String localName, String qName, Attributes atts)	{		if (qName.equals("drone"))		{			// do nothing		}		else if (qName.equals("server"))		{			String	name = atts.getValue("name");						mCurrentServerInfo = new ServerInfo();			mServerInfos.put(name, mCurrentServerInfo);		}		else if (qName.equals("output"))		{			int	max = Integer.parseInt(atts.getValue("max"));			int	amount = Integer.parseInt(atts.getValue("amount"));			int	interval = Integer.parseInt(atts.getValue("interval"));						mCurrentServerInfo.setOutput(max, amount, interval);		}		else if (qName.equals("address"))		{			String	name = atts.getValue("name");			int		port = Integer.parseInt(atts.getValue("port"));						try			{				mCurrentServerInfo.addAddress(name, port);			}			catch (CoreException e)			{				throw new XmlErrorException(e);			}		}		else if (qName.equals("bot"))		{			String	name 		= atts.getValue("name");			String	nick 		= atts.getValue("nick");			String	alt_nick	= atts.getValue("altnick");			String	real_name	= atts.getValue("realname");			String	server_name	= atts.getValue("servername");						if (BotFactory.contains(name))			{				throw new XmlErrorException("A bot with name '"+name+"' has already been set up.");			}						mCurrentBot = BotFactory.get(name);			mBots.add(mCurrentBot);			mCurrentBot.initialize(nick, alt_nick, real_name, new Server(server_name, (ServerInfo)mServerInfos.get(server_name)));		}		else if (qName.equals("channel"))		{			String	name = atts.getValue("name");						try			{				mCurrentBot.join(name);			}			catch (CoreException e)			{				throw new XmlErrorException(e);			}		}		else if (qName.equals("module"))		{			String	classname = atts.getValue("classname");			Class	module_class = null;			Module	module_instance = null;			try			{				module_class = Class.forName(classname);				module_instance = (Module)module_class.newInstance();			}			catch (ClassNotFoundException e)			{				throw new XmlErrorException(e);			}			catch (InstantiationException e)			{				throw new XmlErrorException(e);			}			catch (IllegalAccessException e)			{				throw new XmlErrorException(e);			}						mCurrentModule = module_instance;		}		else if (qName.equals("property"))		{			String	name = atts.getValue("name");			if (null == mCurrentModule)			{				throw new XmlErrorException("No module specified to set the property '"+name+"' for.");			}						mCharacterDataStack = new StringBuffer();						mCurrentProperty = name;		}		else		{			throw new XmlErrorException("Unsupport element name '"+qName+"'.");		}	}