Pichat chat configuration
Last update 25/May/2010 by Mark Seuffert
Overview:
1. Introduction2. Prerequisites
3.1. Web server
3.2. Webchat
3.3. Webchat templates
3.4. Webchat style sheets
4. Command line arguments
5.1. Pichat INI file
5.2. Contact files
5.3. Color scheme files
5.4. Graphic files
5.5. Language files
6. Chat actions
7. Status, statistics and logfiles
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
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: |
| ||||||||||||||||||||||||||||||||||||||||||||||
| The following keys are supported in the webchat: | |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||
| 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.html | help page |
| chat_login_closed.html | login page when chat is closed |
| chat_login_members.html | login page when chat is for registered users only |
| chat_login_members_error.html | login page after invalid login |
| chat_login_open.html | login page when chat is open for any user |
| chat_login_open_error.html | login page after invalid login |
| chat_logout.html | logout page |
| chat_session_error.html | page for outdated or failed session |
| frame_browser_dynamic.html | frame start for standard web browser |
| frame_browser_simple.html | frame start for simple web browser |
| frame_browser_unsupported.html | frame start for unsupported web browser |
| frame_output.html | frame with streaming chat output |
| location_home.html | default homepage |
| location_media.html | chat media page for graphics and sounds |
| location_status.html | chat status page |
| stylesheet_base.css | the 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)
(Arguments marked with * are available both HTML and URL encoded)
| $chat_alternate_stylesheets | color 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_comment | comment not visible in output, text in brackets | |
| $chat_default_arguments | set defaults, comma separated list in brackets | |
| $chat_forward_arguments | * | received arguments for HTML forms or HTML links |
| §chat_forward_arguments_cdata | received arguments suitable for JavaScript links | |
| $chat_forward_not | don't forward, comma separated list in brackets | |
| $chat_interests | keywords 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_name | chat server name | |
| $chat_server_version | chat server version | |
| $chat_server_welcome | chat server welcome message | |
| $chat_web_page_header | header for web pages | |
| $chat_web_page_footer | footer 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_refresh | text 'refresh' or 'norefresh' for page refreshs | |
| $chat_client_refresh_intervall | intervall for page refreshs (seconds) |
There are even more arguments when using the extended parser:
| $chat_activity | chat activity of last hour (percent) | |
| $chat_activity_level | chat activity level as text (low/medium/high) | |
| $chat_chatroom_number | permanent chatroom number | |
| $chat_chatroom_nameX | * | chatroom name (X = number of permanent chatroom) |
| $chat_chatroom_topicX | chatroom topic (") | |
| $chat_chatroom_user_listX | chatroom users (") | |
| $chat_chatroom_user_numberX | chatroom user number (") | |
| $chat_chatroom_user_whoX | chatroom name and users (") | |
| $chat_chatroom_user_infoX | chatroom name and user number (") | |
| $chat_chatroom_user_status | chatroom names and users, multiple lines | |
| $chat_port_chat | listening port of chat server (TCP/UDP) | |
| $chat_port_http | listening port of web server (TCP) | |
| $chat_server_dedicated | chat is running as dedicated server | |
| $chat_server_mode | chat server mode (open/members/closed) | |
| $chat_server_status | chat server status, multiple lines | |
| $chat_server_status_short | chat server status, short summary | |
| $chat_server_status_ports | chat server status, listening port numbers | |
| $chat_server_status_users | chat server status, user statistics | |
| $chat_server_status_traffic | chat server status, traffic statistics | |
| $chat_server_status_uptime | chat server status, uptime | |
| $chat_server_uptime | time chat server is running (seconds) | |
| $chat_traffic_total | total traffic, chat plus web | |
| $chat_traffic_received | received traffic, chat plus web | |
| $chat_traffic_sent | sent out traffic, chat plus web | |
| $chat_traffic_chat_received | received traffic, chat server | |
| $chat_traffic_chat_sent | sent out traffic, chat server | |
| $chat_traffic_web_received | received traffic, web server and webchat | |
| $chat_traffic_web_sent | sent out traffic, web server and webchat | |
| $chat_traffic_compression | overall compression ratio (percent) | |
| $chat_traffic_compression_level | overall compression as text (low/medium/high) | |
| $chat_user_number | current user number | |
| $chat_user_peak | highest user number since server was started | |
| $chat_user_max | maximum number of users allowed | |
| $chat_user_served | number of users served |
| Syntax: | parser?file=filename[&key=value ...] | |||||||||
| parser-extended?file=filename[&key=value ...] | ||||||||||
| Arguments: |
| |||||||||
| 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: |
| ||||||
| 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: |
| ||||||
| 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: |
| Version | Pichat version which created/updated this file |
| Nickname | nickname of user (ignored if dedicated server) |
| NicknameAlternatives | alternative nicknames, comma separated text |
| StartupCommands | commands 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: |
| ServerName | chat server name, none to use your nickname |
| ServerVersion | chat server version, none for current version |
| ServerAddress | public address of your chat server, leave empty or use a real hostname like 'pichat.no-ip.org' |
| Identification | unique identification, none to disable |
| Interests | keywords with interests, comma separated text |
| ServerDedicated | start as dedicated server? boolean value |
| [Updates] | Automatic software updates: |
| EnableUpdates | enable software updates by user? boolean value |
| CheckForUpdates | regularly check for updates? boolean value |
| DownloadUpdates | download updates? boolean value |
| UpdatesDownloadDirectory | directory for storing updates |
| UpdatesRepositoryX | URL of updates repository |
| (X = ascending number starting from 1) | |
| [Plugins] | Plugins with additional features: |
| EnablePlugins | enable plugins and load them on application start? boolean value |
| PluginsIniFile | file with plugin settings |
| [GUI] | Graphical user interface: |
| AnimateSystray | animate systray on traffic? boolean value |
| AnimateWindowTitle | animate title bar on message? boolean value |
| ShowStartupMessage | show newbie greeting once at startup? boolean value |
| ShowSendButton | show send button next to input? boolean value |
| ShowSideBar | show side bar next to output? boolean value |
| ShowSmileyBar | show smiley bar under input? boolean output |
| ShowAwayTime | show away time? boolean value |
| InputLines | number of input lines (1-4) |
| ChatroomTopic | show topic when joining chatrooms? boolean value |
| ChatroomUsers | show users when joining chatrooms? boolean value |
| ChatAdminCommands | show commands from other chat admins? boolean value |
| only for chat admins | |
| ChatServerUsers | show users entering/leaving the chat? boolean value |
| only for chat admin | |
| PingPrecise | show ping and lag precise (1/10s)? boolean value |
| AutoAway | enable auto away? boolean value |
| AutoAwayLevel | auto 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 | |
| AutoAwayAfter | idle time to mark user away (seconds) |
| AutoAwayMessage | auto away message |
| StdAwayMessage | normal away message |
| DndAwayMessage | away message for DND (Do Not Disturb) |
| DomkoTextFilter | enable text filter in chat output? boolean value |
| NachoTimeStamp | show time stamp in chat output? boolean value |
| NachoTimeStampHours | hours format of time stamp, 12 or 24 |
| NachoTimeStampPrecise | precise time stamp with seconds? boolean value |
| NicknameLevel | nickname display (level 0-2) |
| 0 = no colors | |
| 1 = colored nickname | |
| 2 = colored nickname with custom separator | |
| NicknameSeparatorL2 | nickname separator (used in level 2 only) |
| Highlight | enable highlighted text lines? boolean value |
| HighlightText | highlight this text, comma separated text |
| HighlightMyNickname | highlight if current nickname in text? boolean value |
| HighlightChatroomLevel | how 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 | |
| HighlightMessageLevel | how to highlight private messages (level 0-5), same levels as for chat text |
| HighlightBlinkTime | blinking time for chat windows and systray (seconds) |
| TabsCloseButton | show tabs with close button? boolean value |
| TabsWhenChatWindowNumber | show tabs when this number of chat windows exist |
| InputBuffer | input lines, input history |
| OutputBuffer | output lines in chat window |
| ClearInputAndOutput | clear input together with output? boolean value |
| ClientChatLogging | log chat conversations? boolean value |
| ServerAuthentication | remember user names and passwords? boolean value |
| ServerAuthenticationFile | file with user names and passwords, user logins |
| MainWindowTitle | show this text in title bar and systray |
| MainWindowSticky | main window always on top? boolean value |
| MainWindowCloseButtonMinimise | close button minimises main window? boolean value |
| MainWindowEscKeyMinimise | Esc key minimises main window? boolean value |
| MainWindowAnimateMinimise | always animate window when minimise? boolean value |
| MainWindowShareInput | share same input in main window? boolean value |
| MainWindowNavigationView | main window with navigation bar? boolean value |
| MainWindowStatusView | main window with status bar? boolean value |
| MainWindowContactsView | main window with contacts? boolean value |
| MainWindowOptions | main window offers chat options? boolean value |
| MainWindowPos | position and size of main window |
| MainWindowSeparatorPos | position of separator in main window |
| [GUI Address Bar] | Graphical user interface, address bar: |
| ContactGroupAddresses | name of contact group, available addresses will be added to the address bar |
| HistoryMax | maximum number of history entries, 0 for none |
| HistoryX | server address in history |
| (X = ascending number starting from 1) | |
| [GUI Aliases] | Graphical user interface, aliases: |
| AliasX | alias 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: |
| SideBarLevel | show 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 | |
| MenuX | menu 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: |
| ButtonX | graphic 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: |
| EnableSoundEffects | enable sound effects? boolean value |
| SoundEffectX | chat 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: |
| PortChat | listening port of chat server (TCP/UDP), set to 0 to disable all server services |
| PortHttp | listening port of web server (TCP), set to 0 to disable web server and webchat |
| ServerHttpRoot | web server root directory, all web server locations are inside this directory |
| ServerHttpLocationChat | web server location for webchat |
| ServerHttpLocationMedia | web server location for graphics and sounds |
| ServerHttpLocationStatus | web server location for status page |
| ServerHttpLocationProtected | web server location for password protected files, |
| files and subdirectories for registered users | |
| ServerHttpMimeFile | web server MIME types file, none for built-in file |
| ServerAnnounceLocalNetwork | announce chat server in local network? boolean value |
| ServerDefaultHomepage | web server with a default homepage? boolean value |
| ServerDirectoryBrowsing | web server shows directory contents? boolean value |
| ServerHourStatus | log chat status every full hour? boolean value |
| ServerDebugMode | log debug information? boolean value |
| MaxUsers | maximum number of users in chat (overall) |
| MaxUsersTextchat | maximum number of text chat users |
| MaxUsersWebchat | maximum number of webchat users |
| MaxUsersPichat | maximum number of Pichat users |
| MaxSockets | maximum number of incoming sockets per server |
| HandshakeWaitDns | time to wait for DNS resolution (seconds) |
| HandshakeTimeoutWelcome | time until welcome message is shown (seconds) |
| HandshakeTimeout | time for handshake phase (seconds) |
| DisconnectTimeout | time for disconnect phase (seconds) |
| DataTransferTimeout | time to allow inactive data transfer (seconds) |
| DataTransferKeepAlive | time to wait for next data request (seconds) |
| DataTransferPersistentMax | maximum number of data requests on same connection |
| DataTransferBufferSize | send buffer size for data transfer (bytes) |
| DataCompressionFileSizeMin | minimum file size for on the fly compression (bytes) |
| DataCompressionFileSizeMax | maximum file size for compression (bytes), set to 0 to disable on the fly file compression |
| DataCompressionFilesExclude | files to exclude from on the fly file compression, comma separated file extensions |
| WebchatBrowserDynamic | web browsers, comma separated list of user agents |
| WebchatBrowserSimple | web browsers with limited functionality in webchat |
| WebchatBrowserUnsupported | web browsers not working in webchat, read more about browser types in section 3.2 |
| WebchatSessionIpNetmask | allowed variation in session IP addresses (0-32), highest value to be most strict |
| WebchatStreamPaddingSize | initial padding for streaming chat output (bytes), |
| required for stubborn web browsers and proxies | |
| WebchatStreamForceIntervall | intervall for extra stream updates (seconds), |
| activated only when requested in webchat session | |
| WebchatPageRefreshIntervall | intervall for page refreshs (seconds), |
| used for occasional updates of non-streaming chat output | |
| WebchatScreenSizeBrowserSimple | number of text lines shown in simple chat output, used for simple web browsers |
| WebchatTextBreakLength | maximum length of long text before breaking apart |
| WebchatLinkBreakLength | maximum length of hyperlink text before shortening |
| WebPageHeader | header for server generated web pages |
| WebPageFooter | footer for server generated web pages, usually address of the Pichat server software |
| PingSupportLagDetection | enable lag detection for webchat and text chat? boolean value |
| PingSupportLagDetectionAbove | ping time to identify lag (seconds) |
| PingSupportLagDetectionFallBelow | ping time to identify end of lag (seconds) |
| DnsLookupEntries | size of DNS lookup buffer |
| DnsLookupThreads | maximum number of DNS worker threads |
| DnsLookupTimeout | time for DNS resolution (seconds) |
| FilterIpNetmaskChat | filtered 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 | |
| FilterIpNetmaskHttp | filtered IP address logging in web server (0-32), set to 32 for no filter |
| FollowXForwardedFor | IP address of SSL accelerator or reverse HTTP proxy for incoming traffic |
| AlwaysXForwardedSecure | IP address of proxy that forwards only HTTPS connections, e.g. Stunnel |
| AnnounceNetworks | broadcast addresses for announces in local network, comma separated text |
| AnnounceIntervall | intervall for announces in local network (seconds) |
| ConnectionTestIntervall | intervall for connection tests (seconds) |
| ChatroomListUpdateIntervall | intervall for chatroom list updates (seconds), |
| set to 0 for immediate update, not recommended | |
| UserNumberUpdateIntervall | intervall for server user number updates (seconds), |
| set to 0 for immediate update, not recommended | |
| AwayUpdateIntervall | intervall for away status updates (seconds), |
| set to 0 for immediate update, not recommended | |
| AutoAwayTextchatLevel | auto 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 | |
| AutoAwayTextchatAfterIdle | idle time to mark text chat user away (seconds) |
| AutoQuitTextchatAfterIdle | idle time to log out text chat user (seconds) |
| AutoAwayWebchatLevel | auto away will when be reseted (level 0-2), see above |
| AutoAwayWebchatAfterIdle | idle time to mark webchat user away (seconds) |
| AutoQuitWebchatAfterIdle | idle time to log out webchat user (seconds) |
| AwayForceAfterIdle | idle time until away status is forced (seconds), |
| setting any idle time to 0 disables a feature | |
| [Server Permissions] | Chat server, access permissions: |
| ChatModeDefault | default 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 | |
| UserTypeDefault | default type for users entering the chat |
| USER_ZOMBIE = user with many restrictions | |
| USER_VISITOR = user with some restrictions | |
| USER_NORMAL = user without restrictions | |
| VisitorRestrictionLevel | restrictions 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 | |
| VisitorRestrictionChatroom | vistors can not change chatrooms? boolean value |
| VisitorRestrictionNickname | vistors can not change nickname? boolean value |
| SafeguardLoginFailedMax | maximum number of failed login attempts per user name |
| SafeguardExpireTime | expire time of safeguards (seconds) |
| UserInformationExpireTime | expire time of old user information (seconds), set to 0 for not storing user information |
| ChatroomInformationExpireTime | expire time of old chatroom information (seconds), set to 0 for not storing chatroom information |
| ZombieQuitTime | default time zombies are allowed to stay (seconds) |
| VisitorQuitTime | default time visitors are allowed to stay (seconds) |
| NormalQuitTime | default time users are allowed to stay (seconds) |
| ClosedQuitTime | default quit time after chat was closed (seconds), |
| setting any quit time to 0 means unlimited time | |
| ChatBanTime | default time to be banned from the whole chat (seconds) |
| ChatroomBanTime | default time to be banned from a chatroom (seconds), |
| setting any ban time to 0 means unlimited ban | |
| ChatroomAdminCanCreate | chat admins can create new chatrooms? boolean value |
| ChatroomUserCanCreate | users can create new chatrooms? boolean value |
| ChatroomEnterInAny | users can enter chat in any chatroom? boolean value |
| ChatroomDefault | name of default chatroom, the chat server entrance |
| ChatroomBanned | name of chatroom for banned users |
| [Server Chatrooms] | Chat server, permanent chatrooms: |
| ChatroomX | chatroom 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: |
| MessageX | text 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: |
| ExternalProgram | external program or script |
| ChatActionX | chat 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: |
| DefaultPort | default port when connecting a chat server (TCP) |
| ChatroomStart | name of chatroom when entering a chat server, none for chat server entrance |
| WelcomeMotdMax | maximum MOTD lines shown with welcome message |
| LagDetection | enable lag detection? boolean value |
| LagDetectionAbove | ping time to identify lag (seconds) |
| LagDetectionFallBelow | ping time to identify end of lag (seconds) |
| DnsPendingNotifiesMax | maximum number of pending DNS lookups |
| DnsHostnameFlushAge | maximum age of buffered hostnames (seconds) |
| ConnectTimeout | time to connect to server (seconds) |
| ConnectHandshakeTimeout | time to log-in on server (seconds) |
| ConnectRetryDelay | delay between automatic reconnects (seconds), comma separated text |
| ConnectRetryLocalNetwork | maximum number of reconnects when a local network connection was restored, |
| set to 0 to disable | |
| GhostSessionResurrection | regain session after disconnect? boolean value |
| PongAnswerTimeout | time to store last user pinged you (seconds) |
| KeepAliveIntervall | intervall of sending keep alive (seconds) |
| DisabledCommands | commands which are filtered out, comma separated text |
| [Client Proxy] | Chat client, proxy settings: |
| UseProxy | use local HTTP proxy? boolean value |
| ProxyAddress | address of proxy |
| ProxyPort | port of proxy (TCP) |
| ProxyResolveDns | proxy has to resolve hostnames? boolean value |
| ProxyBypassLocalNetwork | bypass proxy for local addresses? boolean value |
| ProxyBypassHosts | bypass proxy for some hosts, comma separated text |
| [Contacts] | Contacts settings: |
| ContactGroupX | group 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: |
| ColorSchemeDefault | name of default color scheme |
| ColorSchemeGuiFont | default font for user interface, name and point size |
| ColorSchemePackX | file 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: |
| GraphicsAndSmileysLevel | show 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 | |
| GraphicPackX | file 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: |
| LanguageGuiDefault | name of default user interface language |
| LanguagesPreferred | languages preferred, comma separated list of names |
| LanguagePackX | file 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: |
| LogfilesSizeMax | maximum file size for logfiles allow to grow (bytes), setting to 0 means unlimited size |
| LogfilesDirectory | directory for storing logfiles |
| ServerChatLogfile | chat server logfile, none to disable logging |
| ServerHttpLogfile | web server logfile, none to disable logging |
| ClientChatLogfile | chat client logfile, %s and %S stand for connected chat server, |
| any filename may contain time specifiers, see section 7 | |
| [3D Visualisation] | 3D window settings: |
| Width | width (pixel) |
| Height | height (pixel) |
| ColorDepth | color depth, 16 or 32 (bits) |
| FullScreen | run 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] | ||||||||||||
| |||||||||||||
| Arguments: |
| ||||||||||||
| 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] | ||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
| Arguments: |
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Here is a list of available color names: | |||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
| 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: |
| ||||||||||||||||||||||||||||||||||||||||||
| Here is a list of built-in application graphics: | |||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||
| 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: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Here is a list of available chat actions: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (Actions marked with * are for chat admins only) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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
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.


