Index: trunk/src/locale/SR.java =================================================================== --- trunk.orig/src/locale/SR.java 2008-07-18 22:50:36.000000000 +0300 +++ trunk/src/locale/SR.java 2008-07-18 22:57:06.000000000 +0300 @@ -138,6 +138,7 @@ public static String MS_STANZAS = loadString( "Stanzas" ); public static String MS_AT_HOST = loadString( "at Host" ); public static String MS_AUTO_CONFERENCES = loadString( "join conferences" ); + public static String MS_AUTO_IRCAUTH = loadString( "IRC auth" ); public static String MS_STATUS = loadString( "Status" ); public static String MS_SMILES_TOGGLE = loadString( "Smiles" ); public static String MS_CONTACT = loadString( "Contact >" ); Index: trunk/src/Conference/ConferenceGroup.java =================================================================== --- trunk.orig/src/Conference/ConferenceGroup.java 2008-05-08 22:29:28.000000000 +0300 +++ trunk/src/Conference/ConferenceGroup.java 2008-07-18 22:58:10.000000000 +0300 @@ -46,6 +46,7 @@ this.label=label; imageExpandedIndex=RosterIcons.ICON_GCJOIN_INDEX; this.type=Groups.TYPE_MUC; + isIrcAuth=false; } String label; @@ -64,4 +65,5 @@ public int getNContacts(){ return (nContacts>0)? nContacts-1:0; } public long conferenceJoinTime; + public boolean isIrcAuth=false; } Index: trunk/src/Client/Roster.java =================================================================== --- trunk.orig/src/Client/Roster.java 2008-07-18 22:46:06.000000000 +0300 +++ trunk/src/Client/Roster.java 2008-07-18 22:57:06.000000000 +0300 @@ -602,6 +602,22 @@ MucContact c=findMucContact( new Jid(from) ); if (c==null) { + if (!grp.isIrcAuth) { + String roomTransport=from.substring(ri+1); + if (cf.autoIrcAuth && roomTransport.startsWith("irc.") && grp.password.length()!=0) { + String authMsg="/quote NICKSERV IDENTIFY "+grp.password; + System.out.println("Will try to auth"); + Message message = new Message( + roomJid, + authMsg, + "", + true + ); + theStream.send(message); + } + grp.isIrcAuth=true; + } + c=new MucContact(from.substring(rp+1), from); addContact(c); c.origin=Contact.ORIGIN_GC_MEMBER; Index: trunk/src/Client/Config.java =================================================================== --- trunk.orig/src/Client/Config.java 2008-07-18 22:52:51.000000000 +0300 +++ trunk/src/Client/Config.java 2008-07-18 22:59:14.000000000 +0300 @@ -125,6 +125,7 @@ public boolean autoLogin=true; public boolean autoJoinConferences=false; + public boolean autoIrcAuth=false; public boolean autoFocus=true; public boolean rosterFontBold=true; @@ -311,6 +312,8 @@ rosterFontBold=inputStream.readBoolean(); + autoIrcAuth=inputStream.readBoolean(); + inputStream.close(); } catch (Exception e) { e.printStackTrace(); @@ -419,6 +422,8 @@ outputStream.writeBoolean(rosterFontBold); + outputStream.writeBoolean(autoIrcAuth); + } catch (Exception e) { e.printStackTrace(); } NvStorage.writeFileRecord(outputStream, "config", 0, true); Index: trunk/src/Client/ConfigForm.java =================================================================== --- trunk.orig/src/Client/ConfigForm.java 2008-07-18 22:55:36.000000000 +0300 +++ trunk/src/Client/ConfigForm.java 2008-07-18 22:57:06.000000000 +0300 @@ -197,9 +197,11 @@ startup=new ChoiceGroup(SR.MS_STARTUP_ACTIONS, Choice.MULTIPLE); startup.append(SR.MS_AUTOLOGIN, null); startup.append(SR.MS_AUTO_CONFERENCES,null); - su=new boolean[2]; + startup.append(SR.MS_AUTO_IRCAUTH,null); + su=new boolean[3]; su[0]=cf.autoLogin; su[1]=cf.autoJoinConferences; + su[2]=cf.autoIrcAuth; startup.setSelectedFlags(su); ap=new boolean[5]; @@ -364,6 +366,7 @@ cf.autoLogin=su[0]; cf.autoJoinConferences=su[1]; + cf.autoIrcAuth=su[2]; int apctr=0; //#if !(MIDP1)