aMSN Forums
April 18, 2014, 10:38:50 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [suggestion] keep alive pluggin  (Read 12412 times)
Elias
Super Power User
**
Offline Offline

Posts: 184


View Profile WWW
« on: April 27, 2006, 10:25:05 am »

Hi,

i write here to suggest the creation of a keep alive pluggin that would send every 50 to 55 seconds a writing notification in order to avoid the "conversation with xxx has been closed due to inactivity" and so know if the contact closes his windows.

I know it goes against the protocol (i guess they closes connections to avoid server overload) but i have a little disapointed when i saw that they putted this 1 minute "timeout" in place.

good / bad idea?

i might be able to start working on it, if no one else who already know how to do it don't have the time, in a few weeks.
Logged

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: April 27, 2006, 01:48:56 pm »

I don't know why you think it's necessary because it is simply not useful, joining/leaving conversations should be transparent to the user... also, recently, I just deleted all contacts that use a client with a similar feature, it just bothers me to know the SB is always open...
Logged

KaKaRoTo
Elias
Super Power User
**
Offline Offline

Posts: 184


View Profile WWW
« Reply #2 on: April 27, 2006, 02:54:22 pm »

i associate it with the conversation's end so if someone close the windows, i consider the conversation as terminated and move to something else... its just how i see it Smiley
Logged

snipe2004
Super Power User
**
Offline Offline

Posts: 827


View Profile
« Reply #3 on: April 27, 2006, 03:27:38 pm »

No, I think it's a good idea, for one simple reason: some times ago, I was receiving a file from someone, but I stopped talking to him for a while, waiting for the transfer to end. But when I come back 10 minutes later to the chat window, the transfert had been stopped because I left the conversation.
It was a big file so I was a bit angry... And this is a good solution for my problem Cheesy
Logged

Voyager 11.10
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #4 on: April 27, 2006, 11:32:15 pm »

Elias.. yeah, good point.. then it needs to be different from kopete's functionality because it just keeps an SB open (even if it was used only for retreiving a display picture, so it makes a lot of SBs opened for nothing...)
and snipe2004.. no, it can't happen because if you're connected directly to download the file, then it doesn't care at all about the SB being opened or closed (you can test it if you want), and if it wasn't direct connect, and it was using the SB.. then the file transfer messages are acting themselves as keep alives Tongue
so it was probably canceled because of something else...
Logged

KaKaRoTo
Elias
Super Power User
**
Offline Offline

Posts: 184


View Profile WWW
« Reply #5 on: April 28, 2006, 09:26:02 am »

snipe2004 > maybe the dude on their other side closed his windows...

kakaroto > it as to be a little more clever than on kopete otherwise it can be very boring. The plugin should only try to keep alive already openned conversations (by that i mean effective conversation, not a simple picture retreival). It has to create a 50 sec timer after the last event of the conversation and if nothing happenned during this event and the end of the timer, send a writing notification and then start another 50 sec timer and so on... until one of the two user eventually close the windows for real.
But i don't know much about tcl, wouldn't that be two heavy for amsn to set up a new timer every time something happen? And i don't really sees how could we abort a timer ?
(like, the last event is sent at t=0, the timer starts, but another event occurs at t=30 so the timer have to be set again to end at t=80 and no more t=50... an event being every thing that prevent the conversation from ending : message, writting notification, ...)
Logged

woekele
Power user
*
Offline Offline

Posts: 56


View Profile
« Reply #6 on: April 28, 2006, 10:16:45 am »

This sounds cool. I love to know when my chatpartner closes the window. Really gives some insight into some people's real personality. Not being able to see if someone closes it after a minute is annoying.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #7 on: April 28, 2006, 08:36:38 pm »

ok, I'd say that I like the feature, and I'll keep it...
but as Elias said, it must be intelligent code...
we already have for an SB a variable 'last_activity_time', so if it's set to 0, we know we never sent/received a message/ft/... so we know that it's secure to close the SB,
I'd say we have a 50sec timer, sends a notification every 50secs.. it should be easy..
btw, Elias, in Tcl it's very easy to set the timer, here's actual code :
Code:
after 50000 "keep_alive_sb $sb_name"


and to stop the timer, you do :
Code:
after cancel "keep_alive_sb $sb_name"

so everytime we get activity, we can do :
Code:
after cancel "keep_alive_sb $sb_name"
after 50000 "keep_alive_sb $sb_name"


have a keep_alive_sb function that checks, if the SB had activity on it (not used just for pic retreival), then send the keep alive message, and increment the number of keep alive messages we sent and reset the timer, if not, don't do anything...
check, if we're sending keep alives for 30minutes, then cancel the timer, maybe 1 hour.. but I don't want it to be forever, I usually keep my windows open, which sometimes annoyes me when searching for some specific date in the logs, I realized the logs have "started conversation on 1st of january" then "closed conversation on 15th of April"... so, I don't want all my SBs to stay open for days.... I think if you said nothing for 30minutes or 1h, then you know the conversation is inactive...
very simple thing to do, very simple code.. now, who will do it ?

you guys (snipe, elias, woekele) are loyal users (snipe being a power user of 100+ posts) so don't you think it's time to learn some Tcl/Tk and help us out ? nothing huge, just some plugin development for example! easy stuff, wouldn't you like that ?
anyways, if you have any programing skills, trust me, tcl/tk will be easy for you!
Logged

KaKaRoTo
vivia
Administrator
Super Power User
*****
Offline Offline

Posts: 2464


View Profile
« Reply #8 on: April 28, 2006, 11:13:36 pm »

@kakaroto: then you talked about how I motivate people..... i think you're much better than me when you want to Cheesy
Logged
Elias
Super Power User
**
Offline Offline

Posts: 184


View Profile WWW
« Reply #9 on: April 29, 2006, 02:04:19 pm »

Indeed, nice user empowerment, i kinda like that !

i wish it was in perl Sad but i gonna try anyway, may be tonight or later on.
Logged

phrowzen
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #10 on: June 07, 2006, 08:16:23 pm »

hey... any progress to this thread/plugin Smiley ive been watching for quite some time now... pretty interested. im sure others are too. i would love to try myself to build such a plugin, but i really would have no idea where to start Sad i understand the 'logic' of programming, but unfortunately never done anything for anything close to this platform Wink... i used to be a pro mIRC scripter before linux, haha... doesnt count for much. anyways, keep this thread alive, please! or give me a few tips/suggestions of how i might approach starting this myself, i have lots of spare time lately.
Logged
Elias
Super Power User
**
Offline Offline

Posts: 184


View Profile WWW
« Reply #11 on: June 07, 2006, 08:29:58 pm »

Well, I thought about it and i "realized" that it would be more "harmfull" than anything : some plugins needs to know when the SB close (Glog that i'am using a lot for example). If you prevent the SB from closing, then we don't allow plugin to execute their functions.

So before starting coding a such plugin, you/we/i have to think about a smart way not to block the others plugins that rely on SB closing.
Logged

kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #12 on: June 07, 2006, 08:49:36 pm »

Hi,
first, Elias, you're right, but it's not mandatory.. if you enable such a plugin it's because you know you're the kind that will close the chat windows when you stop talking, which means, it even improves glogs since it will send the log by mail only once you finish the discussion, not after every 1 minute of inactivity.. you could always put a disclaimer saying that it might be incompatible with other plugins... who reads those anyways? but who cares, if they don't read it, it's the user's fault, not ours...
@phrowzen : frozen ?? wtf Tongue you're cold man ? :p
anyways, how to start.. well, first, by looking at amsn's code, it gives you an idea on the language, it's a scripting language too, so you should get along with it pretty fast. We all started working on amsn before knowing the language, and we learnt on the fly, so you can do it, all you need is the logic of programming, which you say you have. You should always keep these two URLs in your bookmarks :
http://tcl.tk/man/tcl8.4/TclCmd/contents.htm
http://tcl.tk/man/tcl8.4/TkCmd/contents.htm
Tcl is the language, so they are 'shell' commands (like list/string/array/clock/file manipulations...) and Tk is the toolkit, so it's GUI commands (like creating a button/label/text/image, etc..)

Once you understand a bit the logic of the language and you're ready to do it, look at other plugins, it will help you, then read the plugins' tutorial in http://amsn.sf.net/wiki
Tell me if you need anything...
If you have any programming related question, ask it in the Development forum.
Logged

KaKaRoTo
phrowzen
Newbie

Offline Offline

Posts: 2


View Profile
« Reply #13 on: June 08, 2006, 12:02:04 am »

thats terrific.. thanks for the reply Smiley i will take a peek at it hopefully tonight/tomorrow. hopefully i could start something in a week or two! if i make any progress ill post. thanks again.
Logged
snipe2004
Super Power User
**
Offline Offline

Posts: 827


View Profile
« Reply #14 on: June 08, 2006, 07:44:08 pm »

Well I didn't follow this post, but u're right, I'm going to have a look and try to learn - I finish my exams on tomorrow, it'll be easier.
Any idea on what to do first? I mean, as a plug-in?
Something from TODO?

[EDIT]
Ok, I went on the wiki,  and saw some plug-in to do... they seems a bit complicated for me Cheesy
But what's really frightening, is the list of commands  :shock: I read them all, and understood 1% ....
Don't u know any frenchspeaking link, explaining it for total n00b (I don't know anything about programmation, nor in Windows)
Cause this is english but sounds chinese to me Cheesy  :roll:
Logged

Voyager 11.10
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!