From 662c5f9384afb2d5e2bf0872452ce6c9320e1df9 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 29 Oct 2014 20:59:35 -0600 Subject: [PATCH] Better message formatting --- app/_locales/en/messages.json | 51 ++++++++++++++++++++++++++++++++++- app/network.js | 6 +++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index dd1c2a7..17e5fa2 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -10,5 +10,54 @@ "appDesc": { "message": "Chat client for the Spongy bouncer thingamajiggy", "description": "Application description for app store listing" + }, + + + "unknownCommand": { + "message": "$COMMAND$ $ARGS$ $TEXT$", + "placeholders": { + "fullSender": { + "content": "$1", + "example": "fritz!~bob@example.net" + }, + "command": { + "content": "$2", + "example": "PRIVMSG" + }, + "sender": { + "content": "$3", + "example": "fritz" + }, + "forum": { + "content": "$4", + "example": "#hottub" + }, + "args": { + "content": "$5", + "example": "+o,fred" + }, + "text": { + "content": "$6", + "example": "Hello everybody" + } + } + }, + + "privmsgCommand": { + "message": "$6" + }, + + "nickCommand": { + "message": "$1 is now known as $3" + }, + + "modeCommand": { + "message": "$3 sets channel mode $5" + }, + + "joinCommand": { + "message": "joins the channel." } -} \ No newline at end of file + + +} diff --git a/app/network.js b/app/network.js index edd2a3f..4c78d3f 100644 --- a/app/network.js +++ b/app/network.js @@ -31,6 +31,12 @@ function networkConnect(network, baseURL, authtok) { var args = parts.slice(5); var txt = line.substr(lhs.length + 2); + switch (command) { + case "prevlog": + // Just ignore this + return; + } + var room = rooms[forum]; if (! room) { room = makeRoom(forum);