irc 1.0

Category / Domain : CommTools
SCOL Voy@ger Compatibility : V 2.0 or above
Update : 2000/09

Function

The IRC module allows to connect to IRC servers from SCOL 3D virtual worlds. Users of 3D worlds and 2D chats can thus communicate.
User can only connect to one channel at the same time, the channel names and server names are defined in the scol site (the user can only choose among the defined one).
The chosen principle with 2D and 3 D chats is the following one : a 3D SCOL cell = an IRC channel.


TAKE CARE ABOUT :
- The time-out of the conenction to the IRC server is set to 30 seconds
- Requires the ColorTerm module 1.3 or higher in the 3D SCOL cell connected to the IRC
- Do not use the list of users in the C3D3; use the one in the IRC module (UsersList)
- Do not connect the ColorTerm module to the C3D3 for chat since the C3D3 now uses the IRC module
- Do not connect to several IRC servers at the same time, otherwise you may have conflicts with nicknames (for example if a pseudo is accepted by server and not by the other one).
- It is necessary to have a full synchronization beetween the users's names on the SCOL server and about the IRC server.

Configuration


Figure 1 : IRC module Interface

(1) : Server host => Address of the IRC server

(2) : Server port => Port number on the IRC server

(3) : Max Nickname length Accepted by server => Maximum number of characters accepted by the server for the nickname (to find out this value, enter the maximum value [20 represents the maximum value authorized by the various login modules in SCOL language], connect to the server and change nicknames until it is no longer accepted or is truncated).

(4) : Channel name Add => Used to add a chat channel

(5) : Channel name Del => Used to remove the selected chat channel

(6) : Topic background Color => Determines the background color of the zone containing the channel's topic

(7) : Topic text color => Determines the text color of the channel's topic zone.

(8) : Quit URL => Address of the Scolmaster's 3D site to which any 3D-IRC user who disconnects from the IRC server is transferred.

(9) : Check Scol secured Login => To check if the IRC module is used with the LoginP3

(10) : Enable NickServ/ChanServ => To check in order to respect the compatibility with the IRC Nickserv and Chanserv services.

Implementation


Action Function
module.event à irc.start Starts the IRC module on the client
module.event à irc.destroy Destroys the module on the client
module.event à irc.connect Establishes the connection with the IRC server
module.event à irc.disconnect Disconnects from the IRC server
module.event à irc.connectAndRegisterChannel#xxx Connects to the IRC server if the user is not already connected.
Tries to join channel #xxx
Quits the old channel if the user is not already in a channel and if the new channel has effectively been joined
module.event à irc.unregisterChannel#xxx Quits channel #xxx
module.event à irc.unregisterChannel#xxxAndDisconnect Quits channel #xxx
Disconnects from the IRC server
Action useless if the user is not in channel #xxx
module.event à irc.command Used to retrieve the IRC actions and messages entered by the user
module.event à irc.avatarList Used to retrieve the list of avatars present in the C3D3 (used to orient oneself in the
direction of avatars when the user clicks on their nickname in the list of persons connected)
module.event à irc.showLoginInterface Displays the window in which the user can change his nickname
module.event à irc.showContextualMenu Used to open the contextual menu, for example when the user clicks on a user's avatar

Event Function
irc.in à module Action Starting the module generates an action
irc.destroyed à module Action Destroying the module generates an action
irc.connection_OK à module Action When the connection to the IRC server is successful, an action is generated
irc.connection_ERROR à module Action When an error occurs during the connection to the IRC server, an action is generated
irc.disconnected à module Action When a user is disconnected from the IRC server, an action is generated
irc.channel#xxx_REGISTER_OK à module Action When the registerChannel#xxx action is successful, an action is generated
irc.channel#xxx_REGISTER_ERROR à module Action When the registerChannel# action is not successful, an action is generated
irc.channel#xxx_UNREGISTERED à module Action When the unregisterChannel#xxx action is successful or when the user has joined a new channel and has quit the old one, an action is generated
irc.channel#xxx_FORCEDPART à module Action

When the user is banned from the channel or disconnected from the IRC server when in a channel, an action is generated

irc.channelMsg à module Action Sending messages from the current channel generates an action
irc.privateMsgWarning à module Action When the user receives a private message and the private message window is not opened or is not focused, an action is generated
irc.registerMacros à module Action

Registering IRC macros (e.g. with ColorTerm for example) generates an action

irc.unregisterMacros à module Action Unregistering IRC macros (e.g. with ColorTerm for example) generates an action
irc.centerOnPlayer à module Action Clicking on an avatar in the list, to orient oneself towards him, generates an action
irc.checkLoginPassword à module Action The verification of a nickname in a user database in a protected login management module (e.g. the LoginP3 module for example) generates an action
irc.loginChanged à module Action When a user changes login, an action is generated (usually towards the !chgLogin action of the C3D3)

Zone Function Interface Assignment
irc.ChannelTopic Displays the channel's topic with a scroll bar Client No
Irc.UserList

Displays the list of IRC users (with the number of users in the channel)

Client No

FIRST EXAMPLE :
- From the first 3D cell not connected to the IRC, you want to connect to an IRC server and join a channel when cliking on a door.
- if you are authorized by the server in the channel, you enter in a room.
- when leaving this room, you are disconnected from the server (and obviously the channel too) and you go back to the first SCOL cell (without IRC abilities).
- in this example, you are connected to the #example channel (which must be add using the module editor) :

[C3D_IRC] = 3D SCOL cell with a connection to the IRC server and to the channel #example
[C3D_SCOL] = 3D SCOL cell without IRC connection

[LOGIN_IRC_BUTTON] = button allowing to activate the interface to change of nickname ont the IRC server (the chnage will be done with the !chgLogin event in SCOL language).
[LOGIN_SCOL_BUTTON] = button allowing to activate the module to change the nickname in SCOL. (module used when there is no connection to the IRC server).

[SHELL] start -> [IRC] start (starts the module at the client side)

[COLORTERM] command -> [IRC] command (receives the command lines send through the ColorTerm module)
[COLORTERM] extMacroCommand -> [IRC] command (receives the IRC macros entered in the ColorTerm module)
[IRC] channelMsg -> [COLORTERM] privateMsg (sends the IRC messages to the ColorTerm module)

[C3D_SCOL] lienVersIRC -> [IRC] connectAndRegisterChannel#exemple (connection to the IRC server, tries to connect to the #example channel)

[IRC] channel#exemple_REGISTER_OK -> [C3D_IRC] pos_enter (to enter in the 3D-IRC cell only if the #example channel has been joined)

[C3D_IRC] lienVersSCOL -> [IRC] disconnectAndUnregisterChannel#exemple (quits the #example channel et disconnects the IRC server)
[C3D_IRC] lienVersSCOL -> [C3D_SCOL] pos_from_#exemple (go back to the SCOL cell)

[IRC] channel#exemple_FORCEDPART -> [C3D3_SCOL] pos_from_#exemple (if banned or disconnected from the IRC server further to a flood for example)

[IRC] loginChanged -> !chglogin (in the diffrenet SCOL modules including the ColorTerm module)

[IRC] registerMacros -> [COLORTERM] registerExtMacro (registers the IRC macros in the Colorterm module)
[IRC] unregisterMacros -> [COLORTERM] unregisterExtMacro (unregisters the IRC macros in the ColorTerm module)

[C3D_IRC] avatarList -> [IRC] avatarList (Allows to orientate oneself towards a 3D user when clicking in the list of users of the IRC module)
[IRC] centerOnPlayer -> [C3D_IRC] !centerOnPlayer (Allows to orientate oneself towards a 3D user when clicking in the list of users of the IRC module )
[C3D_IRC] select2 -> [IRC] showContextualMenu (opens a contextual menu of an user when right-clicking on his avatar)

[LOGIN_IRC_BUTTON] click -> [IRC] showLoginInterface (opens the login interface when clicking)
[IRC] connection_OK -> [LOGIN_IRC_BUTTON] start (creates the button when connected to the IRC server)
[IRC] connection_OK -> [LOGIN_SCOL_BUTTON] destroy (removes the button when connected to the IRC server)
[IRC] disconnected -> [LOGIN_IRC_BUTTON] destroy (removes the button when leaving the IRC server)
[IRC] disconnected -> [LOGIN_SCOL_BUTTON] start (creates the button when leaving the IRC server)

SECOND EXAMPLE :
- in this example, the user connects to the IRC server when accessing to a 3D cell of the site.
- in this cell, the user may click on various doors, each accesses to a different channel, each channel corresponds to a 3D SCOL cell. Only two channels will be used in this example.
- it is possible to go from a channel to another one without coming back to the first cell.

[C3D_SCOL] = 3D SCOL cell without IRC connection
[C3D_IRC_SERVER] = 3D SCOL cell with connection to the IRC server
[C3D_IRC_CANAL_1] = 3D SCOL cell with IRC connection to the IRC server and to the #channel1 channel
[C3D_IRC_CANAL_2] = 3D SCOL cell with IRC connection to the IRC server and to the #channel2 channel

[LOGIN_IRC_BUTTON] = button allowing to activate the change of nickname interface on the IRC server (the change with SCOL will be done with the !chgLogin event)
[LOGIN_SCOL_BUTTON] = button allowing to activate the change of nickname interface in SCOL language. (used when there is no connection to IRC server



[SHELL] start -> [IRC] start (starts the module at the client side)

[COLORTERM] command -> [IRC] command (receives the command entered in the ColoTerm module)
[COLORTERM] extMacroCommand -> [IRC] command (receives the IRC macros entered in the ColorTerm module)
[IRC] channelMsg -> [COLORTERM] privateMsg (sends the IRC channels messages to the ColorTerm module)

[C3D_SCOL] lienVersIRC -> [IRC] connect (connection to the IRC server)

[IRC] connection_OK -> [C3D_IRC_SERVER] pos_enter (entry in the IRC cell connected to the server)
[IRC] disconnected -> [C3D_SCOL] pos_from_irc (return to the SCOL cell if disconnected from the IRC server)

[C3D_IRC_SERVER] lienVersCanal1 -> [IRC] connectAndRegisterChannel#canal1 (connection attempt to the #channel1 channel)
[C3D_IRC_SERVER] lienVersCanal2 -> [IRC] connectAndRegisterChannel#canal2 (connection attempt to the #channel2 channel)

[IRC] channel#canal1_REGISTER_OK -> [C3D_IRC_CANAL_1] pos_enter (to enter in the cell only if the IRC channel #channel1 has been joined)
[IRC] channel#canal2_REGISTER_OK -> [C3D_IRC_CANAL_2] pos_enter (to enter in the cell only if the IRC channel #channel2 has been joined)

[C3D_IRC_CANAL_1] lienVersCelluleIRCserveur -> [IRC] unregisterChannel#canal1(quits the #channel1 channel)
[C3D_IRC_CANAL_1] lienVersCelluleIRCserveur -> [C3D_IRC_SERVER] pos_from_#canal1 (returns to the cell connected only connected to the server)

[C3D_IRC_CANAL_2] lienVersCelluleIRCserveur -> [IRC] unregisterChannel#canal1(quits the #channel2 channel)
[C3D_IRC_CANAL_2] lienVersCelluleIRCserveur -> [C3D_IRC_SERVER] pos_from_#canal2 (returns to the cell connected only connected to the server)

[IRC] channel#canal1_FORCEDPART -> [C3D_IRC_SERVER] pos_from_#canal1 (if banned from the channel or disconnected from the IRC server further to a flood for example)
[IRC] channel#canal2_FORCEDPART -> [C3D_IRC_SERVER] pos_from_#canal2 (if banned from the channel or disconnected from the IRC server further to a flood for example)

[C3D_IRC_CANAL_1] lienVersCanal2 -> [IRC] connectAndRegisterChannel#canal2 (connection attempt to the #channel2 channel, disconnection of the #channel1 channel if allowed)
[C3D_IRC_CANAL_2] lienVersCanal2 -> [IRC] connectAndRegisterChannel#canal1 (connection attempt to the #channel1 channel, disconnection of the #channel2 channel if allowed)

[IRC] loginChanged -> !chglogin (in the various SCOL module including the ColoTerm module)

[IRC] registerMacros -> [COLORTERM] registerExtMacro (registers the IRC macros in the ColorTerm module)
[IRC] unregisterMacros -> [COLORTERM] unregisterExtMacro (unregisters the IRC macros in the ColorTerm module)

[C3D_IRC_CANAL_1] avatarList -> [IRC] avatarList (allows to orientate oneself towards another 3D user when clicking in the users list of the IRC module)
[C3D_IRC_CANAL_2] avatarList -> [IRC] avatarList (allows to orientate oneself towards another 3D user when clicking in the users list of the IRC module)
[IRC] centerOnPlayer -> [C3D_IRC_CANAL_1] !centerOnPlayer (allows to orientate oneself towards another 3D user when clicking in the list of the users of the IRC module)
[IRC] centerOnPlayer -> [C3D_IRC_CANAL_2] !centerOnPlayer (allows to orientate oneself towards another 3D user when clicking in the list of the users of the IRC module)
[C3D_IRC_CANAL_1] select2 -> [IRC] showContextualMenu (allows to open a user's contextual menu when right-clicking on his avatar)
[C3D_IRC_CANAL_2] select2 -> [IRC] showContextualMenu (allows to open a user's contextual menu when right-clicking on his avatar)

[LOGIN_IRC_BUTTON] click -> [IRC] showLoginInterface (displays the Login interface when clicking)
[IRC] connection_OK -> [LOGIN_IRC_BUTTON] start (creates the button when connecting to the IRC server)
[IRC] connection_OK -> [LOGIN_SCOL_BUTTON] destroy (removes the button when connecting to the IRC server)
[IRC] disconnected -> [LOGIN_IRC_BUTTON] destroy (removes the button when connecting to the IRC server)
[IRC] disconnected -> [LOGIN_SCOL_BUTTON] start (creates the button when connecting to the IRC server)


* COMPATIBILITY WITH THE SECURED NICKNAMES IN SCOL :
- requires the LOGINP3 update 2.1 or above
- editor parameters : you must tick the "check SCOL secured login" option.
- additionnal link to create : [IRC] checkLoginPassword -> [LOGINP3] check


* COMPATIBILITY WITH THE IRC NICKSERV AND CHANSERV :
- editor parameters : you must tick the "Enable NickServ/ChanServ commands" option.
- for further details, pour plus d'informations, see the online help of the IRC module by entering the command "/irchelp".