com.leafdigital.ircui.api
Interface IRCAction

All Known Implementing Classes:
AbstractIRCAction, NickAction

public interface IRCAction

Interface to be implemented by code that provides a particular action.

See Also:
IRCActionListMsg

Field Summary
static int CATEGORY_CHAN
          Predefined category: channel-related.
static int CATEGORY_USER
          Predefined category: user-related.
static int CATEGORY_USERCHAN
          Predefined category: user and channel-related.
 
Method Summary
 int getCategory()
          Obtains the category, used for ordering and separating items in the list.
 java.lang.String getName()
           
 int getOrder()
          Obtains the ordering within the category.
 void run(Server s, java.lang.String contextChannel, java.lang.String contextNick, java.lang.String selectedChannel, java.lang.String[] selectedNicks, MessageDisplay caller)
          Called when the action should actually run.
 

Field Detail

CATEGORY_USER

static final int CATEGORY_USER
Predefined category: user-related.

See Also:
Constant Field Values

CATEGORY_USERCHAN

static final int CATEGORY_USERCHAN
Predefined category: user and channel-related.

See Also:
Constant Field Values

CATEGORY_CHAN

static final int CATEGORY_CHAN
Predefined category: channel-related.

See Also:
Constant Field Values
Method Detail

getCategory

int getCategory()
Obtains the category, used for ordering and separating items in the list.

Returns:
Category of action; a CATEGORY_xx constant or new constant selected for plugin.

getOrder

int getOrder()
Obtains the ordering within the category. Used to place items at particular positions. When defining new items, try to leave gaps (e.g. put the numbers 10 apart) so that there's room for plugins to insert other options later.

Returns:
Order within category (lowest first)

getName

java.lang.String getName()
Returns:
Name of action, used for display on the list

run

void run(Server s,
         java.lang.String contextChannel,
         java.lang.String contextNick,
         java.lang.String selectedChannel,
         java.lang.String[] selectedNicks,
         MessageDisplay caller)
Called when the action should actually run.

Parameters:
s - Server
contextChannel - Context channel (the one the user's action happened in)
contextNick - Context nick (the one the user's action happened in)
selectedChannel - Selected channel (one which was actively chosen)
selectedNicks - Selected nicks (which were actively chosen)
caller - Reference to window that should be used to display messages if needed


Copyright © 2011 Samuel Marshall. All rights reserved.