C# Class wmib.Instance

Represent one instance of this bot
Mostra file Open project: benapetr/wikimedia-bot Class Usage Examples

Public Properties

Property Type Description
Hostname string
Instances Instance>.Dictionary
IsActive bool
Network Network
Nick string
Port int
PrimaryInstance Instance
Protocol WmIrcProtocol
TargetBuffer Instance>.Dictionary

Public Methods

Method Description
Connect ( ) : void
ConnectAllIrcInstances ( ) : void
CreateInstance ( string name, int port ) : Instance

Creates a new instance

Disconnect ( ) : void
GetInstance ( ) : Instance

Return instance with lowest number of channels

Init ( ) : void

Create this instance

Instance ( string name, int port ) : System

Creates a new bot instance but not connect it to IRC

Join ( ) : void

Join all channels

Kill ( ) : void
QueueSize ( ) : int
ShutDown ( ) : void

Private Methods

Method Description
Exec ( ) : void
JoinAll ( ) : void

This is a private handler for channel joining, never call it directly, use Join() for that

Method Details

Connect() public method

public Connect ( ) : void
return void

ConnectAllIrcInstances() public static method

public static ConnectAllIrcInstances ( ) : void
return void

CreateInstance() public static method

Creates a new instance
public static CreateInstance ( string name, int port ) : Instance
name string
port int
return Instance

Disconnect() public method

public Disconnect ( ) : void
return void

GetInstance() public static method

Return instance with lowest number of channels
public static GetInstance ( ) : Instance
return Instance

Init() public method

Create this instance
public Init ( ) : void
return void

Instance() public method

Creates a new bot instance but not connect it to IRC
public Instance ( string name, int port ) : System
name string Name
port int Port
return System

Join() public method

Join all channels
public Join ( ) : void
return void

Kill() public static method

public static Kill ( ) : void
return void

QueueSize() public method

public QueueSize ( ) : int
return int

ShutDown() public method

public ShutDown ( ) : void
return void

Property Details

Hostname public_oe property

Host for bouncer
public string Hostname
return string

Instances public_oe static_oe property

List of instances
public static Dictionary Instances
return Instance>.Dictionary

IsActive public_oe property

If you need to permanently disconnect this instance, change this to false
public bool IsActive
return bool

Network public_oe property

public Network,wmib Network
return Network

Nick public_oe property

Nickname of this instance
public string Nick
return string

Port public_oe property

Port for bouncer
public int Port
return int

PrimaryInstance public_oe static_oe property

public static Instance,wmib PrimaryInstance
return Instance

Protocol public_oe property

public WmIrcProtocol,wmib Protocol
return WmIrcProtocol

TargetBuffer public_oe static_oe property

Targets of each instance This is used to remember the last instance that user was talking to in a private message so that we respond to user using the same instance and not primary one
public static Dictionary TargetBuffer
return Instance>.Dictionary