What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Question] Temporary Ban

[Question] Temporary Ban
Author: Message:
MattyRid
Veteran Member
*****

Avatar
Red Bull Racing Australia

Posts: 1321
Reputation: 21
– / Male / Flag
Joined: Jan 2006
Status: Away
O.P. [Question] Temporary Ban
Would it be possible for someone to make a temporary ban script by Blocking someone for a period of time.

E.g. Someone is being annoying, ban them for a set period (24 hours as an example)

Perhaps different time periods could be used for each contact.

1 hour
1 day
1 week
1 month
1 year

Perhaps a text box could be used to enter a number and a list box to choose between hours, days, weeks, years.

So can this be done or not?

This post was edited on 08-19-2006 at 08:09 AM by MattyRid.
Red Bull Racing Australia - Triple Eight Race Engineering - Holden
08-19-2006 08:09 AM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
30 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [Question] Temporary Ban
You can use a Timer for that but whenever you'll close Messenger the timer will end [Image: msn_sad.gif]. But if you use some date and time function(add me @ WLM for more info) to block or unblock a contact, it would be far more easier.
08-19-2006 08:16 AM
Profile E-Mail PM Web Find Quote Report
MattyRid
Veteran Member
*****

Avatar
Red Bull Racing Australia

Posts: 1321
Reputation: 21
– / Male / Flag
Joined: Jan 2006
Status: Away
O.P. RE: [Question] Temporary Ban
I'm not much of a programmer. Hence, why I have asked ;)

But going through a process of elimination, could it be stored somewhere in another file thus making the timer function irrelevant?
Red Bull Racing Australia - Triple Eight Race Engineering - Holden
08-19-2006 08:19 AM
Profile PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Question] Temporary Ban
well i cant be bothered coding it but for anyone who can heres the easiest way i can think of:

1. Get current unix timestamp (Math.round(new Date().getTime() / 1000))
2. Add the specified "block time" to the timestamp
3. Store it somewhere along with the blocked persons email
4. Start a timer with the timestamp to unblock - the current timestamp

You also have to loop through and start all these timers on sign in to make sure they still work after messenger has been ended (and if the time has already passed on sign in, immediately unblock)
08-19-2006 08:22 AM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1622
Reputation: 50
36 / Male / Flag
Joined: Jan 2006
RE: [Question] Temporary Ban
You could do this by getting the JScript to get the time and add the specified amount of time.  You can then put this value in the registry with the name of your contact and get a timer to keep checking this to see if it is past this time.  This script would take a bit but is possible.  One limitation though is it can only be a precise as the timer you set ad the shorter the timer, the more resources you use of your computer.

EDIT: looks like i was beaten to it :(

This post was edited on 08-19-2006 at 08:25 AM by markee.
[Image: markee.png]
08-19-2006 08:24 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On