1 package zirc.msg ; 2 3 import zirc.base.* ; 4 import zirc.threads.* ; 5 6 19 26 27 28 public class MSGnick extends AbstractMessage 29 { 30 protected String oldNick ; 31 protected String newNick ; 32 33 public MSGnick(IRCconnexion _IRCchan, String _oldname, String _newName) 34 { 35 super(_IRCchan, "") ; 36 newNick = _newName.substring(1) ; 37 38 int ind = _oldname.indexOf("!") ; 42 43 if (ind > -1) 44 { 45 oldNick = _oldname.substring(1, ind) ; 46 } 47 else 48 { 49 oldNick = "" ; 50 } 51 } 52 53 public void affiche() 54 { 55 } 57 58 public void reagit() 59 { 60 if (ircChan.GetUser_nickName().equalsIgnoreCase(oldNick)) 64 { 65 ircChan.setUser_NickName(newNick) ; 66 } 67 68 ircChan.ajouteTache(new ChangeUserNickThread(ircChan, oldNick, newNick)) ; 70 } 71 } 72 | Popular Tags |