getContactStatus returns a string or 0 if the given contact can not be found. Alienz had it right, if you want to check for a specific status, you can check for NLN, AWY, etc. If you get the value 0 returned, then that contact does not exist on one of your lists. Here is a better code snippet, but it's still not going to work (see below):
As Cer pointed out, you should not use $1, because it is a special variable in Perl and while it may work, it's a bad idea and it's not very readable either. Also, you were using the send method which is not a method in MSN.pm (for MSN 2.0). I would suggest upgrading to MSN 2.0.
But the bigger problem is that just adding a contact and waiting 1 second (incidentally, using sleeps is very bad as it stops your entire bot) will not put them on your contact list until the person you added allows you to see them, which probably won't happen within 1 second.
matt, I remember we talked about that a while back and I'd started adding it to MSN.pm, but I had some issue and forgot about it. If you can get it to work add it to 2.5.
QUOTE(..::BIGmouth( )::.. @ Jan 25 2005, 06:57 PM)
*cough* you're just trying to start a fight, I was just saying that was a "Dumb" way of "doing it", I didn't say you were dumb soo calm your horses.
Once again, there was nothing dumb about it. I didn't see you offer anything useful either. _________________ Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Actually the CAL command would return 217 if the users was offline normally, and 216 if the user has your bot blocked. But since it was abused massively for block checking, the MSN devs have changed it so it always returns 217.
I think there is no way of checking wether the user has blocked you using only one passport, besides the fact the user is permanently offline (and you'll still have to add the person to your FL if you want to check for that).
Anyhow, there is a simple way of 'block checking' using mirrors, still it will annoy your users:
Make a simple mirror system, where the bot handles a number of passports: its primary ones, that people add to use it and maybe one or two spare ones you can use to add people to the FL, and comparing the results... If some mirrors pick the user up as online, and others do not, you can be sure the user has the others blocked/privacylocked.
Still, i wouldn't recommend it, as this kind if system will spam users with 'add' notifications...
Joined: 19 Jul 2004 Posts: 556 Location: Los Angeles, CA votes: 1
Posted: Wed Jan 26, 2005 9:19 am Post subject:
i still think the cal method is best for a "block checker" because it will check for anyone even in tere not on your list unless the user has blocked your bot, but if you were useing this to se if a person blocked you not your bot it would work, and you dont have to annoy the user, you dont even have to add them _________________ [ matt ]
i still think the cal method is best for a "block checker" because it will check for anyone even in tere not on your list unless the user has blocked your bot, but if you were useing this to se if a person blocked you not your bot it would work, and you dont have to annoy the user, you dont even have to add them
But if they are online, they will be added to the convo...