📄 users.java
字号:
/* * Copyright (c) 2000 Lyrisoft Solutions, Inc. * Used by permission */package com.lyrisoft.chat.server.remote.command;import com.lyrisoft.chat.Translator;import com.lyrisoft.chat.server.remote.ChatClient;import com.lyrisoft.chat.server.remote.ChatServer;import com.lyrisoft.chat.server.remote.IAuthenticator;import com.lyrisoft.chat.server.remote.RoomServer;public class Users implements ICommandProcessorRemote { public boolean process(ChatClient client, String[] args) { String[] users = client.getServer().getUserNames(); client.globalUserList(users); return false; } // NOTE: when processing distributed style, the message contains information // (not a request for a user list) public void processDistributed(String client, String origin, String[] args, ChatServer server) { if (args.length < 2) { // no users; just add the server server.serverSignOn(origin); } else { String[] userlist = new String[args.length - 1]; System.arraycopy(args, 1, userlist, 0, userlist.length); server.setRemoteUserList(origin, userlist); } } public String getHelp() { return Translator.getMessage("help.users"); } public int accessRequired() { return IAuthenticator.USER; } public String getUsage(String myName) { return Translator.getMessage("usage1", myName); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -