Version 94 of TkChat

Updated 2008-06-05 07:43:41 by makr

The chat application for the Tcl Chatroom which now implements The Next Generation Tcl Chatroom. It is based on the XMPP protocol (previously known as Jabber). tkchat provides several Tcl community specific features.

http://tkchat.tcl.tk/tkchat-small.png


Getting tkchat

Go here: http://tkchat.tcl.tk/

You can verify the download by fetching the gpg signature [L1 ] and validating with the authors gpg key [L2 ]. The windows starpack exe has also been AuthentiCode signed with a key issued by [L3 ].

TkChat is distributed as a starkit and as a starpack for Windows. The latest version is always at http://tkchat.tcl.tk/tkchat.kit and the Windows starpack can be found at [L4 ]. The distribution site also holds a number of older versions in case there is a problem with a particular release.

If you wish to obtain the source code, it is held in the tclapps cvs module in the tcllib project at sourceforge. To check out the code using anonymous cvs:

  cvs -d:pserver:[email protected]:/cvsroot/tcllib co -d tkchat tclapps/apps/tkchat

Note that you will require a particular version of jabberlib and you should get this from the tclers.tk website. You will also need a few packages from tcllib and tklib. The simplest method to get everything working is to fetch the starkit and unwrap it using sdx unwrap tkchat.kit. Then replace the bin subdirectory with a cvs checkout of tkchat and run this using tclkit tkchat.vfs/main.tcl

See TkChat - A History for the evolution of TkChat


Logging In

When you start tkchat the first time, you will see a window like this:

http://tkchat.tcl.tk/tkchat-logon.png

Simply enter (your) username and password and click on the logon. Your username does not need to be the same as your nickname, you can change it later on If your account doesn't exist yet, you will be prompted to creating one using the registration dialog:

http://tkchat.tcl.tk/tkchat-register.png

If your registration fails then a notice to this effect is printed in the tkchat chat area and you should try again with a different user name.

Use Proxy

tkchat can connect through an HTTP proxy server which supports the CONNECT method. You will almost certainly need to use an SSL connection for that, see at Use Jabber SSL below for more.

Enter the proxy details (ask your network admin or peek in your web browser settings), some proxies need a username and a password too, but most don't.

Remember Chat Password

This will save your password for the next time you start tkchat. If you enable this, you may also enable Auto-connect.

Jabber resource

You can change the jabber resource to 'work' or 'home' or something else, this allows you to log in from two computers at the same time, and be in the chat room with two times (with different nicknames). The resource will be appended to your nickname if when you try to transfer the nick from another location using the /nick command (see Commands below).

Jabber server:port

You can log into a different jabber server and still join the chat. The default is all.tclers.tk 5222. Another popular jabber server is jabber.org. Currently tkchat is not able to login to Google Talk accounts.

Use Jabber SSL

You can encrypt the connection between your computer and the jabber server. Most useful for proxies, but you can enable it for direct connections too. When enabling, set the Jabber server:port to use port 443 (the default is 5222 or 5223).

You will need to download http://tcl.tk/starkits/tls.kit and save it next to your tkchat.kit. If tkchat was running already you will need to restart it after the download has finished. The Windows starpack version already contains the tls extension so this is not necessary if you are using that version.

Use it to encrypt your traffic, remember, though that the tcler's chat is a public chat room.

Auto-connect

When enabled, the logon dialog will not be shown on startup, but you will automatically log in when you start tkchat. You must also enable Remember Chat Password for this to work.

Now choose the Logon button, and you're done!


Chatting with tkchat

Just type a message in the entry line at the bottom of your chat window and hit the enter key. It is that simple!

If you want to type a message with more than one line in it (as opposed to one long line, which automatically wraps), use the >> button to get a larger entry field, and click on the Post button to send your message. This is most useful for short pieces of code. For longer bits of code you should use the paste dialog accessed by typing Control-P or selecting from the chat area context menu. This will send your text to the web site at http://paste.tclers.tk/ and reply to you with the url of your pasted data.

If you want to send a message to a single user you can click on their name in the Online Users list. This will open a new dialog which provides one-to-one chat with that user. Right-clicking on a users name shows a context menu which can let you view their user information, chat client version and sometimes additional details. You may also use the combo box to the right of the Post button. By default it has All Users, but you can change it to any of the online users. Your message line will be pink-ish to indicate you are not talking to everyone.

Commands

If your message starts with a /, tkchat will try to see if it is a command.

/me <message>Makes you perform an 'action', your message is displayed as: * yourname <message>
/ot <message>Make an off-the-record remark, your message will not be stored in the server chatlog (this doesn't mean that nobody is logging it!).
/otme <message>Do an off-the-record action (like /me).
/msg <nickname> <message>
/whisper <nickname> <message>
Send a private message to user nickname.
/chat <nickname> ?message?Open a separate window to privately chat with the user identified by nickname, optionally posting an initial message.
/memo <[email protected]> <message>Send a private message to user [email protected]. If the user is currently not logged in the message should be stored and presented next time she logs in.
/afk ?reason?
/away ?reason?
Set your status to away from keyboard because of reason.
/dnd ?reason?
/busy ?reason?
Set your status to busy because of reason.
/back ?reason?Indicate that you have returned.
/nologAll messages and actions you type after /nolog are marked 'off-the-record'
/logWhen you are done talking about your family, you can mark your messages to be recorded again.
/nick <newnickname>Changes your nickname to newnickname, if that is still available. If the newnickname is in use by one of your other tkchat windows, tkchat will request the other window to release the nickname. You chat window will wait for the nick to become available, and grab it when it can.
/noisy ?nick? ?minutes?Toggle nick noisy for minutes (default 5). Messages from noisy users are not displayed. Not specifying a nick will give you a list of noisy users.
/last <nickname>Query special user ijchain when user nickname was last seen.
/?<search>Searches the chat window for search (backwards!). Repeating the search will find the next occurrence.
/!Clears the search and moves back to the end of the chat buffer.
/helpOpens this wiki page in your web browser.

Tcl community / utility commands

/tip <number>Open a webbrowser with the specific TIP page (Tcl Improvement Proposal), try /tip 1 to get more info.
/bug ?group? ?tracker? <number>Open the sourceforge page for the Tcl/Tk bug/feature request number.
/wiki <search>Search the Tcler's Wiki for the search string.

Miscellaneous commands

/google <search>Open a webbrowser and do a google search.
/googlefight <word1> <word2>Open a webbrowser and perform a google fight between two words or phrases.
/wikipedia <text>Open a webbrowser and send a query to wikipedia (abbr. /wikip <text>).
/wiktionary <text>Open a webbrowser and send a query to wikipedia dictionary (abbr. /wikid <text>).
/smileysShow the available smiley images.
/fontsize <number>
/size <number>
Change the chat window's font to size number.
/font ?name?Change the chat window's font to family name. Omitting name will open the font chooser dialog, where available.
/userinfo <nickname>Display registered information for user nickname (see below).

User info / Hide user

Users can put some info about themselves on the jabber server. To see these, do a right-click (from version 1.313 on MacOS X: Command-click) on the name in the user list (the right panel of tkchat). There comes a menu from which you can choose User info and Hide user. Double-clicking the item opens a new window for a one-to-one chat.


Chat history

When you log on, tkchat will ask you how much chat history you want to load. In the preferences menu, there is an option "Loading server history". You can use this to specify how much, if any, history you want to load on start up.


Plug-ins

New features are now added using a plug-in interface. The clock plug-in (file tkchat_clock.tcl) is a good guide for writing a new plug-in. The following picture shows a number of plug-ins operating in the tkchat status bar.

http://tkchat.tcl.tk/tkchat-statusbar.png

First on the left is the streaming audio plug-in which has some basic controls and a power-meter. Then the clock plug-in is showing the time in Bangkok (the format was configured to show a prefix of BNK and the timezone set for a user in the UK). Next is the RSS plugin, in this case the icon is bright showing that there are available un-read messages and indeed the tooltip lets the user know just what channel and how many messages are ready. Then there is a network connection icon that shows our connection state and displays the address of the connected server in a tooltip. Finally the padlock icon shows the secure state of the link next to the jabber server name. Clicking this icon permits the user to review the certificate chain in use provided the link is secured using SSL.

Streaming video

This plugin requires some parts of the img extension. If the jpeg image support can be loaded then the plugin installs itself in the File menu under Video feeds. A dialog permits you to add new streams or you can select a previously added stream from the menu (if any are shown).

Once a stream has been selected a new toplevel window will open displaying the video stream.

Streaming audio

If the snack audio extension can be loaded then the streaming audio plugin will install itself in the File menu as Play audio. A dialog can be used to add additional stream sources to the menu and by default there are a few internet radio streams listed (not all may be operating all the time and they may vanish over time).

The user may also select MP3 files using the Play file... menu item.

Once an audio stream or file has been selected a small audio control is displayed in the status bar. This permits the user to control the volume via a slider in the center of the control and to pause, stop or restart the stream. It may also show audio levels using a powermeter style display.

Clock

The clock plug-in adds a page to the Options dialog (accessed from the Preferences menu). On this page the user may configure a timezone offset and a display format string. Once enabled this causes the time in the provided timezone to be displayed in the statusbar. The default is to display the time as UTC time.

RSS Feeds

The RSS plug-in adds a page to the Options dialog where the user can enable or disable a small number of RSS feeds. The feeds are checked every 20 minutes and if new information is available on one of the monitored streams then the statusbar will show an active RSS icon (the same icon used in Firefox and IE). Clicking on the RSS icon will raise a dialog showing each RSS feed in a separate tabbed page.


Chat logs

The tkchat logs are stored at http://tclers.tk/conferences/tcl

The logs are quite nice to do some TkChatistics on.


See also Tclers Chat Tk GUI, Improving Tcl Chat, and tclapps, which is a module in the tcllib project at SourceForge.