Commit f8d4f8b3 authored by Imran Hussain's avatar Imran Hussain

Better raw handling for not actual raw messages also handle zod's and mrod's

parent 791e2896
......@@ -200,6 +200,8 @@ function handleEvent(event) {
mw.print("DEBUG: END OF MESSAGE");
}
var msgtextorignal = msg.text;
// lets chnage how the time stamp is done
var newTimestamp = processUnixtime(msg.unixtime);
......@@ -234,7 +236,10 @@ function handleEvent(event) {
break;
case "raw":
// raw detetction!
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
// use the orignal text as some other
// messages like topic setting come in
// as raws and our colours mess it up
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msgtextorignal);
break;
case "notsayto":
// handle nosayto
......@@ -252,9 +257,9 @@ function handleEvent(event) {
// handle gsgs
if (mw.message_to == mw.whoami) {
//hide who gagged you
//mw.print(newTimestamp + ": " + msg.text);
mw.print(newTimestamp + ": " + msg.text);
//don't hide who gagged you
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
//mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
} else {
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
}
......@@ -265,6 +270,29 @@ function handleEvent(event) {
// to be geneirc,
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
break;
case "zod":
// handle kicking from the talker
if (mw.message_to == mw.whoami) {
//hide who zod'd you
mw.print(newTimestamp + ": " + msg.text);
//don't hide who zod'd you
//mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
} else {
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
}
break;
case "mrod":
// handle kicking from the board
if (mw.message_to == mw.whoami) {
//hide who mrod'd you
mw.print(newTimestamp + ": " + msg.text);
//don't hide who mrod'd you
//mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
} else {
mw.print(newTimestamp + "[" + msg.from_name + "]" + ": " + msg.text);
}
break;
default:
// leave the message alone if we don't have
// rules for it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment