English  Deutsch  

Pichat chat configuration

Last update 25/May/2010 by Mark Seuffert

1. Introduction

Create your own chat system. You are able to adjust the chat to your personal taste, no matter if you just want to chat at home or run a public chat server. This document is for advanced users and administrators who want to fine tune their chat and will provide you with information about customising and improving your chat services.

2. Prerequisites

Pichat is a software to communicate and exchange information. Its primary goals are simplicity, privacy, comfort, stability and free information exchange. With this characteristics it fits well as private chat for friends, as a community chat system and for business support. A feature of Pichat is serving a variety of protocols and formats, allowing chats to be easily integrated and accessed from anywhere.
A chat service can be offered in the local network (LAN) and to the internet, last requires an online internet connection. Please be cautious when setting up a public chat on the Internet, it's not recommend to run a public chat service without a proper protection! See also security advice.

3.1. Web server

There is an integrated web server in Pichat which can be used for data exchange. You don't need to set up anything in order to use the web server and the webchat. However, you might want to customise your website and your webchat.
A web server has a so called root directory, only files inside this directory are available to others. You find it in the Pichat directory in your home directory, on Windows enter %APPDATA% in Windows Explorer. Please copy files you want to share with any user into one folder (default is 'webserver/public') and files you want to share only with registered users into another (default is 'webserver/private'). This is great if you want to share files with your friends, but at the same time keep private files within a closer circle. You can of course organise your web server very differently, all web server locations can be configured in the [Server] section of the Pichat INI file.
Examples:To access your web server go to...
 
http://127.0.0.1
http://myserver
First example accesses your own computer. In the second example 'myserver' is the public address of your web server. This could be the computer name inside a local network or a real hostname like 'pichat.no-ip.org'.
Notes: The web server logs all requests to a logfile using the 'combined logfile format' which many web servers use. The logfile contains downloaded files, referer (where the request came from), user agent (which program made the request) and more details. If you are interested in up-to-date traffic statistics see below in section 7.

3.2. Webchat

Webchat login and chat status
Webchat login and chat status
Pichat has a built-in webchat with login page. Users can type in their nickname there and then enter the chat. Alternatively, it is possible to log in a user directly with a link to the webchat.
The webchat works with a wide range of web browser, no browser plugins required. Users get automatically the best functionality for their web browser, such as streaming chat output for modern browsers and simple text output for text browsers. Where available the webchat makes use of CSS, DOM and JavaScript.
Syntax:location?key=value[&key=value ...]
 
Arguments:
location=webserver location
key=name of argument, see below
value=value of argument
 
The following keys are supported in the webchat:
 
chatroom=name of chatroom (none for default chatroom)
colorscheme=name of color scheme (none for default color scheme)
language=language override, ISO639 (none for auto detect)
nickname=nickname of user
useragent=name of user agent (none for unnamed webchat)
 
browser=browser type override (none for auto detect)
BROWSER_DYNAMIC = requires JavaScript, server push
BROWSER_SIMPLE = limited functionality, browser pull
BROWSER_UNSUPPORTED = browser not working in webchat
inputbar=show input bar? boolean value
navigationbar=show navigation bar? boolean value
sidebar=show side bar? boolean value
smileybar=show smiley bar? boolean value
streamforce=request extra stream updates? boolean value
for very stubborn web browsers and proxies
 
startcommands=commands when entering the chat, comma separated text
disabledcommands=commands which are filtered out, comma separated text
 
Arguments are either text or numerical. A 'boolean' value means the
value can be 0 (no/off) or 1 (yes/on).
 
Examples:http://myserver/chat
http://myserver/chat/connect?nickname=Moak
http://myserver/chat/connect?nickname=Moak&chatroom=flirt
Send a friend a link per email to enter your webchat with one click. Specify your friend's name (e.g. Moak) as shown in the examples above. The third example shows how to specify a nickname and a chatroom. Please replace 'myserver' with the public address of your own server.
Notes: Values containing space or special characters have to be URL encoded as usual, for example like this: 'special%20characters'. All webchat pages follow the same syntax, the arguments 'colorscheme' and 'language' can be used with almost any webchat page.

3.3. Webchat templates

The webchat can be completely customised via HTML templates. Pichat comes with built-in template files, to change them copy new files into your webchat folder (default is '~/pichat/webserver/chat/'), see [Server] section of the Pichat INI file. Only templates inside this folder will be used.
Here is a list of the main template files:
chat_help.htmlhelp page
chat_login_closed.htmllogin page when chat is closed
chat_login_members.htmllogin page when chat is for registered users only
chat_login_members_error.htmllogin page after invalid login
chat_login_open.htmllogin page when chat is open for any user
chat_login_open_error.htmllogin page after invalid login
chat_logout.htmllogout page
chat_session_error.htmlpage for outdated or failed session
frame_browser_dynamic.htmlframe start for standard web browser
frame_browser_simple.htmlframe start for simple web browser
frame_browser_unsupported.htmlframe start for unsupported web browser
frame_output.htmlframe with streaming chat output
location_home.htmldefault homepage
location_media.htmlchat media page for graphics and sounds
location_status.htmlchat status page
stylesheet_base.cssthe mother of all style sheets
There are typically more files used by start pages, e.g. for a navigation bar or creating a custom webchat layout. It's is good to have a look at existing webchat template packs and start with one as an example. You don't need to overwrite all template files (the built-in template pack consists of over 20 files), it's enough to overwrite single files.
For examples please see Pichat downloads.
All webchat pages are dynamically generated by a built-in parser. This parser is the central tool for configuring a webchat. It looks in template files for text strings starting with '$' or '§' character (e.g. $nickname or §nickname) and then replaces them with text arguments. You can supply arguments either by appending them to the URL or with HTML forms. Arguments are available in two encodings, HTML encoded (for '$' text strings) and URL encoded (for '§' text strings).
The chat server offers additional arguments to the parser:
(Arguments marked with * are available both HTML and URL encoded)
$chat_alternate_stylesheetscolor schemes as style sheets, multiple lines
$chat_browser_type*detected browser type
$chat_chatroom_default*name of default chatroom, chat server entrance
$chat_chatroom_banned*name of chatroom for banned users
$chat_colorscheme*detected color scheme
$chat_colorscheme_graphicsset*graphics set of color scheme
$chat_commentcomment not visible in output, text in brackets
$chat_default_argumentsset defaults, comma separated list in brackets
$chat_forward_arguments*received arguments for HTML forms or HTML links
§chat_forward_arguments_cdatareceived arguments suitable for JavaScript links
$chat_forward_notdon't forward, comma separated list in brackets
$chat_interestskeywords with interests
$chat_language*detected language, ISO639
$chat_language_charset*charset of language (e.g. ISO-8859-1)
$chat_location_chat*web server location for webchat
$chat_location_media*web server location for graphics and sounds
$chat_location_status*web server location for status page
$chat_location_protected*web server location for password protected files
$chat_server_http_root*web server root directory
$chat_server_namechat server name
$chat_server_versionchat server version
$chat_server_welcomechat server welcome message
$chat_web_page_headerheader for web pages
$chat_web_page_footerfooter for web pages
$http_referer*referring address from HTTP/HTTPS request
$http_remote_addr*IP address of client/proxy
$http_server*server address from HTTP/HTTPS request
There are more arguments for a webchat session:
$chat_client_chatroom*current chatroom name
$chat_client_colorscheme*current color scheme name
$chat_client_language*current language, ISO639
$chat_client_nickname*current nickname of user
$chat_client_refreshtext 'refresh' or 'norefresh' for page refreshs
$chat_client_refresh_intervallintervall for page refreshs (seconds)
There are even more arguments when using the extended parser:
$chat_activitychat activity of last hour (percent)
$chat_activity_levelchat activity level as text (low/medium/high)
$chat_chatroom_numberpermanent chatroom number
$chat_chatroom_nameX*chatroom name (X = number of permanent chatroom)
$chat_chatroom_topicXchatroom topic (")
$chat_chatroom_user_listXchatroom users (")
$chat_chatroom_user_numberXchatroom user number (")
$chat_chatroom_user_whoXchatroom name and users (")
$chat_chatroom_user_infoXchatroom name and user number (")
$chat_chatroom_user_statuschatroom names and users, multiple lines
$chat_port_chatlistening port of chat server (TCP/UDP)
$chat_port_httplistening port of web server (TCP)
$chat_server_dedicatedchat is running as dedicated server
$chat_server_modechat server mode (open/members/closed)
$chat_server_statuschat server status, multiple lines
$chat_server_status_shortchat server status, short summary
$chat_server_status_portschat server status, listening port numbers
$chat_server_status_userschat server status, user statistics
$chat_server_status_trafficchat server status, traffic statistics
$chat_server_status_uptimechat server status, uptime
$chat_server_uptimetime chat server is running (seconds)
$chat_traffic_totaltotal traffic, chat plus web
$chat_traffic_receivedreceived traffic, chat plus web
$chat_traffic_sentsent out traffic, chat plus web
$chat_traffic_chat_receivedreceived traffic, chat server
$chat_traffic_chat_sentsent out traffic, chat server
$chat_traffic_web_receivedreceived traffic, web server and webchat
$chat_traffic_web_sentsent out traffic, web server and webchat
$chat_traffic_compressionoverall compression ratio (percent)
$chat_traffic_compression_leveloverall compression as text (low/medium/high)
$chat_user_numbercurrent user number
$chat_user_peakhighest user number since server was started
$chat_user_maxmaximum number of users allowed
$chat_user_servednumber of users served
Syntax:parser?file=filename[&key=value ...]
parser-extended?file=filename[&key=value ...]
 
Arguments:
filename=name of template file to be parsed
key=name of argument (appended to the URL)
value=value of argument (appended to the URL)
 
Examples:http://myserver/chat/parser?file=test.html
http://myserver/chat/parser?file=test.html&status=hello
http://myserver/chat/parser-extended?file=chat_server.rss
First and second example parses an HTML file. The third example calls the extended parser to generate a RSS feed (XML format). Please replace 'myserver' with the public address of your own server.
Notes: Keys without value will be ignored. A key with the postfix '_checkbox' will insert another key without the postfix. In case there are multiple keys with the same name the first one will win. Values appended to the URL containing space or special characters have to be URL encoded as usual, for example like this: 'special%20characters'. The parser works with any newline separated text file, you are not limited to HTML files. To preserve the '$' or '§' character in the parsed output use '$char' or '§char' in your template files. In order to prevent malicious code injection (Cross Side Scripting) browser supplied input to the parser is strictly sanitised, input is available both HTML and URL encoded.

3.4. Webchat style sheets

The webchat offers multiple style sheets with color information. Each style sheet can be extended with help of a CSS file. To add a CSS file copy it into your webchat folder (default is '~/pichat/webserver/chat/'), see [Server] section of the Pichat INI file. Only style sheets inside this folder will be used.
Syntax:stylesheet_colorscheme_name.css
location/stylesheet?colorscheme=name
 
Arguments:
name=name of color scheme
location=webserver location
 
Examples:stylesheet_colorscheme_night.css
http://myserver/chat/stylesheet?colorscheme=night
First example shows the file name of a style sheet extension for the 'Night' color scheme. The second example shows the URL for the resulting style sheet. Please replace 'myserver' with the public address of your own server.
Notes: Style sheets are provided for all available color schemes, for more information about color schemes see below in section 5.3. Graphics and backgrounds for stylesheets can be stored inside the media folder (default is '~/pichat/webserver/chatmedia/'), see [Server] section of the Pichat INI file.

4. Command line arguments

You can start Pichat with optional settings. Basically any Pichat INI file setting can be used as a command line argument, for a complete description of all settings see below. There is one additional command line argument with name 'IniFile' to specify the path of a different INI file.
Syntax:filename -key[=value] [...]
 
Arguments:
key=name of argument (any INI file setting)
value=value of argument
 
Examples:pichat.exe -ServerDedicated
pichat.exe -Nickname=Vampire -ColorSchemeDefault=Night
pichatd -IniFile=/etc/pichat.ini -PluginsIniFile=/etc/pichat_plugins.ini
First example starts Pichat as dedicated server. The second example starts Pichat with a different nickname and different color scheme. The third example starts a Linux chat server with a specific INI files.
Notes: A key without value will be set to 1 (or yes/on for a boolean value). Values containing space have to be quoted like this: "text with whitespace". Command line arguments will override same settings in the INI file, but will not be saved to disk automatically.

5.1. Pichat INI file

The Pichat INI file holds all your personal settings. It is called 'pichat.ini' and stored in the Pichat directory in your home directory. On Windows you'll find it where your documents and settings are stored, enter %APPDATA% in Windows Explorer. You need to start Pichat at least once to create an INI file, please restart Pichat after you have changed any of these settings.
The INI file is divided into sections, the most important sections: [Pichat] [GUI] [Server] [Server Permissions] [Client] [Contacts]
Here a description of all settings:
[Pichat]General settings:
VersionPichat version which created/updated this file
Nicknamenickname of user (ignored if dedicated server)
NicknameAlternativesalternative nicknames, comma separated text
StartupCommandscommands to execute on application start, comma separated text,
special characters can be escaped with backslash, e.g. '\54'
 
[Pichat Profile]Profile with information for others:
ServerNamechat server name, none to use your nickname
ServerVersionchat server version, none for current version
ServerAddresspublic address of your chat server, leave empty or use a real hostname like 'pichat.no-ip.org'
Identificationunique identification, none to disable
Interestskeywords with interests, comma separated text
ServerDedicatedstart as dedicated server? boolean value
 
[Updates]Automatic software updates:
EnableUpdatesenable software updates by user? boolean value
CheckForUpdatesregularly check for updates? boolean value
DownloadUpdatesdownload updates? boolean value
UpdatesDownloadDirectorydirectory for storing updates
UpdatesRepositoryXURL of updates repository
(X = ascending number starting from 1)
 
[Plugins]Plugins with additional features:
EnablePluginsenable plugins and load them on application start? boolean value
PluginsIniFilefile with plugin settings
 
[GUI]Graphical user interface:
AnimateSystrayanimate systray on traffic? boolean value
AnimateWindowTitleanimate title bar on message? boolean value
ShowStartupMessageshow newbie greeting once at startup? boolean value
ShowSendButtonshow send button next to input? boolean value
ShowSideBarshow side bar next to output? boolean value
ShowSmileyBarshow smiley bar under input? boolean output
ShowAwayTimeshow away time? boolean value
InputLinesnumber of input lines (1-4)
ChatroomTopicshow topic when joining chatrooms? boolean value
ChatroomUsersshow users when joining chatrooms? boolean value
ChatAdminCommandsshow commands from other chat admins? boolean value
only for chat admins
ChatServerUsersshow users entering/leaving the chat? boolean value
only for chat admin
PingPreciseshow ping and lag precise (1/10s)? boolean value
AutoAwayenable auto away? boolean value
AutoAwayLevelauto away will when be reseted (level 0-3)
0 = manual unaway only
1 = automatic unaway on public text
2 = automatic unaway on public text or command
3 = automatic unaway on (") or clicking chat window
AutoAwayAfteridle time to mark user away (seconds)
AutoAwayMessageauto away message
StdAwayMessagenormal away message
DndAwayMessageaway message for DND (Do Not Disturb)
DomkoTextFilterenable text filter in chat output? boolean value
NachoTimeStampshow time stamp in chat output? boolean value
NachoTimeStampHourshours format of time stamp, 12 or 24
NachoTimeStampPreciseprecise time stamp with seconds? boolean value
NicknameLevelnickname display (level 0-2)
0 = no colors
1 = colored nickname
2 = colored nickname with custom separator
NicknameSeparatorL2nickname separator (used in level 2 only)
Highlightenable highlighted text lines? boolean value
HighlightTexthighlight this text, comma separated text
HighlightMyNicknamehighlight if current nickname in text? boolean value
HighlightChatroomLevelhow to highlight chat text (level 0-5)
0 = do nothing
1 = bold text
2 = blink if not active chat window
3 = blink (") and bold text
4 = blink always
5 = blink (") and bold text
HighlightMessageLevelhow to highlight private messages (level 0-5), same levels as for chat text
HighlightBlinkTimeblinking time for chat windows and systray (seconds)
TabsCloseButtonshow tabs with close button? boolean value
TabsWhenChatWindowNumbershow tabs when this number of chat windows exist
InputBufferinput lines, input history
OutputBufferoutput lines in chat window
ClearInputAndOutputclear input together with output? boolean value
ClientChatLogginglog chat conversations? boolean value
ServerAuthenticationremember user names and passwords? boolean value
ServerAuthenticationFilefile with user names and passwords, user logins
MainWindowTitleshow this text in title bar and systray
MainWindowStickymain window always on top? boolean value
MainWindowCloseButtonMinimiseclose button minimises main window? boolean value
MainWindowEscKeyMinimiseEsc key minimises main window? boolean value
MainWindowAnimateMinimisealways animate window when minimise? boolean value
MainWindowShareInputshare same input in main window? boolean value
MainWindowNavigationViewmain window with navigation bar? boolean value
MainWindowStatusViewmain window with status bar? boolean value
MainWindowContactsViewmain window with contacts? boolean value
MainWindowOptionsmain window offers chat options? boolean value
MainWindowPosposition and size of main window
MainWindowSeparatorPosposition of separator in main window
 
[GUI Address Bar]Graphical user interface, address bar:
ContactGroupAddressesname of contact group, available addresses will be added to the address bar
HistoryMaxmaximum number of history entries, 0 for none
HistoryXserver address in history
(X = ascending number starting from 1)
 
[GUI Aliases]Graphical user interface, aliases:
AliasXalias and commands, comma separated text,
'$' in text will be replaced with arguments,
special characters can be escaped with backslash, e.g. '\54' or '\44'
(X = ascending number starting from 1)
 
[GUI Side Bar]Graphical user interface, side bar:
SideBarLevelshow chatrooms and users in side bar (level 0-2)
0 = show user list only
1 = show user list top, chatrooms below
2 = show chatrooms top, user list below
MenuXmenu text with type and commands, comma separated text,
menu text '----' stands for a separator, '$' in text will be replaced with name,
special characters can be escaped with backslash, e.g. '\54' or '\44'
0 = no specific type, always possible
1 = chatrooms heading
2 = chatrooms
3 = user list heading
4 = user list
(X = ascending number starting from 1)
 
[GUI Smiley Bar]Graphical user interface, smiley bar:
ButtonXgraphic name with optional tooltip and commands, comma separated text,
graphic name '----' stands for a separator between buttons,
special characters can be escaped with backslash, e.g. '\54'
(X = ascending number starting from 1)
 
[GUI Sounds]Graphical user interface, sound effects:
EnableSoundEffectsenable sound effects? boolean value
SoundEffectXchat action with condition and sound file, comma separated text,
find a list of chat actions in section 6
(X = ascending number starting from 1)
 
[Server]Chat server settings:
PortChatlistening port of chat server (TCP/UDP), set to 0 to disable all server services
PortHttplistening port of web server (TCP), set to 0 to disable web server and webchat
ServerHttpRootweb server root directory, all web server locations are inside this directory
ServerHttpLocationChatweb server location for webchat
ServerHttpLocationMediaweb server location for graphics and sounds
ServerHttpLocationStatusweb server location for status page
ServerHttpLocationProtectedweb server location for password protected files,
files and subdirectories for registered users
ServerHttpMimeFileweb server MIME types file, none for built-in file
ServerAnnounceLocalNetworkannounce chat server in local network? boolean value
ServerDefaultHomepageweb server with a default homepage? boolean value
ServerDirectoryBrowsingweb server shows directory contents? boolean value
ServerHourStatuslog chat status every full hour? boolean value
ServerDebugModelog debug information? boolean value
MaxUsersmaximum number of users in chat (overall)
MaxUsersTextchatmaximum number of text chat users
MaxUsersWebchatmaximum number of webchat users
MaxUsersPichatmaximum number of Pichat users
MaxSocketsmaximum number of incoming sockets per server
HandshakeWaitDnstime to wait for DNS resolution (seconds)
HandshakeTimeoutWelcometime until welcome message is shown (seconds)
HandshakeTimeouttime for handshake phase (seconds)
DisconnectTimeouttime for disconnect phase (seconds)
DataTransferTimeouttime to allow inactive data transfer (seconds)
DataTransferKeepAlivetime to wait for next data request (seconds)
DataTransferPersistentMaxmaximum number of data requests on same connection
DataTransferBufferSizesend buffer size for data transfer (bytes)
DataCompressionFileSizeMinminimum file size for on the fly compression (bytes)
DataCompressionFileSizeMaxmaximum file size for compression (bytes), set to 0 to disable on the fly file compression
DataCompressionFilesExcludefiles to exclude from on the fly file compression, comma separated file extensions
WebchatBrowserDynamicweb browsers, comma separated list of user agents
WebchatBrowserSimpleweb browsers with limited functionality in webchat
WebchatBrowserUnsupportedweb browsers not working in webchat, read more about browser types in section 3.2
WebchatSessionIpNetmaskallowed variation in session IP addresses (0-32), highest value to be most strict
WebchatStreamPaddingSizeinitial padding for streaming chat output (bytes),
required for stubborn web browsers and proxies
WebchatStreamForceIntervallintervall for extra stream updates (seconds),
activated only when requested in webchat session
WebchatPageRefreshIntervallintervall for page refreshs (seconds),
used for occasional updates of non-streaming chat output
WebchatScreenSizeBrowserSimplenumber of text lines shown in simple chat output, used for simple web browsers
WebchatTextBreakLengthmaximum length of long text before breaking apart
WebchatLinkBreakLengthmaximum length of hyperlink text before shortening
WebPageHeaderheader for server generated web pages
WebPageFooterfooter for server generated web pages, usually address of the Pichat server software
PingSupportLagDetectionenable lag detection for webchat and text chat? boolean value
PingSupportLagDetectionAboveping time to identify lag (seconds)
PingSupportLagDetectionFallBelowping time to identify end of lag (seconds)
DnsLookupEntriessize of DNS lookup buffer
DnsLookupThreadsmaximum number of DNS worker threads
DnsLookupTimeouttime for DNS resolution (seconds)
FilterIpNetmaskChatfiltered IP address display and logging in chat (0-32), set to 32 for no filter,
the use of a filter shortens displayed hostname to domain name
FilterIpNetmaskHttpfiltered IP address logging in web server (0-32), set to 32 for no filter
FollowXForwardedForIP address of SSL accelerator or reverse HTTP proxy for incoming traffic
AlwaysXForwardedSecureIP address of proxy that forwards only HTTPS connections, e.g. Stunnel
AnnounceNetworksbroadcast addresses for announces in local network, comma separated text
AnnounceIntervallintervall for announces in local network (seconds)
ConnectionTestIntervallintervall for connection tests (seconds)
ChatroomListUpdateIntervallintervall for chatroom list updates (seconds),
set to 0 for immediate update, not recommended
UserNumberUpdateIntervallintervall for server user number updates (seconds),
set to 0 for immediate update, not recommended
AwayUpdateIntervallintervall for away status updates (seconds),
set to 0 for immediate update, not recommended
AutoAwayTextchatLevelauto away will when be reseted (level 0-2)
0 = manual unaway only
1 = automatic unaway on public text
2 = automatic unaway on public text or command
AutoAwayTextchatAfterIdleidle time to mark text chat user away (seconds)
AutoQuitTextchatAfterIdleidle time to log out text chat user (seconds)
AutoAwayWebchatLevelauto away will when be reseted (level 0-2), see above
AutoAwayWebchatAfterIdleidle time to mark webchat user away (seconds)
AutoQuitWebchatAfterIdleidle time to log out webchat user (seconds)
AwayForceAfterIdleidle time until away status is forced (seconds),
setting any idle time to 0 disables a feature
 
[Server Permissions]Chat server, access permissions:
ChatModeDefaultdefault chat server mode when starting the chat
CHAT_OPEN = any user can enter the chat
CHAT_MEMBERS = only registered users can enter
CHAT_CLOSED = no new users can enter the chat
UserTypeDefaultdefault type for users entering the chat
USER_ZOMBIE = user with many restrictions
USER_VISITOR = user with some restrictions
USER_NORMAL = user without restrictions
VisitorRestrictionLevelrestrictions for visitors (level 0-3)
0 = allowed to talk with anyone
1 = can not send private messages to other visitors
2 = can not talk with other visitors
3 = can not talk with other users
VisitorRestrictionChatroomvistors can not change chatrooms? boolean value
VisitorRestrictionNicknamevistors can not change nickname? boolean value
SafeguardLoginFailedMaxmaximum number of failed login attempts per user name
SafeguardExpireTimeexpire time of safeguards (seconds)
UserInformationExpireTimeexpire time of old user information (seconds), set to 0 for not storing user information
ChatroomInformationExpireTimeexpire time of old chatroom information (seconds), set to 0 for not storing chatroom information
ZombieQuitTimedefault time zombies are allowed to stay (seconds)
VisitorQuitTimedefault time visitors are allowed to stay (seconds)
NormalQuitTimedefault time users are allowed to stay (seconds)
ClosedQuitTimedefault quit time after chat was closed (seconds),
setting any quit time to 0 means unlimited time
ChatBanTimedefault time to be banned from the whole chat (seconds)
ChatroomBanTimedefault time to be banned from a chatroom (seconds),
setting any ban time to 0 means unlimited ban
ChatroomAdminCanCreatechat admins can create new chatrooms? boolean value
ChatroomUserCanCreateusers can create new chatrooms? boolean value
ChatroomEnterInAnyusers can enter chat in any chatroom? boolean value
ChatroomDefaultname of default chatroom, the chat server entrance
ChatroomBannedname of chatroom for banned users
 
[Server Chatrooms]Chat server, permanent chatrooms:
ChatroomXchatroom name with type and topic, comma separated text,
conference chatrooms need a type together with a code in the format 'conference !code1234'
(X = ascending number starting from 1)
 
[Server MOTD]Chat server, message of the day:
MessageXtext line shown when users enter the chat, to target only a specific language use a text
beginning with a language abbreviation and colon, e.g. 'de:' or 'en:'
(X = ascending number starting from 1)
 
[Server Actions]Chat server, chat actions:
ExternalProgramexternal program or script
ChatActionXchat action with condition and command argument, comma separated,
find a list of chat actions in section 6
(X = ascending number starting from 1)
 
[Client]Chat client settings:
DefaultPortdefault port when connecting a chat server (TCP)
ChatroomStartname of chatroom when entering a chat server, none for chat server entrance
WelcomeMotdMaxmaximum MOTD lines shown with welcome message
LagDetectionenable lag detection? boolean value
LagDetectionAboveping time to identify lag (seconds)
LagDetectionFallBelowping time to identify end of lag (seconds)
DnsPendingNotifiesMaxmaximum number of pending DNS lookups
DnsHostnameFlushAgemaximum age of buffered hostnames (seconds)
ConnectTimeouttime to connect to server (seconds)
ConnectHandshakeTimeouttime to log-in on server (seconds)
ConnectRetryDelaydelay between automatic reconnects (seconds), comma separated text
ConnectRetryLocalNetworkmaximum number of reconnects when a local network connection was restored,
set to 0 to disable
GhostSessionResurrectionregain session after disconnect? boolean value
PongAnswerTimeouttime to store last user pinged you (seconds)
KeepAliveIntervallintervall of sending keep alive (seconds)
DisabledCommandscommands which are filtered out, comma separated text
 
[Client Proxy]Chat client, proxy settings:
UseProxyuse local HTTP proxy? boolean value
ProxyAddressaddress of proxy
ProxyPortport of proxy (TCP)
ProxyResolveDnsproxy has to resolve hostnames? boolean value
ProxyBypassLocalNetworkbypass proxy for local addresses? boolean value
ProxyBypassHostsbypass proxy for some hosts, comma separated text
 
[Contacts]Contacts settings:
ContactGroupXgroup name and contact file, comma separated text,
find a description of contact files in section 5.2
(X = ascending number starting from 1)
 
[Color Schemes]Color scheme settings:
ColorSchemeDefaultname of default color scheme
ColorSchemeGuiFontdefault font for user interface, name and point size
ColorSchemePackXfile with additional color schemes, wildcards '*' and '?' are possible,
find a description of file format in section 5.3
(X = ascending number starting from 1)
 
[Graphics]Graphics settings:
GraphicsAndSmileysLevelshow graphics and smileys (level 0-6)
0 = no graphics or smileys
1 = show smileys
2 = also taunts
3 = also symbols
4 = also flirt (hearts, kisses, flowers)
5 = also fun (coffee, alcohol, pizza)
6 = also misc, show all graphics
GraphicPackXfile with additional graphics and smileys, wildcards '*' and '?' are possible,
find a description of file format in section 5.4
(X = ascending number starting from 1)
 
[Languages]Language settings:
LanguageGuiDefaultname of default user interface language
LanguagesPreferredlanguages preferred, comma separated list of names
LanguagePackXfile with additional languages, wildcards '*' and '?' are possible,
find a description of file format in section 5.5
(X = ascending number starting from 1)
 
[Logfiles]Logfiles settings:
LogfilesSizeMaxmaximum file size for logfiles allow to grow (bytes), setting to 0 means unlimited size
LogfilesDirectorydirectory for storing logfiles
ServerChatLogfilechat server logfile, none to disable logging
ServerHttpLogfileweb server logfile, none to disable logging
ClientChatLogfilechat client logfile, %s and %S stand for connected chat server,
any filename may contain time specifiers, see section 7
 
[3D Visualisation]3D window settings:
Widthwidth (pixel)
Heightheight (pixel)
ColorDepthcolor depth, 16 or 32 (bits)
FullScreenrun in full screen mode? boolean value
Notes: Settings are either text or numerical. A 'boolean' value means the value can be 0 (no/off) or 1 (yes/on). To get fresh settings delete the file 'pichat.ini' and restart Pichat. Warning, you will lose your profile and other personal settings! In case the INI file can not be created default settings are used.

5.2. Contact files

Pichat uses multiple contact files to store friends and people you want to stay in contact with. Each file stands for a single contact group. To add a new contact file download and copy it into the Pichat folder in your home directory. Then add the file name to [Contacts] section of the Pichat INI file. Only contact files listed in the Pichat INI file will be loaded.
A contact file may contain multiple sections, each section describes one contact, sections not starting with 'Contact' are ignored.
Syntax:[Contact name]
ServerAddress=address
Description=text
Connect=connect
 
Arguments:
name=name of person or chat server
address=address of chat server including port number
text=text with optional description
connect=connect automatically when online? boolean value
 
Example:[Contact Pichat Europe]
ServerAddress = eu.pichat.net:9009
Description = The default chat server in Europe
Connect = 1
This example defines a contact with a common chat server.
Notes: The first contact (without name) in a file describes the contact group, it contains a 'Description' setting only. All contacts are loaded on application start, duplicates within a group are ignored. If no contacts are found at all the following two contacts are added: 'Pichat Europe' and 'Pichat USA'.

5.3. Color scheme files

Pichat supports multiple color schemes, there are two built-in color schemes: 'Day' and 'Night'. To add new color schemes download and copy color scheme packs into the Pichat folder in your home directory. Only color scheme packs in this directory or listed in the [Color Schemes] section of the Pichat INI file will be loaded.
A color scheme pack may contain multiple sections, each section describes one color scheme, sections not starting with 'ColorScheme' are ignored. A color scheme specifies colors, font and which graphics to use. It is not necessary to specify all settings for a new color scheme, you can also partly overwrite the basic colors (the basic colors look exactly like built-in color scheme 'Day').
Syntax:[ColorScheme name]
Colors=[colorname,R,G,B] [...]
Font=fontname, fontsize, fontsize-alternative
Graphics=graphicsset-normal, graphicsset-selected
 
Arguments:
name=name of color scheme
colorname=name of individual color, see list below
R,G,B=red/green/blue values (0-255 each)
fontname=name of font
fontsize=size of font (point size)
fontsize-alternative=alternative size of font used in webchat (x-small, small, medium, large, x-large)
graphicsset-normal=graphics set for unselected text
1 = bright background
2 = dark background
graphicsset-selected=graphics set for selected text, see above
 
Here is a list of available color names:
 
COLOR_TEXT_BACKnormal background
COLOR_TEXT_NEUTRALnormal window text
COLOR_TEXT_CHATchat text
COLOR_TEXT_CHATOTHERchat text from other users
COLOR_TEXT_NICKNAMEnickname
COLOR_TEXT_NICKNAMEOTHERnickname from other users
COLOR_TEXT_STATUSNEGATIVEnegative status or warning (text color one)
COLOR_TEXT_STATUSPOSITIVEpositive status (text color two)
COLOR_TEXT_STATUSNEUTRALneutral status (text color three)
COLOR_TEXT_STATUSALTalternative status (text color four)
COLOR_TEXT_LINKnormal hyperlink
COLOR_TEXT_LINKACTIVEactive hyperlink
COLOR_TEXT_TIMESTAMPtime stamp
COLOR_TEXT_FILTERfiltered text
COLOR_TEXT_SELECTBACKselected text background
COLOR_TEXT_SELECTTEXTselected text
COLOR_TEXT_INPUTBACKinput background
COLOR_TEXT_INPUTTEXTinput text
COLOR_TEXT_SIDEBACKside bar background
COLOR_TEXT_SIDEHEADINGside bar heading text
COLOR_TEXT_SIDETEXTside bar normal text
COLOR_TEXT_SIDEAWAYside bar away text (user list)
COLOR_TEXT_SIDESELECTBACKselected side bar background
COLOR_TEXT_SIDESELECTTEXTselected side bar text
 
Example:[ColorScheme HelpDesk]
Colors=COLOR_TEXT_CHATOTHER,200,0,0
This example shows text from other users in red. For more color scheme examples please see Pichat downloads.
Notes: The built-in color schemes 'Day' and 'Night' can be freely customised. A color scheme is loaded from first color scheme pack which includes it, duplicates are ignored. All color schemes are loaded on application start, the webchat offers color schemes as alternate style sheets. Not all colors are available in the webchat, there are no colors for selected text (web browser decides them). In a telnet text chat there are no color schemes at all due to technical limitations.

5.4. Graphic files

Pichat supports own graphics, there are over 50 built-in smileys and graphics in the chat. To add new graphics download and copy graphic packs into the Pichat folder in your home directory. Only graphic packs in this directory or listed in the [Graphics] section of the Pichat INI file will be loaded. Please make sure to copy PNG files into your media folder (default is '~/pichat/webserver/chatmedia/'), see [Server] section of the Pichat INI file.
A graphic pack may contain multiple sections, sections not starting with 'Graphics' are ignored. Each section may define any number of chat graphics and also overwrite existing graphics. Graphic files always exist in pairs, this means one file is used for bright color schemes and the other for dark color schemes. The first graphic set is aligned on white background, the second on dark background.
Synatx:[Graphics]
graphicname filename, level, casesensitive, strictparsing, monochrome
 
Arguments:
graphicname=name of graphic, has to start with colon or semicolon
filename=file name of graphic, without graphics set prefix (chat1_ or chat2_)
level=type of graphic (level 0-6)
0 = none
1 = smileys
2 = taunts
3 = symbols
4 = flirt (hearts, kisses, flowers)
5 = fun (coffee, alcohol, pizza)
6 = misc
casesensitive=match graphic name case sensitive? boolean value
strictparsing=match graphic name only if separated by whitespace from preceding text? boolean value
monochrome=graphic uses only one color tone? boolean value
 
Here is a list of built-in application graphics:
 
:pichatsmall:application icon smallchat1_application_pichatsmall.png + chat2_application_pichatsmall.png
:pichatbig:application icon bigchat1_application_pichatbig.png + chat2_application_pichatbig.png
:sysonline:systray, chat onlinechat1_application_sysonline.png + chat2_application_sysonline.png
:sysoffline:systray, chat offlinechat1_application_sysoffline.png + chat2_application_sysoffline.png
:systraffic1:systray, traffic animationchat1_application_systraffic1.png + chat2_application_systraffic1.png
:systraffic2:systray, traffic animationchat1_application_systraffic2.png + chat2_application_systraffic2.png
:systraffic3:systray, traffic animationchat1_application_systraffic3.png + chat2_application_systraffic3.png
:sysmessage1:systray, message animationchat1_application_sysmessage1.png + chat2_application_sysmessage1.png
:sysmessage2:systray, message animationchat1_application_sysmessage2.png + chat2_application_sysmessage2.png
:viewcontact:contact listchat1_application_viewcontact.png + chat2_application_viewcontact.png
:viewnormal:view, normal chat windowchat1_application_viewnormal.png + chat2_application_viewnormal.png
:viewmessage1:view, message animationchat1_application_viewmessage1.png + chat2_application_viewmessage1.png
:viewmessage2:view, message animationchat1_application_viewmessage2.png + chat2_application_viewmessage2.png
:viewalert:view, connection problemschat1_application_viewalert.png + chat2_application_viewalert.png
 
Example:[Graphics]
:logo: graphic_logo.png, 6
This example adds a new graphic to the chat, it's shown when you enter :logo: and uses the two graphic files chat1_graphic_logo.png and chat2_graphic_logo.png from your media folder. For more graphic examples please see Pichat downloads.
Notes: The built-in chat graphics can be freely customised and overwritten. A graphic is defined by the last graphic pack which includes it. All graphics are verified on application start, make sure that you provide two matching graphic files for each chat graphic. Graphic files use the PNG format (Portable Network Graphics), a transparency color or alpha channel is required, maximum dimensions are 640 x 128 pixels.

5.5. Language files

Pichat supports multiple languages, there are three built-in languages: English, German and Swedish. To add new languages download and copy language packs into the Pichat folder in your home directory. Only language packs in this directory or listed in the [Languages] section of the Pichat INI file will be loaded.
A language pack may contain multiple sections, each section contains one language, sections not starting with 'Language' are ignored. Each section has to provide a complete set of text strings, you can not partly overwrite a language. Each language section starts with [Language name], where 'name' stands for the international abbreviation, e.g. 'de', 'en' or 'sv' (ISO639). A language section itself contains text lines only, the first line specifies the charset of the language, followed by two blocks for server and client text strings.
The user interface uses additional language resource files. On Windows they are named 'pichat_languageXXX.dll', where XXX is a three-letter code for the language (e.g. DEU for German, SVE for Swedish). From the available language resources the best matching will be automatically used.
For an English reference file and more languages please see Pichat downloads.
Notes: The built-in languages can be freely customised. A language is loaded from first language pack which includes it, duplicates are ignored. Languages are loaded on demand, which means a language is loaded the first time a client requests it. All language files should follow an informal and free style to match native expressions rather than strictly translating word by word. There is one exception to the rule, network error details shall remain in English.

6. Chat actions

Pichat offers chat actions to notify when something has happened. Chat actions are freely configurable, you can play sound effects or call an external program to perform a task.
Syntax:setting = chataction, condition, text
 
Arguments:
setting=name of INI file setting
actionname=name of chat action, see list below
condition=numerical comparison like <1 or >1 (less or greater than), * matches any value
text=text with file name or command argument
 
Here is a list of available chat actions:
(Actions marked with * are for chat admins only)
 
CHAT_TEXTnormal text
CHAT_PRIVMESSAGEprivate message text
CHAT_NICKCHANGEnickname of chatroom user has changed
CHAT_USERMODECHANGEuser mode of chatroom user has changed
CHAT_AWAYCHANGEaway status of chatroom users has changed
CHAT_TOPICchatroom topic has changed
CHAT_USERNUMBERchatroom user number has changed
CHAT_JOINuser has joined chatroom
CHAT_LEAVEuser has left chatroom
CHAT_PINGping from user
CHAT_PONGpong from user, just 4 fun
CHAT_NETWORKnetwork status has changed
CHAT_SERVER_USERADD*server has one user more
CHAT_SERVER_USERREMOVE*server has one user less
CHAT_SERVER_CHATROOMADD*server has one chatroom more
CHAT_SERVER_CHATROOMREMOVE*server has one chatroom less
CHAT_SERVER_ONLINE*server goes online (own chat server)
CHAT_SERVER_OFFLINE*server goes offline (own chat server)
CHAT_PEER_ONLINE*peer goes online (local network)
CHAT_PEER_OFFLINE*peer goes offline (local network)
 
Examples:[GUI Sounds]
EnableSoundEffects=1
SoundEffect1=CHAT_JOIN, <9, ~/pichat/sound_notify.wav
SoundEffect2=CHAT_PING, =2, ~/pichat/sound_hello.wav
SoundEffect3=CHAT_PING, *, default
SoundEffect4=CHAT_PONG, *, default
 
[Server Actions]
ExternalProgram=/usr/bin/esdplay
ChatAction1=CHAT_SERVER_USERADD, *, /usr/local/share/sound_alert.wav
First example plays a sound when a user enters the chatroom, a special sound for /PING number 2 and then lists the default sound effects. The condition after CHAT_JOIN filters out automatic rejoins. The second example plays a sound on a Linux chat server as soon as a new user enters the chat.
Notes: Two sections in the Pichat INI file make use of chat actions, these are sections [GUI Sounds] and [Server Actions]. Not all chat actions are available in section [Server Actions], only chat server actions can be used here (those beginning with CHAT_SERVER). There are more chat actions for chat plugins, the ones listed here are in any case the most important.

7. Status, statistics and logfiles

Pichat delivers a chat status including users and traffic statistics. You can check the current status with the /STATUS command in the chat. Alternatively, status information are available as web page, RSS feed and written to logfiles.
Examples:To check your chat status as web page go to...
 
http://127.0.0.1/chatstatus
http://myserver/chatstatus
Here's a typical chat server status:
Moak's chat, Welcome to Moak's chat
Chat server on port 9009, web server port 80
Users 4 online, 6 peak, 100 max, 92 served, 38% activity (medium)
Traffic 5MB total, 1MB received, 4MB sent, 22% compression (low)
Uptime 5days 10hrs 53mins
User statistics show the current user occupation of a chat server, plus more information like the highest user number since server was started (peak value). There is also a chat activity of the last hour in percent, higher values mean more users are chatting actively. The chat activity is calculated from users chatting in chatrooms. Not taken into account for this calculation are private messages and users jumping between chatrooms without saying anything.
Traffic statistics list traffic since server was started. The total traffic is calculated as sum of all incoming and outgoing traffic (from chat server and web server). There is also an overall traffic compression ratio, higher values mean better compression. The chat server and the web server use data compression whenever possible to save bandwidth. Traffic can be compressed about 50%, but compression ratio drops with higher web traffic. This is not unusual because web traffic consists of a high proportion of media files (or lots of meta data) which can not be compressed very well.
Logfiles grow over time, you probably want to delete or archive old logfile entries. In the [Logfiles] section of the Pichat INI file you can specify a logfile with a time specifier, the file will then be reopened periodically and logging continues in a new file.
Example:[Logfiles]
ServerChatLogfile=pichat_chatserver_%Y%m.log
ServerHttpLogfile=pichat_webserver_%Y%m.log
ClientChatLogfile=pichat_conversation_%s_%Y%m.log
This example creates monthly changing logfiles. The '%' time specifiers will be expanded according to the strftime function, for a description of time specifiers see strftime documentation (e.g. Linux manual pages). In chat client logfiles %s and %S have a special meaning and stand for the connected chat server. In our example above the chat server logfile would be pichat_chatserver_200010.log in October 2000, then pichat_chatserver_200011.log in November 2000 and so on. Similar is true for other logfiles.
Notes: Logfiles will be reopened max every full hour. On Linux/BSD systems a SIGHUP signal will reopen logfiles instantly.
Pichat is a simple to use peer-to-peer (P2P) chat software. It comes with integrated LAN messenger and webchat. The chat server supports multiple chatrooms, text formatting with smileys and a user-friendly webchat (HTML, CSS, DOM, JavaScript). The webchat works with nearly any web browser, easily integrated into your design, no PHP/Flash/Java required. Software for free information exchange for Linux and Windows.