com.planet_ink.coffee_mud.core.intermud.imc2
Class IMC2Driver

java.lang.Object
  extended by java.lang.Thread
      extended by com.planet_ink.coffee_mud.core.intermud.imc2.IMC2Driver
All Implemented Interfaces:
java.lang.Runnable

public final class IMC2Driver
extends java.lang.Thread

IMC2 version 0.10 - an inter-mud communications protocol Copyright (C) 1996 - 1997 Oliver Jowet: oliver@randomly.org IMC2 Gold versions 1.00 though 2.00 are developed by MudWorld. Copyright (C) 1999 - 2002 Haslage Net Electronics (Anthony R. Haslage) IMC2 MUD-Net version 3.10 is developed by Alsherok and Crimson Oracles Copyright (C) 2002 Roger Libiez ( Samson ) Additional code Copyright (C) 2002 Orion Elder Registered with the United States Copyright Office TX 5-555-584 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see the file COPYING); if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Ported to Java by Istvan David (u_davis@users.sourceforge.net)


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int CHAN_CLOSED
           
 java.util.Hashtable chan_conf
           
static int CHAN_COPEN
           
static int CHAN_CPRIVATE
           
 java.util.Hashtable chan_mask
           
static int CHAN_OPEN
           
static int CHAN_PRIVATE
           
 java.util.Hashtable chanhist
           
static int IA_CONFIG1
           
static int IA_CONFIG2
           
static int IA_NONE
           
static int IA_UP
           
 int imc_active
           
 short imc_log_on
           
 java.lang.String imc_name
           
 siteinfo imc_siteinfo
           
 hubinfo this_imcmud
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
IMC2Driver()
           
 
Method Summary
 java.lang.String do_imcinfo()
           
 java.lang.String do_imcstats()
           
 void ev_imc_firstrefresh()
           
 void ev_request_keepalive(java.lang.Object param)
           
 void exec_commands(PACKET p)
           
static java.lang.String[] explodeNicely(java.lang.String s)
           
static java.lang.String[] explodeNicely(java.lang.String s, java.lang.String separator)
           
 IMC_CHANNEL getAnIMC2Channel(java.lang.String name)
           
 REMOTEINFO getIMC2Mud(java.lang.String named)
           
 void imc_process_call_outs()
           
 void imc_read_from_socket(java.io.BufferedReader in)
           
 void imc_register_call_out(int hbeat, java.lang.String function_name, java.lang.Object param)
           
 void imc_request_keepalive()
           
 java.lang.String imc_send_chat(java.lang.String from, java.lang.String to, java.lang.String text, int level, int emote)
           
 void imc_send_isalive(java.lang.String reqFrom)
           
 void imc_send_ping(java.lang.String to)
           
 java.lang.String imc_send_reply(java.lang.String from, java.lang.String text, int level, int invis)
           
 java.lang.String imc_send_tell(java.lang.String from, java.lang.String to, java.lang.String text, int level, int invis)
           
 void imc_send_who(java.lang.String name, java.lang.String mudname, java.lang.String type, int level, int invis)
           
 void imc_send_whois(java.lang.String from, java.lang.String to, int level)
           
 boolean imc_startup(boolean force, java.lang.String loginName, java.lang.String host, java.lang.String email, java.lang.String web, java.lang.String hub, int port, java.lang.String passclient, java.lang.String passsrvr, java.util.List<ChannelsLibrary.CMChannel> imc2Channels)
           
 void imc_write_to_socket(java.io.DataOutputStream out)
           
 java.util.Hashtable query_channels()
           
 java.util.Hashtable query_muds()
           
 java.util.List<ChannelsLibrary.CMChannel> rebuildChannelMap()
           
 void run_imcminfo(java.lang.String name, java.lang.String mudname, java.lang.String type, int level, int invis)
           
 void run_imcpinfo(java.lang.String name, java.lang.String mudname, java.lang.String who, int level, int invis)
           
 void run()
           
 void shutdown()
           
static java.lang.String toIMCColours(java.lang.String res)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

this_imcmud

public hubinfo this_imcmud

imc_siteinfo

public siteinfo imc_siteinfo

imc_active

public int imc_active

chanhist

public java.util.Hashtable chanhist

chan_conf

public java.util.Hashtable chan_conf

chan_mask

public java.util.Hashtable chan_mask

imc_name

public java.lang.String imc_name

imc_log_on

public short imc_log_on

CHAN_OPEN

public static final int CHAN_OPEN
See Also:
Constant Field Values

CHAN_CLOSED

public static final int CHAN_CLOSED
See Also:
Constant Field Values

CHAN_PRIVATE

public static final int CHAN_PRIVATE
See Also:
Constant Field Values

CHAN_COPEN

public static final int CHAN_COPEN
See Also:
Constant Field Values

CHAN_CPRIVATE

public static final int CHAN_CPRIVATE
See Also:
Constant Field Values

IA_NONE

public static final int IA_NONE
See Also:
Constant Field Values

IA_CONFIG1

public static final int IA_CONFIG1
See Also:
Constant Field Values

IA_CONFIG2

public static final int IA_CONFIG2
See Also:
Constant Field Values

IA_UP

public static final int IA_UP
See Also:
Constant Field Values
Constructor Detail

IMC2Driver

public IMC2Driver()
Method Detail

ev_request_keepalive

public void ev_request_keepalive(java.lang.Object param)

rebuildChannelMap

public final java.util.List<ChannelsLibrary.CMChannel> rebuildChannelMap()

explodeNicely

public static final java.lang.String[] explodeNicely(java.lang.String s)

shutdown

public void shutdown()

explodeNicely

public static final java.lang.String[] explodeNicely(java.lang.String s,
                                                     java.lang.String separator)

ev_imc_firstrefresh

public final void ev_imc_firstrefresh()

imc_startup

public final boolean imc_startup(boolean force,
                                 java.lang.String loginName,
                                 java.lang.String host,
                                 java.lang.String email,
                                 java.lang.String web,
                                 java.lang.String hub,
                                 int port,
                                 java.lang.String passclient,
                                 java.lang.String passsrvr,
                                 java.util.List<ChannelsLibrary.CMChannel> imc2Channels)

do_imcstats

public final java.lang.String do_imcstats()

do_imcinfo

public final java.lang.String do_imcinfo()

imc_send_whois

public final void imc_send_whois(java.lang.String from,
                                 java.lang.String to,
                                 int level)

imc_register_call_out

public void imc_register_call_out(int hbeat,
                                  java.lang.String function_name,
                                  java.lang.Object param)

imc_process_call_outs

public void imc_process_call_outs()

toIMCColours

public static final java.lang.String toIMCColours(java.lang.String res)

getIMC2Mud

public REMOTEINFO getIMC2Mud(java.lang.String named)

getAnIMC2Channel

public IMC_CHANNEL getAnIMC2Channel(java.lang.String name)

query_channels

public final java.util.Hashtable query_channels()

query_muds

public final java.util.Hashtable query_muds()

exec_commands

public final void exec_commands(PACKET p)

imc_read_from_socket

public final void imc_read_from_socket(java.io.BufferedReader in)

imc_write_to_socket

public final void imc_write_to_socket(java.io.DataOutputStream out)

imc_send_isalive

public final void imc_send_isalive(java.lang.String reqFrom)

imc_request_keepalive

public final void imc_request_keepalive()

imc_send_ping

public final void imc_send_ping(java.lang.String to)

run_imcpinfo

public final void run_imcpinfo(java.lang.String name,
                               java.lang.String mudname,
                               java.lang.String who,
                               int level,
                               int invis)

run_imcminfo

public final void run_imcminfo(java.lang.String name,
                               java.lang.String mudname,
                               java.lang.String type,
                               int level,
                               int invis)

imc_send_who

public final void imc_send_who(java.lang.String name,
                               java.lang.String mudname,
                               java.lang.String type,
                               int level,
                               int invis)

imc_send_tell

public final java.lang.String imc_send_tell(java.lang.String from,
                                            java.lang.String to,
                                            java.lang.String text,
                                            int level,
                                            int invis)

imc_send_reply

public final java.lang.String imc_send_reply(java.lang.String from,
                                             java.lang.String text,
                                             int level,
                                             int invis)

imc_send_chat

public final java.lang.String imc_send_chat(java.lang.String from,
                                            java.lang.String to,
                                            java.lang.String text,
                                            int level,
                                            int emote)

run

public final void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread