@@ -0,0 +1,3102 @@
+/*%0A * Copyright (c) 2006-2015 DMDirc Developers%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0A%0Apackage com.dmdirc.parser.events;%0A%0Aimport com.dmdirc.parser.interfaces.ClientInfo;%0Aimport com.dmdirc.parser.interfaces.Parser;%0A%0Aimport java.util.Date;%0Aimport java.util.EnumMap;%0Aimport java.util.Map;%0Aimport java.util.Optional;%0A%0A/**%0A * Event raised when detailed user info has been received for a user.%0A */%0Apublic class UserInfoEvent extends ParserEvent %7B%0A%0A    private final ClientInfo client;%0A    private final Map%3CUserInfoType, String%3E info;%0A%0A    public UserInfoEvent(final Parser parser, final Date date, final ClientInfo client,%0A            final Map%3CUserInfoType, String%3E info) %7B%0A        super(parser, date);%0A        this.client = client;%0A        this.info = new EnumMap%3C%3E(info);%0A    %7D%0A%0A    /**%0A     * Gets the client that the event is for.%0A     *%0A     * @return The client this event is for.%0A     */%0A    public ClientInfo getClient() %7B%0A        return client;%0A    %7D%0A%0A    /**%0A     * Gets a specific piece of information about the user.%0A     *%0A     * @param type The type of information to return.%0A     * @return An optional containing the information, if it was provided.%0A     */%0A    public Optional%3CString%3E getInfo(final UserInfoType type) %7B%0A        return Optional.ofNullable(info.get(type));%0A    %7D%0A%0A    /**%0A     * The types of user info that may be returned by the server.%0A     */%0A    public enum UserInfoType %7B%0A%0A        /** The user's full address. */%0A        ADDRESS,%0A        /** The user's real name. */%0A        REAL_NAME,%0A        /** The list of group chats the user is in. */%0A        GROUP_CHAT_LIST,%0A        /** Information about the server the user is connected to. */%0A        SERVER_INFO,%0A        /** The account the user is authenticated as. */%0A        ACCOUNT_NAME,%0A        /** The current idle time for the user. */%0A        IDLE_TIME,%0A        /** The time the user connected at. */%0A        CONNECTION_TIME,%0A        /** The user's current away message. */%0A        AWAY_MESSAGE,%0A        /** The user's server operator status. */%0A        SERVER_OPER,%0A%0A    %7D%0A%0A%7D%0A

Add the start of a UserInfoEvent.