js code:
function OnGetScriptCommands()
{
var bEnabled = (Messenger.MyStatus > STATUS_INVISIBLE);
var oCommand = new Commands();
with(oCommand) {
if ( bEnabled === true ) {
AddCommand('dispc', 'Displays online contacts in the current chat.');
return ExportCommands();
}
}
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Message.toLowerCase() == "/dispc")
{
var Contacts = Messenger.MyContacts;
var e = new Enumerator(Contacts);
for(; !e.atEnd(); e.moveNext())
{
var Contact = e.item();
var status = Contact.Status;
switch(status)
{
case 1:
status = "Offline";
break;
case 3:
status = "Online";
break;
case 4:
status = "Busy";
break;
case 5:
status = "BRB";
break;
case 6:
status = "Idle";
break;
case 7:
status = "Away";
break;
case 8:
status = "In A Call";
break;
case 9:
status = "Eating";
break;
}
if(status == "Online")
{
ChatWnd.SendMessage("[N]" + Contact.Name + " is " + status + "[/N]");
}
}
}
}
Also your class file is there too, copied and pasted in another file.