GGChat

From OoKoo.org

Jump to: navigation, search
Logo suggestion by MagicalGradient (Oct. 12th 2009)

Contents

GChat

GGChat is a complete irc client which support custom themes (via css), scripting (via ECMA-262), multiple servers, etc...

Download

GGChat is available on 3 OSes and 2 flavors.

Please note that GGChat is still ALPHA and must not be used for everyday's activity.

Standard release

JavaScript debug release

This release is only for script developpers who want to get the JavaScript debug console. The debug console will popup in case of error, and can be manually called with the statement "debugger".

Creating themes

Themes can be created with CSS. The resulting file is an opaque .ggt file.

Theme creation kit: http://ggchat.gg.st/files/kit.zip

JavaScript Scripting

irc

The IRC object contains main functions for various things...

irc.version

Version of the irc client as an object, for example irc.version.full contains something like 0.1alpha22-jsdebug-linux64.

GGChat irc.version viewed from debugger.png

An example: if (irc.version.options.jsdebug) { ... }

irc.scriptsPath

Path where scripts are stored.

/eval print(irc.scriptsPath);

Any script in this path can be loaded directly with /load and unloaded with /unload

irc.filter(dispatch, type, callback)

Example:

irc.filter(IrcEvent.DISPATCH_SERVER, IrcEvent.SERVER_INPUT, function(ev) { ev.text = "\x034" + ev.text; });

irc.resetFilters()

Removes all filters on events. Should not be called from a script.

irc.timer(timeout, callback)

Runs a timer. Please note that the callback must return true for the timer to be called again. If the timer is no longer necessary, returning false will prevent the timer from being called again.

irc.resetTimers()

Removes all timers. Should not be called from a script.

irc.addCommand(command, function)

Adds an irc-like command.

Filesystem

Filesystem.read(filename)

Network

Network.httpGet(url, callback)

Gets an URL via HTTP.

Example:

irc.addCommand("radio", function() {
  Network.httpGet("http://kazuradio.com/title.php", function(success, data, error) {
    if (!success) {
      print("Radio access error: "+error);
      return;
    }
    view.say("Currently listening to "+data+" on KazuRadio - http://www.kazuradio.com/");
  });
});

Settings

If you want to modify a setting, you can usually do so by typing: /set setting value

List of current settings can be seen by typing /set

  • interface
    • language: Defines interface's language. Possible values include "auto" (detects language from OS), "C" (english) and "fr_FR". Other languages will come later
    • mainwindow
      • theme: The current interface theme (-1 if none)
  • irc
    • defaults
      • nickname: nickname when connecting to IRC
      • nickname_alt: alternative nickname if the inital nickname is already used by someone
    • channel
      • auto_rejoin: automatically rejoin channels when kicked (defaults to true)
    • message
      • alert
        • level: Level at which window alert is called. 1=anything happens, 2=someone talks, 3=highlight (default is 3)
        • time_ms: Time during which the alert is displayed, in millisecond. If zero, no time limit (this is the default)
      • action_format: How actions are displayed, defaults to * %1%2%3 %4
      • color_range: Colors to use when coloring nicknames, defaults to 2,3,4,5,6,7,10,12,13
      • completion_format: Format of completed nickname when the nickname is the first thing on line (defaults to %1: )
      • format: Format for normal messages, defaults to <%1%2%3> %4
      • style: Style to apply to nicknames (0=nothing, 1=self is bold, 2=others are colored 3=1+2)
      • timestamp: Enable timestamping in chats
      • timestamp_format: Format of timestamp (defaults to "[hh:mm] ").
    • network
      • ignore_ssl_errors: Ignore any SSL error at connection time to IRC network
  • system
    • update
      • autocheck: Should we perform check for new version on startup (true by default)
Personal tools
In other languages