1 package zirc.msg ; 2 3 import zirc.base.* ; 4 import zirc.gui.* ; 5 6 19 26 27 30 public class MSGJoin extends AbstractMessage 31 { 32 protected String user ; 33 protected String chan ; 34 35 public MSGJoin(IRCconnexion _IRCchan, String _name, String _chan, String _line) 36 { 37 super(_IRCchan, _line) ; 38 chan = _chan.replaceFirst(":", "") ; 39 40 int ind = _name.indexOf("!") ; 44 45 if (ind > -1) 46 { 47 user = _name.substring(1, ind) ; 48 } 49 else 50 { 51 user = "" ; 52 } 53 54 } 55 56 protected void setColor(StringBuffer _htmlMsg) 58 { 59 _htmlMsg.insert(0, "<font color=" + vectColors[3] + ">") ; 60 _htmlMsg.append("</font>") ; 61 } 62 63 public String parseMessagePourAffichage(String _txtAffiche) 65 { 66 return user + " a rejoint " + chan ; 67 } 68 69 public void reagit() 70 { 71 if (ircChan.GetUser_nickName().equalsIgnoreCase(user)) 75 { 76 frm = ircChan.createChatFrame(chan) ; 77 } 78 else 79 { 80 ChatFrame cht = ircChan.GetFenetreDuChan(chan) ; 82 if (cht != null) 83 { 84 cht.addNewUserInChan(user) ; 86 87 this.frm = cht ; 89 } 90 91 } 92 } 93 94 protected boolean informeUser() 95 { 96 return false ; 97 } 98 99 } 100 | Popular Tags |