com.leafdigital.irc.api
Interface Commands

All Superinterfaces:
Singleton

public interface Commands
extends Singleton

Singleton that runs IRC /-commands. Commands are implemented via plugins which listen for UserCommandMsg.


Method Summary
 void doCommand(java.lang.String command, Server contextServer, IRCUserAddress contextNick, java.lang.String contextChan, MessageDisplay md, boolean variables)
          Carries out an IRC command.
 boolean isCommandCharacter(char c)
          Returns true if the character (presumably first character of an IRC typed line) is a command character.
 

Method Detail

doCommand

void doCommand(java.lang.String command,
               Server contextServer,
               IRCUserAddress contextNick,
               java.lang.String contextChan,
               MessageDisplay md,
               boolean variables)
Carries out an IRC command.

Parameters:
command - Command string
contextServer - Context server that command applies to
contextNick - Context nickname (may be null)
contextChan - Context channel (may be null)
md - Display to use for response/error messages
variables - If true, replaces variables in command (note: this is currently not implemented and has no effect)

isCommandCharacter

boolean isCommandCharacter(char c)
Returns true if the character (presumably first character of an IRC typed line) is a command character. Usually command character is / but users can add others.

Parameters:
c - Character in question
Returns:
True if command, false otherwise


Copyright © 2011 Samuel Marshall. All rights reserved.