js code:
var oChatWnd = {};
function OnEvent_ChatWndCreated( pChatWnd ) {
__add ( pChatWnd );
}
function OnEvent_ChatWndDestroyed( pChatWnd ) {
__remove ( pChatWnd.Handle );
}
function OnEvent_ChatWndSendMessage( pChatWnd, sMessage ) {
__remove( pChatWnd.Handle );
}
function OnEvent_Timer( sTimerId ) {
if ( oChatWnd[ parseInt( sTimerId ) ].iSecondCounter === 120 ) {
>>> oChatWnd[ parseInt( sTimerId ).pChatWnd.SendMessage( 'I am currently away from my computer. This is an auto-disconnect message that occures after 2 minutes of inactivity.' );<<<
__remove( sTimerId );
} else {
oChatWnd[ parseInt( sTimerId ) ].iSecondCounter++;
MsgPlus.AddTimer( sTimerId, 1000 );
}
}
function __add( pChatWnd ) {
if ( pChatWnd.Contacts.Count ) === 1 ) return;
oChatWnd[ pChatWnd.Handle ] = {};
oChatWnd[ pChatWnd.Handle ].pChatWnd = pChatWnd;
oChatWnd[ pChatWnd.Handle ].iSecondCounter = 0;
MsgPlus.AddTimer( pChatWnd.Handle, 1000 );
}
function __remove( pChatWnd ) {
if ( typeof oChatWnd[ parseInt( pChatWnd ) ] === 'undefined' ) return;
>>> var s=''<<<
>>> for ( var e = new Enumerator( oChatWnd[ parseInt( pChatWnd ) ].pChatWnd.Contacts ); !e.atEnd(); e.moveNext() {<<<
>>> s+=e.item().Email+ ( !e.atEnd() ? ', ' : '' );<<<
>>> }<<<
>>><<<
>>> MsgPlus.LogEvent( 'Group chat', 'A group chat session was initiated with '+s+' however was closed after 2 minutes of inactivity.', EVICON_PLUS );<<<
MsgPlus.CancelTimer( pChatWnd );
Interop.Call( 'user32', 'SendMessageW', parseInt( pChatWnd ), 0x10 /* WM_CLOSE */, 0, 0 );
delete oChatWnd[ parseInt( pChatWnd ) ];
}
I dunno something like that... this closes the chat window after 2 mins of not saying anything...