1 package zirc.msg ; 2 3 import zirc.base.* ; 4 import zirc.gui.* ; 5 6 19 26 27 28 public class MSGnotice extends AbstractMessage 32 { 33 public MSGnotice(IRCconnexion _IRCchan, AbstractChatFrame _frm, String _txt) 34 { 35 super(_IRCchan, _frm, _txt) ; 36 37 } 38 39 protected void setColor(StringBuffer _htmlMsg) 41 { 42 _htmlMsg.insert(0, "<font color=" + vectColors[5] + ">") ; 43 _htmlMsg.append("</font>") ; 44 } 45 46 public String parseMessagePourAffichage(String _txtAffiche) 47 { 48 String rech = "!" ; 49 String ret = "" ; 50 int pos = _txtAffiche.indexOf(rech) ; 51 52 if (pos > -1) 54 { 55 ret = "-" + _txtAffiche.substring(1, pos) + "- " ; 56 } 57 else 58 { 59 rech = " " ; 61 pos = _txtAffiche.indexOf(rech) ; 62 if (pos > -1) 63 { 64 ret = _txtAffiche.substring(1, pos + 1) ; 65 } 66 67 } 68 69 rech = ircChan.GetUser_nickName() ; 71 pos = _txtAffiche.indexOf(rech) ; 72 if (pos > -1) 73 { 74 ret += _txtAffiche.substring(pos + rech.length() + 1) ; 75 } 76 77 return ret ; 78 79 } 80 } 81 | Popular Tags |