Re: Retrieving Usernames

  •  03-28-2008, 1:09 PM

    Re: Retrieving Usernames

    you can give this a try if you like.  the only thing is it lists all users in all chat rooms. i am not sure how to drill down to just one room yet.
     

    <%@ Page Language="C#" %>

    <%@ Import Namespace="CuteChat" %>

    <script runat="server">

    static string Encode(string val)

    {

    if(val==null)return "";

    return val.Replace("\\","\\\\").Replace("\"","\\\\");

    }

    </script>

     

     

    <%

    ChatPortal portal=ChatSystem.Instance.GetCurrentPortal();

    lock(portal)

    {

    foreach(ChatChannel channel in portal.GetStartedChannels())

    {

    foreach(ChatPlaceUser user in channel.GetAllUsers())

    {

    if(user.AppearOffline)continue;

    %>

     

    <%=Encode(user.DisplayName)%>,

     

     

    <%}%><%}%><%}%>

    hope that helps, Jay
View Complete Thread