Das initialisieren eines Modules geschieht über den Opcode ?.

Das Paket enthält folgende Daten:

[0] ? Opcode
[1] int eindeutige ModuleID
[2] Class Klassenname des Modules
[3] String Channelname


Beispiel-Paket:
?\012345\0BillardManager\0/Billard 123
Auszug aus dem Clienten (Unrelevante Teile wurden zu Übersichtszwecken entfernt):

/* Module Init */
} else if(nextToken.equals("?")) {
final String module_id = tokens.nextToken();
final String module_class = tokens.nextToken();
final String channel = this.getChannelName(tokens);
final ChannelFrame frame = this.channelFrames.get(channel);

if(frame == null) {
System.out.println("Channel does not exist. (" + channel + ")");
return;
}

final Class<?> clazz = Class.forName(module_class);

if(clazz != null) {
try {
final IModule instance = (IModule) clazz.newInstance();

System.out.println("Init Module (" + module_class + ", ID: " + module_id + ") on Channel " + channel);
this.getModule.put(module_id, instance);
instance.init(this, frame, module_id);
} catch(Exception ex) {
System.out.println("Exception while instanciation. " + ex);
}
} else {
System.out.println("Class does not exist. (" + module_class + ")");
}
} [...]


Die Modul-Klasse implementiert ein Interface (hier genannt "IModule"), was insgesamt drei Methoden anbietet:
package client;
import java.util.StringTokenizer;

public interface IModule {
void init(GroupChat groupChat, ChannelFrame frame, String channel);
void onReceive(StringTokenizer tokens);
void destroy();
}


Die init-Methode muss nicht zwingend einen ChannelFrame-arrangement besitzten (Also Methoden, die das Channelfenster so umändern, dass Platz für das Modul/Spiel ist - Bei Billard wäre dies die BillardTable, die über der Chatausgabe/Nickliste dargestellt wird). Oftmals wird das arrangement über ein Sub-Protokoll (über onReceive) geregelt, was ein zusätzliches Initialisierungspaket benötigt.