Can init the mutelist with a String[] of muted players.

Can get a String[] of the currently muted players.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2312 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2003-03-20 00:46:34 +00:00
parent 2662abde69
commit d53b707e4f
@@ -1,5 +1,5 @@
//
// $Id: MuteDirector.java,v 1.5 2002/12/12 23:54:27 shaper Exp $
// $Id: MuteDirector.java,v 1.6 2003/03/20 00:46:34 ray Exp $
package com.threerings.crowd.chat;
@@ -40,6 +40,18 @@ public class MuteDirector extends BasicDirector
super(ctx);
}
/**
* Set up the mute director with the specified list of initial mutees.
*/
public MuteDirector (CrowdContext ctx, String[] list)
{
this(ctx);
for (int ii=0, nn=list.length; ii < nn; ii++) {
_mutelist.add(list[ii]);
}
}
/**
* Set the required ChatDirector.
*/
@@ -86,6 +98,17 @@ public class MuteDirector extends BasicDirector
}
}
/**
* @return a list of the currently muted players.
*
* This list may be out of date immediately upon returning from this
* method.
*/
public String[] getMuted ()
{
return (String[]) _mutelist.toArray(new String[_mutelist.size()]);
}
// documentation inherited from interface ChatValidator
public boolean validateSpeak (String msg)
{