Better message formatting

This commit is contained in:
Neale Pickett 2014-10-29 20:59:35 -06:00
parent 2b881146d7
commit 662c5f9384
2 changed files with 56 additions and 1 deletions

View File

@ -10,5 +10,54 @@
"appDesc": { "appDesc": {
"message": "Chat client for the Spongy bouncer thingamajiggy", "message": "Chat client for the Spongy bouncer thingamajiggy",
"description": "Application description for app store listing" "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."
} }
} }

View File

@ -31,6 +31,12 @@ function networkConnect(network, baseURL, authtok) {
var args = parts.slice(5); var args = parts.slice(5);
var txt = line.substr(lhs.length + 2); var txt = line.substr(lhs.length + 2);
switch (command) {
case "prevlog":
// Just ignore this
return;
}
var room = rooms[forum]; var room = rooms[forum];
if (! room) { if (! room) {
room = makeRoom(forum); room = makeRoom(forum);