//# 1 errors, 238 messages
//#
/*
    //#IdentdPlugin.java:1:1: class: com.dmdirc.addons.identd.IdentdPlugin
    //#IdentdPlugin.java:1:1: method: com.dmdirc.addons.identd.IdentdPlugin.com.dmdirc.addons.identd.IdentdPlugin__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.identd;

import com.dmdirc.Server;
import com.dmdirc.actions.ActionManager;
import com.dmdirc.actions.CoreActionType;
import com.dmdirc.actions.interfaces.ActionType;
import com.dmdirc.config.IdentityManager;
import com.dmdirc.config.prefs.PreferencesCategory;
import com.dmdirc.config.prefs.PreferencesManager;
import com.dmdirc.config.prefs.PreferencesSetting;
import com.dmdirc.config.prefs.PreferencesType;
import com.dmdirc.config.prefs.validator.PortValidator;
import com.dmdirc.interfaces.ActionListener;
import com.dmdirc.plugins.Plugin;

import java.util.ArrayList;
import java.util.List;

/**
 * The Identd plugin answers ident requests from IRC servers.
 *
 * @author Shane
 */
public class IdentdPlugin extends Plugin implements ActionListener {

    /** Array list to store all the servers in that need ident replies. */
	private final List<Server> servers = new ArrayList<Server>();

    /** The IdentdServer that we use. */
	private IdentdServer myServer;

	/**
	 * Creates a new instance of IdentdPlugin.
	 */
	public IdentdPlugin() { }
    //#IdentdPlugin.java:57: method: void com.dmdirc.addons.identd.IdentdPlugin.com.dmdirc.addons.identd.IdentdPlugin()
    //#IdentdPlugin.java:57: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.plugins.Plugin()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void com.dmdirc.addons.identd.IdentdPlugin()
    //#    unanalyzed callee: void com.dmdirc.plugins.Plugin()
    //#input(void com.dmdirc.addons.identd.IdentdPlugin()): this
    //#output(void com.dmdirc.addons.identd.IdentdPlugin()): new ArrayList(IdentdPlugin#1) num objects
    //#output(void com.dmdirc.addons.identd.IdentdPlugin()): this.servers
    //#new obj(void com.dmdirc.addons.identd.IdentdPlugin()): new ArrayList(IdentdPlugin#1)
    //#post(void com.dmdirc.addons.identd.IdentdPlugin()): this.servers == &new ArrayList(IdentdPlugin#1)
    //#post(void com.dmdirc.addons.identd.IdentdPlugin()): new ArrayList(IdentdPlugin#1) num objects == 1
    //#IdentdPlugin.java:57: end of method: void com.dmdirc.addons.identd.IdentdPlugin.com.dmdirc.addons.identd.IdentdPlugin()
	
	/**
	 * Called when the plugin is loaded.
	 */
	@Override
	public void onLoad() {
		// Add action hooks
		ActionManager.addListener(this, CoreActionType.SERVER_CONNECTED, CoreActionType.SERVER_CONNECTING, CoreActionType.SERVER_CONNECTERROR);
    //#IdentdPlugin.java:65: method: void com.dmdirc.addons.identd.IdentdPlugin.onLoad()
    //#IdentdPlugin.java:65: ?precondition failure
    //#    com/dmdirc/actions/ActionManager.addListener: (soft) init'ed(types[0..4_294_967_295])
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void onLoad()
    //#    basic block: Entry_BB_1
    //#    assertion: (soft) init'ed(addListener.Param_1[0..4_294_967_295])
    //#    callee: void com/dmdirc/actions/ActionManager.addListener(ActionListener, ActionType[])
    //#    callee assertion: (soft) init'ed(types[0..4_294_967_295])
    //#    callee file: ActionManager.java
    //#    callee precondition index: [4]
    //#    callee srcpos: 676
    //#    VN: addListener.Param_1[0..4_294_967_295]
    //#    Expected: Univ-VN-Set
    //#    Bad: {Invalid}
    //#    Attribs:  Ptr  Soft  Bad only invalid
    //#input(void onLoad()): "Unable to start identd server: "._tainted
    //#input(void onLoad()): com/dmdirc/actions/ActionManager.listeners
    //#input(void onLoad()): com/dmdirc/actions/CoreActionType.SERVER_CONNECTED
    //#input(void onLoad()): com/dmdirc/actions/CoreActionType.SERVER_CONNECTERROR
    //#input(void onLoad()): com/dmdirc/actions/CoreActionType.SERVER_CONNECTING
    //#input(void onLoad()): com/dmdirc/addons/identd/IdentdServer.com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void onLoad()): this
    //#input(void onLoad()): this.myServer.myPlugin
    //#output(void onLoad()): new ArrayList(IdentdServer#1) num objects
    //#output(void onLoad()): new IdentdServer(onLoad#2) num objects
    //#output(void onLoad()): this.myServer.__Tag
    //#output(void onLoad()): this.myServer.clientList
    //#output(void onLoad()): this.myServer.myPlugin
    //#output(void onLoad()): this.myServer.myThread
    //#output(void onLoad()): this.myServer.serverSocket
    //#output(void onLoad()): new ServerSocket(startServer#1) num objects
    //#output(void onLoad()): new Thread(startServer#2) num objects
    //#output(void onLoad()): this.myServer
    //#new obj(void onLoad()): new ArrayList(IdentdServer#1)
    //#new obj(void onLoad()): new IdentdServer(onLoad#2)
    //#new obj(void onLoad()): new ServerSocket(startServer#1)
    //#new obj(void onLoad()): new Thread(startServer#2)
    //#presumption(void onLoad()): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@68 != null
    //#post(void onLoad()): this.myServer == &new IdentdServer(onLoad#2)
    //#post(void onLoad()): init'ed(this.myServer.myThread)
    //#post(void onLoad()): init'ed(this.myServer.serverSocket)
    //#post(void onLoad()): new ArrayList(IdentdServer#1) num objects == 1
    //#post(void onLoad()): new IdentdServer(onLoad#2) num objects == 1
    //#post(void onLoad()): this.myServer.__Tag == com/dmdirc/addons/identd/IdentdServer
    //#post(void onLoad()): this.myServer.clientList == &new ArrayList(IdentdServer#1)
    //#post(void onLoad()): this.myServer.myPlugin == this
    //#post(void onLoad()): this.myServer.myPlugin != null
    //#post(void onLoad()): new ServerSocket(startServer#1) num objects <= 1
    //#post(void onLoad()): new Thread(startServer#2) num objects <= 1
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.util.MapList:add
    //#unanalyzed(void onLoad()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void onLoad()): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.addons.identd.IdentdPlugin:getDomain
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(void onLoad()): Effects-of-calling:java.net.ServerSocket
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.Thread
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.Thread:start
    //#unanalyzed(void onLoad()): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.plugins.PluginManager:getPluginManager
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.plugins.PluginManager:getPluginInfoByName
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.plugins.PluginInfo:getRelativeFilename
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.plugins.PluginManager:delPlugin
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.plugins.PluginManager:updateAutoLoad
    //#test_vector(void onLoad()): com.dmdirc.config.ConfigManager:getOptionBool(...)@68: {0}, {1}
		
		myServer = new IdentdServer(this);
		if (IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "advanced.alwaysOn")) {
    //#IdentdPlugin.java:68: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#IdentdPlugin.java:68: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:68: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
			myServer.startServer();
		}
	}
    //#IdentdPlugin.java:71: end of method: void com.dmdirc.addons.identd.IdentdPlugin.onLoad()
	
	/**
	 * Called when this plugin is unloaded.
	 */
	@Override
	public void onUnload() {
		myServer.stopServer();
    //#IdentdPlugin.java:78: method: void com.dmdirc.addons.identd.IdentdPlugin.onUnload()
    //#input(void onUnload()): com/dmdirc/actions/ActionManager.listeners
    //#input(void onUnload()): com/dmdirc/addons/identd/IdentClient.__Descendant_Table[com/dmdirc/addons/identd/IdentClient]
    //#input(void onUnload()): com/dmdirc/addons/identd/IdentClient.__Descendant_Table[others]
    //#input(void onUnload()): this
    //#input(void onUnload()): this.myServer
    //#input(void onUnload()): this.myServer.clientList
    //#input(void onUnload()): this.myServer.myThread
    //#input(void onUnload()): this.myServer.serverSocket
    //#input(void onUnload()): this.servers
    //#output(void onUnload()): this.myServer.myThread
    //#pre[1] (void onUnload()): init'ed(this.myServer.myThread)
    //#pre[3] (void onUnload()): this.myServer != null
    //#pre[7] (void onUnload()): this.servers != null
    //#pre[4] (void onUnload()): (soft) this.myServer.clientList != null
    //#pre[6] (void onUnload()): (soft) this.myServer.serverSocket != null
    //#post(void onUnload()): this.myServer.myThread == null
    //#unanalyzed(void onUnload()): Effects-of-calling:com.dmdirc.util.MapList:removeFromAll
    //#unanalyzed(void onUnload()): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void onUnload()): Effects-of-calling:java.util.List:size
    //#unanalyzed(void onUnload()): Effects-of-calling:java.util.List:get
    //#unanalyzed(void onUnload()): Effects-of-calling:java.lang.Thread:interrupt
    //#unanalyzed(void onUnload()): Effects-of-calling:java.net.ServerSocket:close
    //#unanalyzed(void onUnload()): Effects-of-calling:close
    //#unanalyzed(void onUnload()): Effects-of-calling:java.util.List:clear
    //#unanalyzed(void onUnload()): Effects-of-calling:java.net.Socket:close
		servers.clear();
		ActionManager.removeListener(this);
	}
    //#IdentdPlugin.java:81: end of method: void com.dmdirc.addons.identd.IdentdPlugin.onUnload()
	
	/**
	 * Process an event of the specified type.
	 *
	 * @param type The type of the event to process
	 * @param format Format of messages that are about to be sent. (May be null)
	 * @param arguments The arguments for the event
	 */
	@Override
	public void processEvent(final ActionType type, final StringBuffer format, final Object... arguments) {
		if (type == CoreActionType.SERVER_CONNECTING) {
    //#IdentdPlugin.java:92: method: void com.dmdirc.addons.identd.IdentdPlugin.processEvent(ActionType, StringBuffer, Object[])
    //#input(void processEvent(ActionType, StringBuffer, Object[])): "Unable to start identd server: "._tainted
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments.length
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[0]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): arguments[0].__Tag
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/Server.__Descendant_Table[others]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/actions/CoreActionType.SERVER_CONNECTED
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/actions/CoreActionType.SERVER_CONNECTERROR
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/actions/CoreActionType.SERVER_CONNECTING
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/identd/IdentClient.__Descendant_Table[com/dmdirc/addons/identd/IdentClient]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/identd/IdentClient.__Descendant_Table[others]
    //#input(void processEvent(ActionType, StringBuffer, Object[])): com/dmdirc/addons/identd/IdentdServer.com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.myServer
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.clientList
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.myPlugin
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.myThread
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.serverSocket
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.servers
    //#input(void processEvent(ActionType, StringBuffer, Object[])): this.servers.__Lock
    //#input(void processEvent(ActionType, StringBuffer, Object[])): type
    //#output(void processEvent(ActionType, StringBuffer, Object[])): new ServerSocket(startServer#1) num objects
    //#output(void processEvent(ActionType, StringBuffer, Object[])): new Thread(startServer#2) num objects
    //#output(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.myThread
    //#output(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.serverSocket
    //#new obj(void processEvent(ActionType, StringBuffer, Object[])): new ServerSocket(startServer#1)
    //#new obj(void processEvent(ActionType, StringBuffer, Object[])): new Thread(startServer#2)
    //#pre[1] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments != null
    //#pre[2] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments.length >= 1
    //#pre[3] (void processEvent(ActionType, StringBuffer, Object[])): (soft) init'ed(arguments[0])
    //#pre[4] (void processEvent(ActionType, StringBuffer, Object[])): (soft) arguments[0].__Tag == com/dmdirc/Server
    //#pre[5] (void processEvent(ActionType, StringBuffer, Object[])): (soft) init'ed(this.myServer.myThread)
    //#pre[6] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.myServer.serverSocket != null
    //#pre[8] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.myServer != null
    //#pre[9] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.myServer.clientList != null
    //#pre[11] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.myServer.myPlugin != null
    //#pre[12] (void processEvent(ActionType, StringBuffer, Object[])): (soft) this.servers != null
    //#presumption(void processEvent(ActionType, StringBuffer, Object[])): com.dmdirc.config.IdentityManager:getGlobalConfig(...)@103 != null
    //#post(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.myThread == One-of{old this.myServer.myThread, &new Thread(startServer#2), null}
    //#post(void processEvent(ActionType, StringBuffer, Object[])): init'ed(this.myServer.myThread)
    //#post(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.serverSocket == One-of{old this.myServer.serverSocket, &new ServerSocket(startServer#1)}
    //#post(void processEvent(ActionType, StringBuffer, Object[])): this.myServer.serverSocket != null
    //#post(void processEvent(ActionType, StringBuffer, Object[])): new ServerSocket(startServer#1) num objects <= 1
    //#post(void processEvent(ActionType, StringBuffer, Object[])): new Thread(startServer#2) num objects <= 1
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.io.IOException:getMessage
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.IdentityManager:getGlobalConfig
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.addons.identd.IdentdPlugin:getDomain
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.config.ConfigManager:getOptionInt
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.net.ServerSocket
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Thread
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Thread:start
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.plugins.PluginManager:getPluginManager
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.plugins.PluginManager:getPluginInfoByName
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.plugins.PluginInfo:getRelativeFilename
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.plugins.PluginManager:delPlugin
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:com.dmdirc.plugins.PluginManager:updateAutoLoad
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.List:size
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.List:get
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.lang.Thread:interrupt
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.net.ServerSocket:close
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:close
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.util.List:clear
    //#unanalyzed(void processEvent(ActionType, StringBuffer, Object[])): Effects-of-calling:java.net.Socket:close
    //#test_vector(void processEvent(ActionType, StringBuffer, Object[])): java.util.List:isEmpty(...)@94: {0}, {1}
			synchronized (servers) {
				if (servers.isEmpty()) {
					myServer.startServer();
				}
				servers.add((Server) arguments[0]);
			}
		} else if (type == CoreActionType.SERVER_CONNECTED || type == CoreActionType.SERVER_CONNECTERROR) {
			synchronized (servers) {
				servers.remove(arguments[0]);
			
				if (servers.isEmpty() && !IdentityManager.getGlobalConfig().getOptionBool(getDomain(), "advanced.alwaysOn")) {
    //#IdentdPlugin.java:103: Warning: method not available - call not analyzed
    //#    call on ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void processEvent(ActionType, StringBuffer, Object[])
    //#    unanalyzed callee: ConfigManager com.dmdirc.config.IdentityManager:getGlobalConfig()
    //#IdentdPlugin.java:103: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void processEvent(ActionType, StringBuffer, Object[])
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:103: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void processEvent(ActionType, StringBuffer, Object[])
    //#    unanalyzed callee: bool com.dmdirc.config.ConfigManager:getOptionBool(String, String)
					myServer.stopServer();
				}
			}
		}
	}
    //#IdentdPlugin.java:108: end of method: void com.dmdirc.addons.identd.IdentdPlugin.processEvent(ActionType, StringBuffer, Object[])
		
	/** {@inheritDoc} */
	@Override
	public void showConfig(final PreferencesManager manager) {
        final PreferencesCategory general = new PreferencesCategory("Identd",
    //#IdentdPlugin.java:113: method: void com.dmdirc.addons.identd.IdentdPlugin.showConfig(PreferencesManager)
    //#IdentdPlugin.java:113: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#input(void showConfig(PreferencesManager)): "'"._tainted
    //#input(void showConfig(PreferencesManager)): "If this is enabled, the nickname for the connection will be used rather than '"._tainted
    //#input(void showConfig(PreferencesManager)): "If this is enabled, the username for the connection will be used rather than '"._tainted
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.BOOLEAN
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.INTEGER
    //#input(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesType.TEXT
    //#input(void showConfig(PreferencesManager)): manager
    //#input(void showConfig(PreferencesManager)): this
    //#pre[1] (void showConfig(PreferencesManager)): manager != null
    //#presumption(void showConfig(PreferencesManager)): com.dmdirc.config.prefs.PreferencesManager:getCategory(...)@167 != null
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.BOOLEAN)
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.INTEGER)
    //#presumption(void showConfig(PreferencesManager)): init'ed(com.dmdirc.config.prefs.PreferencesType.TEXT)
                "General Identd Plugin config ('Lower' options take priority " +
                "over those above them)");
        final PreferencesCategory advanced = new PreferencesCategory("Advanced", 
    //#IdentdPlugin.java:116: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory(String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory(String, String)
                "Advanced Identd Plugin config - Only edit these if you need " +
                "to/know what you are doing. Editing these could prevent " +
                "access to some servers. ('Lower' options take priority over " +
                "those above them)");
        
        general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:122: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:122: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:122: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "general.useUsername", "Use connection " +
                "username rather than system username", "If this is enabled," +
                " the username for the connection will be used rather than " +
                "'" + System.getProperty("user.name") + "'"));
        general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:127: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:127: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:127: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "general.useNickname", "Use connection " +
                "nickname rather than system username", "If this is enabled, " +
                "the nickname for the connection will be used rather than " +
                "'" + System.getProperty("user.name") + "'"));
        general.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:132: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:132: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:132: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "general.useCustomName", "Use custom name" +
                " all the time", "If this is enabled, the name specified below" +
                " will be used all the time"));
        general.addSetting(new PreferencesSetting(PreferencesType.TEXT,
    //#IdentdPlugin.java:136: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:136: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:136: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "general.customName", "Custom Name to use",
                "The custom name to use when 'Use Custom Name' is enabled"));
        
        advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:140: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:140: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:140: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "advanced.alwaysOn", "Always have ident " +
                "port open", "By default the identd only runs when there are " +
                "active connection attempts. This overrides that."));
        advanced.addSetting(new PreferencesSetting(PreferencesType.INTEGER,
    //#IdentdPlugin.java:144: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.validator.PortValidator()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.validator.PortValidator()
    //#IdentdPlugin.java:144: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:144: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, Validator, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, Validator, String, String, String, String)
    //#IdentdPlugin.java:144: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                new PortValidator(), getDomain(), "advanced.port",
                "What port should the identd listen on", "Default port is 113," +
                " this is probably useless if changed unless you port forward" +
                " ident to a different port"));
        advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:149: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:149: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:149: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "advanced.useCustomSystem", "Use custom OS",
                "By default the plugin uses 'UNIX' or 'WIN32' as the system " +
                "type, this can be overriden by enabling this."));
        advanced.addSetting(new PreferencesSetting(PreferencesType.TEXT,
    //#IdentdPlugin.java:153: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:153: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:153: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "advanced.customSystem", "Custom OS to use",
                "The custom system to use when 'Use Custom System' is enabled"));
        advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:156: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:156: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:156: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "advanced.isHiddenUser", "Respond to ident" +
                " requests with HIDDEN-USER error", "By default the plugin will" +
                " give a USERID response, this can force an 'ERROR :" +
                " HIDDEN-USER' response instead."));
        advanced.addSetting(new PreferencesSetting(PreferencesType.BOOLEAN,
    //#IdentdPlugin.java:161: Warning: method not available - call not analyzed
    //#    call on String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: String com.dmdirc.addons.identd.IdentdPlugin:getDomain()
    //#IdentdPlugin.java:161: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesSetting(PreferencesType, String, String, String, String)
    //#IdentdPlugin.java:161: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSetting(PreferencesSetting)
                getDomain(), "advanced.isNoUser", "Respond to ident" +
                " requests with NO-USER error", "By default the plugin will" +
                " give a USERID response, this can force an 'ERROR : NO-USER'" +
                " response instead. (Overrides HIDDEN-USER)"));
		
		manager.getCategory("Plugins").addSubCategory(general);
    //#IdentdPlugin.java:167: Warning: method not available - call not analyzed
    //#    call on PreferencesCategory com.dmdirc.config.prefs.PreferencesManager:getCategory(String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: PreferencesCategory com.dmdirc.config.prefs.PreferencesManager:getCategory(String)
    //#IdentdPlugin.java:167: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
        general.addSubCategory(advanced);
    //#IdentdPlugin.java:168: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.identd.IdentdPlugin
    //#    method: void showConfig(PreferencesManager)
    //#    unanalyzed callee: void com.dmdirc.config.prefs.PreferencesCategory:addSubCategory(PreferencesCategory)
	}
    //#IdentdPlugin.java:169: end of method: void com.dmdirc.addons.identd.IdentdPlugin.showConfig(PreferencesManager)
	
}
    //#output(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Descendant_Table[com/dmdirc/addons/identd/IdentdPlugin]
    //#output(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.onLoad()V
    //#output(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.onUnload()V
    //#output(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.processEvent(Lcom/dmdirc/actions/interfaces/ActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V
    //#output(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.showConfig(Lcom/dmdirc/config/prefs/PreferencesManager;)V
    //#post(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Descendant_Table[com/dmdirc/addons/identd/IdentdPlugin] == &__Dispatch_Table
    //#post(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.onLoad()V == &onLoad
    //#post(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.onUnload()V == &onUnload
    //#post(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.processEvent(Lcom/dmdirc/actions/interfaces/ActionType;Ljava/lang/StringBuffer;[Ljava/lang/Object;)V == &processEvent
    //#post(com.dmdirc.addons.identd.IdentdPlugin__static_init): __Dispatch_Table.showConfig(Lcom/dmdirc/config/prefs/PreferencesManager;)V == &showConfig
    //#IdentdPlugin.java:: end of method: com.dmdirc.addons.identd.IdentdPlugin.com.dmdirc.addons.identd.IdentdPlugin__static_init
    //#IdentdPlugin.java:: end of class: com.dmdirc.addons.identd.IdentdPlugin
