if(nick ==null && randomName)
{
nick = JOptionPane.showInputDialog(backend.getMainWindow(),"Enter your nickname");
}
if(nick==null) nick = backend.getMyJID().getUser();
JID jid = new JID(Jeti.groupchatRoom,Jeti.groupchatServer,nick);
if(Boolean.valueOf(getParameter("SHOWGROUPCHATASMAIN")).booleanValue())
{
String groupchatRoom2 =getParameter("GROUPCHATROOM2");
if(groupchatRoom2!=null)
{
System.out.println("two jids");
JID jid2= new JID(groupchatRoom2,Jeti.groupchatServer,nick);
JPanel gw = LoadGroupChat.createGroupChatWindow(jid);
JPanel gw2 = LoadGroupChat.createGroupChatWindow(jid2);
JSplitPane spl = new JSplitPane(JSplitPane.VERTICAL_SPLIT,gw,gw2);
setContentPane(spl);
spl.setDividerLocation(0.5);
LoadGroupChat.startGroupchat(jid2,backend);
}
else
{
JPanel gw = LoadGroupChat.createGroupChatWindow(jid);
setContentPane(gw);
if(!Preferences.getBoolean("groupchat", "hideGroupchatMenu", false))
{
JMenu[] menu = LoadGroupChat.getMenu(gw);
setJMenuBar(new JMenuBar());
for(int i=0;i<menu.length;i++)
{
getJMenuBar().add(menu[i]);
}
}
}
validate();
}
LoadGroupChat.startGroupchat(jid,backend);
String invites = getParameter("GROUPCHATINVITE");
if(invites!=null)
{
String[] invite = invites.split(",");
JID room = new JID(Jeti.groupchatRoom,Jeti.groupchatServer);
for(int i=0;i<invite.length;i++)
{
LoadGroupChat.invite(backend,new JID(invite[i]),room);
}
}
}
else if(groupchatServer != null)
{