Oh, allright I see...
This one will only use gradients when there is 1 contact in the conversation else it will gradient based on the specific contact:
code:
var MsgOutput = null;
var Color1 = null;
var Color2 = null;
var sendUnaltered = true;
function Replace_Text(Color1, Color2, Message, MsgOutput)
{
return "[c=" + Color1 + "]" + Message + "[/c=" + Color2 + "]";
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts);
if(Contacts.Count == 1)
{
for(; !e.atEnd(); e.moveNext())
{
var Contact = e.item();
switch(Contact.Email)
{
case "alpha@web2messenger.com":
Color1 = "#000000";
Color2 = "#FFFFFF";
return Replace_Text(Color1, Color2, Message, MsgOutput);
break;
case "beta@web2messenger.com":
Color1 = "#FFFFFF";
Color2 = "#000000";
return Replace_Text(Color1, Color2, Message, MsgOutput);
break;
default:
return Message;
}
}
}
else
{
return Message;
}
}