; Sample server configuration file for Wedgetail. ; Copy this to server.ini and edit for your site. ; --> Sending SIGHUP to the server will reload this file, with some caveats. ; --> See notes below for specifics. [server] ; ---------------------------------------------------------------- ; --> Settings below require a full restart and not just a SIGHUP. ; Port to listen on. ; --> Changing this will disconnect existing clients, since they won't know the ; --> new port number. ;;listenPort = 1337 ; UID and GID to assume if launched as root (on POSIX platforms) ; If these are set the server will bind its listen port (to allow low-numbered ; ports to be used) and read the TLS keys, then drop root privileges. ; --> IMPORTANT: If you use this feature, using SIGHUP to re-read the ; --> configuration file will probably fail -- the server will not have the ; --> permissions needed to recreate the listening port. ;;uid = nobody ;;gid = nobody ; Do we use TLS for the client-to-server connection? ; Default is "1" for enabled. Do NOT set this to "0" in production use, only when ; doing local development. Wedgetail is vulnerable to password sniffing and ; session hijacking without TLS. ; --> Changing this and issuing a SIGHUP will probably disconnect all clients. ;;tlsEnabled = 1 ; Where to put the logfile. This should be a fully-qualified path. ; Default: no logfile, instead log to stdout. ;;logFile = ; Where to put the pid file. If the pid file already exists or its location is ; not writable the server will abort. ; Default is no pid file. ;;pidFile = /var/run/wedgetail/wedgetail.pid ; ---------------------------------------------------------------------------- ; --> Settings below can be changed without disconnecting existing clients, by ; --> sending a SIGHUP to the server. ; TLS certificate and key. No default. ; --> Sending SIGHUP will re-read these files. This is useful for automating ; --> certificate changes (e.g. when using Let's Encrypt) tlsCert = /etc/ssl/certs/server.crt tlsKey = /etc/ssl/private/server.key ; tlsCACert is for CAs that require an intermediate certificate. ;;tlsCACert = /etc/ssl/certs/sub.class1.server.ca.pem ;; How many minutes to wait for a client to reconnect before discarding its ; session. This comes into play any time there is *not* an unload event, ; for example when there's a ping timeout. ; Default is 5 minutes. ;;clientTimeout = 5 ; How many *seconds* to wait after a client indicates a window close, before ; discarding its session and closing the MU* connection. There's a tradeoff ; here between typical user intent (closing the tab usually means they want ; to disconnect) and letting them recover from an accidentally closed tab or ; page reload. ; Default is 20 seconds; 0 means discard the session immediately on ; a page unload event. ;;clientClosedTimeout = 20 [destination] ; MU* server to connect to. remoteHost = localhost remotePort = 5555 remoteDisplayName = Foo [snooping] ; Wedgetail can snoop on the client's login in order to determine the ; user's username. This is logged so you can associate sessions with ; characters. It can also be used in triggers. ; snoopStyle chooses from one of two modes. Which works best will depend ; on your server configuration. ; "player" snoops on the player's command text to detect a connect command. ; It then looks for a second string coming from the server ; to verify a successful login. ; This will tend to work best with MUSH, MUX, and MUCK style servers. ; "server" snoops only the server text. This may work better if you can ; have the server send a "Welcome, %N!" type response, especially ; if your server's login sequence is hard to parse. ; ; Sample configuration for a MUSH-style world: ; snoopCommandRegexp is tested against the player's input text. The first ; capture group is taken as the username, but not accepted as official until ; snoopSuccessRegexp matches.. If snoopCommandRegexp matches multiple times ; before snoopSuccessRegexp matches, only the last match is taken. ;;snoopStyle = player ;;snoopCommandRegexp = ^con?n?e?c?t? (\w+) \w+ ;;snoopSuccessRegexp = ^Last connect was from ; Sample configuration for a world that includes the username in the login ; text: ; In this case we only have snoopSuccessRegexp. The first time it matches, ; the first capture group is taken as the username. ;;snoopStyle = server ;;snoopSuccessRegexp = ^Welcome, (\w+) [debug] ; Verbose debug logging. Should be turned off in production or your logfiles ; will be gigantic. Default is off. ;;sysDebugMode = 0 ; Periodically write memory statistics to the log. Default is off. ;;memDebugMode = 0 [client] ; Maximum amount of scrollback to store between sessions in localStorage ;; maxScrollbackLength=1000 ; Prepackaged triggers for the client. These must be numbered consecutively ; from 1. Fields left out will be set to defaults. ; If username snooping is enabled, the string "%username%" will be ; replaced by the username if known. ; These are reloaded when the server catches SIGHUP, but clients will not ; pick up changes until they reload the page. ; Sample showing all useful keys: ; [trigger1] ; name=Highlight Foo ; enabled = 1 ; pattern = ^Foo <-- Any quote marks must be escaped ; patternType = regexp <-- regexp|wildcard ; caseInsensitive = 1 <-- Is the match case sensitive? Default is 0 (no). ; action = style <-- none|gag|style ; noMore = 0 <-- 1 = stop processing triggers for the rest of the ; line if this one matches ; bold = 1 ; italics = 0 ; underline = 0 ; strikeout = 0 ; color = red <-- any CSS-acceptable color description ; backgroundColor = black ; Another example, for MUSH-style connect/disconnect messages. ;; [trigger1] ;; name = Connect/disconnect ;; enabled = 1 ;; pattern = ^(GAME: )?\w+ has (partially )?(connected|disconnected|reconnected) ;; patternType = regexp ;; action = style ;; color = green ; Highlight lines starting with the player's name. This shows use of the ; %username% substitution. You will usually want to set these as ; case insensitive, because the name captured from the player's login command ; may not have canonical capitalization. ;; [trigger2] ;; name = Pose text ;; enabled = 1 ;; pattern = ^%username% ;; patternType = regexp ;; caseInsensitive = 1 ;; action = style ;; color = red