//# 0 errors, 32 messages
//#
/*
    //#RedirectPlugin.java:1:1: class: com.dmdirc.addons.redirect.RedirectPlugin
    //#RedirectPlugin.java:1:1: method: com.dmdirc.addons.redirect.RedirectPlugin.com.dmdirc.addons.redirect.RedirectPlugin__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.redirect;

import com.dmdirc.commandparser.CommandManager;
import com.dmdirc.plugins.Plugin;
    

/**
 * The redirect plugin allows the suer to redirect the output of commands that
 * would normally echo their results locally to a channel or chat window instead.
 * 
 * @author chris
 */
public final class RedirectPlugin extends Plugin {
    
    private final RedirectCommand command;
    
    /** Creates a new system tray plugin. */
    public RedirectPlugin() {
        super();
    //#RedirectPlugin.java:41: method: void com.dmdirc.addons.redirect.RedirectPlugin.com.dmdirc.addons.redirect.RedirectPlugin()
    //#RedirectPlugin.java:41: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.plugins.Plugin()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.redirect.RedirectPlugin
    //#    method: void com.dmdirc.addons.redirect.RedirectPlugin()
    //#    unanalyzed callee: void com.dmdirc.plugins.Plugin()
    //#input(void com.dmdirc.addons.redirect.RedirectPlugin()): this
    //#output(void com.dmdirc.addons.redirect.RedirectPlugin()): new RedirectCommand(RedirectPlugin#1) num objects
    //#output(void com.dmdirc.addons.redirect.RedirectPlugin()): this.command.__Tag
    //#output(void com.dmdirc.addons.redirect.RedirectPlugin()): this.command
    //#new obj(void com.dmdirc.addons.redirect.RedirectPlugin()): new RedirectCommand(RedirectPlugin#1)
    //#post(void com.dmdirc.addons.redirect.RedirectPlugin()): this.command == &new RedirectCommand(RedirectPlugin#1)
    //#post(void com.dmdirc.addons.redirect.RedirectPlugin()): new RedirectCommand(RedirectPlugin#1) num objects == 1
    //#post(void com.dmdirc.addons.redirect.RedirectPlugin()): this.command.__Tag == com/dmdirc/addons/redirect/RedirectCommand
    //#unanalyzed(void com.dmdirc.addons.redirect.RedirectPlugin()): Effects-of-calling:com.dmdirc.commandparser.commands.ChatCommand
        
        command = new RedirectCommand();
    }
    //#RedirectPlugin.java:44: end of method: void com.dmdirc.addons.redirect.RedirectPlugin.com.dmdirc.addons.redirect.RedirectPlugin()
    
    /** {@inheritDoc} */
    public void onLoad() {
        CommandManager.registerCommand(command);
    //#RedirectPlugin.java:48: method: void com.dmdirc.addons.redirect.RedirectPlugin.onLoad()
    //#RedirectPlugin.java:48: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:registerCommand(Command)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.redirect.RedirectPlugin
    //#    method: void onLoad()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:registerCommand(Command)
    //#input(void onLoad()): this
    //#input(void onLoad()): this.command
    }
    //#RedirectPlugin.java:49: end of method: void com.dmdirc.addons.redirect.RedirectPlugin.onLoad()
    
    /** {@inheritDoc}. */
    public void onUnload() {
        CommandManager.unregisterCommand(command);
    //#RedirectPlugin.java:53: method: void com.dmdirc.addons.redirect.RedirectPlugin.onUnload()
    //#RedirectPlugin.java:53: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.redirect.RedirectPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#input(void onUnload()): this
    //#input(void onUnload()): this.command
    }
    //#RedirectPlugin.java:54: end of method: void com.dmdirc.addons.redirect.RedirectPlugin.onUnload()
    
}
    //#output(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Descendant_Table[com/dmdirc/addons/redirect/RedirectPlugin]
    //#output(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Dispatch_Table.onLoad()V
    //#output(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Dispatch_Table.onUnload()V
    //#post(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Descendant_Table[com/dmdirc/addons/redirect/RedirectPlugin] == &__Dispatch_Table
    //#post(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Dispatch_Table.onLoad()V == &onLoad
    //#post(com.dmdirc.addons.redirect.RedirectPlugin__static_init): __Dispatch_Table.onUnload()V == &onUnload
    //#RedirectPlugin.java:: end of method: com.dmdirc.addons.redirect.RedirectPlugin.com.dmdirc.addons.redirect.RedirectPlugin__static_init
    //#RedirectPlugin.java:: end of class: com.dmdirc.addons.redirect.RedirectPlugin
