1 import org.jivesoftware.smackx.muc.ParticipantStatusListener; 2 import org.jivesoftware.smack.util.StringUtils; 3 4 5 final class MUCParticipantListener implements ParticipantStatusListener{ 6 7 private final MUCPanel mp; 8 9 public MUCParticipantListener(MUCPanel mp){ 10 this.mp=mp; 11 } 12 13 14 public void adminGranted(String participant){ 15 mp.threadAnnounce(null); 16 } 17 18 public void adminRevoked(String participant){ 19 mp.threadAnnounce(null); 20 } 21 22 public void banned(String participant){ 23 mp.threadAnnounce("<b>"+StringUtils.parseResource(participant)+"</b> "+Lang.gs("has been banned")); 24 } 25 26 public void kicked(String participant){ 27 mp.threadAnnounce("<b>"+StringUtils.parseResource(participant)+"</b> "+Lang.gs("has been kicked")); 28 } 29 30 public void membershipGranted(String participant){ 31 mp.threadAnnounce(null); 32 } 33 34 public void membershipRevoked(String participant){ 35 mp.threadAnnounce(null); 36 } 37 38 public void moderatorGranted(String participant){ 39 mp.threadAnnounce(null); 40 } 41 42 public void moderatorRevoked(String participant){ 43 mp.threadAnnounce(null); 44 } 45 46 public void ownershipGranted(String participant){ 47 mp.threadAnnounce(null); 48 } 49 50 public void ownershipRevoked(String participant){ 51 mp.threadAnnounce(null); 52 } 53 54 public void voiceGranted(String participant){ 55 mp.threadAnnounce(null); 56 } 57 58 public void voiceRevoked(String participant){ 59 mp.threadAnnounce(null); 60 } 61 62 public void nicknameChanged(String nickname){ 63 mp.threadAnnounce("<b>"+nickname+"</b> "+Lang.gs("has changed nick")); 64 } 65 } | Popular Tags |