User Control Panel
Advertisements

HELP US, HELP YOU!

Status Checker
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> General Programming Questions
View unanswered posts
Author Message
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Mon Apr 11, 2005 1:26 pm    Post subject: Reply with quote

i no there is a way to check to see if a use is online, but i was wondering if there is way for a perl program to check a user name for a status, and if the status is set to away, busy, offline, then do something...

i know how to do the last bit but, i want to know how to check the status and add the result to to a variabul.. can any one help. i dont want you to just give me the code,cos i am trying to move away from ny noobie status, but if you could sergest ways, and give hits, tnks..
Back to top
dinnerbone
Member
Member


Joined: 07 Mar 2004
Posts: 136
Location: UK
Reputation: 54.3

PostPosted: Mon Apr 11, 2005 3:40 pm    Post subject: Reply with quote

you can create a bot that every now and again opens a convo with the user of your choice, grab their status and take it from there. People that have the option "Only people in my allow list can see my status and send me messages" checked will allways appear as offline though, making this method unstable.
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Mon Apr 11, 2005 4:06 pm    Post subject: Reply with quote

well i only need it for one person, i need a program to open when there msn signs off, or they set to Busy..... can i have something outside of bot checking status, or would i have to have a bot built in the always cheks status.. and then takes over when they are offline?
Back to top
dinnerbone
Member
Member


Joined: 07 Mar 2004
Posts: 136
Location: UK
Reputation: 54.3

PostPosted: Mon Apr 11, 2005 5:38 pm    Post subject: Reply with quote

if it is just for one person. you can make a vb plugin for msn that could run in the background, and run a certain program when the user either changes status to a certain one (dont ask me how to do this, i dont know much vb), if the user types a certain message (like in plus) or presses a button (less code)
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Mon Apr 11, 2005 5:53 pm    Post subject: Reply with quote

cool, but i was more after way to ask the msn server for a status or someone? dose anyone know of any?
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Mon Apr 11, 2005 6:34 pm    Post subject: Reply with quote

QUOTE(kings_on_steeds @ Apr 11 2005, 01:53 PM)
cool, but i was more after way to ask the msn server for a status or someone? dose anyone know of any?
[right][snapback]47654[/snapback][/right]


The reason that MSN status indicators aren't full proof is because people can set "Only allow people on my contact list to see my status", so bots (which are used primarily in these status indicators) try and call users to see whether or not they're online. If the user's MSN is saying "You can't contact me, you're not on my list" then the bot will always get a "User is offline" type of message.

And that applies to everything. If a user doesn't allow off-list users to see their status, you can't see if they're online. You also can't see if they're away, busy, idle, etc. they'll always appear offline because they don't allow the status bots to contact them.

So if the one user you're trying to get info from either has the "bot" on their list or allows the bot to see their status, you can do it. But other than that, you'll have the same problem you'd get trying to just do an online/offline indicator.

Also, if you're using this to make an away bot that will take over your name and chat with your buds while you're away.... then just be careful. A lot of us botmasters don't enjoy bots talking to eachother, and I for example will permanently ban people who *used to be* human but are talking to my bots as bots themselves.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
mat007
Almost An Agent
Almost An Agent


Joined: 12 Jan 2004
Posts: 1375

Reputation: 15.8Reputation: 15.8
votes: 2

PostPosted: Mon Apr 11, 2005 9:44 pm    Post subject: Reply with quote

Send this to the server:

CAL
\r\n

Youll recieve 216 or 217 if there offline/blocked you (216 si no longer recieved)

or youll get CAL back if it was succesful in the invite Razz that way you can see if there off/online.
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Mon Apr 11, 2005 9:58 pm    Post subject: Reply with quote

wkd, tnks, but how do i send server messages, i only know how to send client msg's
umm...... Thinks

i'll try and work it out tommorw, and ill scream if i need help, tnks
Back to top
mat007
Almost An Agent
Almost An Agent


Joined: 12 Jan 2004
Posts: 1375

Reputation: 15.8Reputation: 15.8
votes: 2

PostPosted: Mon Apr 11, 2005 10:07 pm    Post subject: Reply with quote

i presume your bot uses msn.pm..

It must be so hard for you to read the docs attached with it.
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Tue Apr 12, 2005 11:17 am    Post subject: Reply with quote

ok, well i have a bit off code, that should retuen there status

Code:
<br />my $info = $self->getContact( 'nutbar2002@hotmail.com' );<br /><br />$self->sendMessage( "Status=.$info->{'Status'}. \n" );<br />


but in my msn window i only get

Quote:
Molms says:
Status..


and i dont realy know why, can any one help?
Back to top
dinnerbone
Member
Member


Joined: 07 Mar 2004
Posts: 136
Location: UK
Reputation: 54.3

PostPosted: Wed Apr 13, 2005 4:31 pm    Post subject: Reply with quote

you cannot stick a hash inside a string.
Wrong:
Code:
print "hello world! My name is $me->{'name'}!";

Right:
Code:
print "hello world! My name is " . $me->{'name'} . "!";

Can you see what is wrong and how to fix your code now?
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Wed Apr 13, 2005 4:47 pm    Post subject: Reply with quote

yer i can, tnks...dinnerbone.

i made the changes

Code:
$self->sendMessage( "Status:" . $info->{'Status'} . "\n");

but i still only get the Status: printed?
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Apr 13, 2005 6:34 pm    Post subject: Reply with quote

For testing purposes, insert this code around that area (just after you get $info):

Code:
foreach my $key (keys %{$info}) {<br />   print "\$info->{$key} = $info->{$key}\n";<br />}


That will print out all the keys and their values in $info, so you'll see what they are. If it prints nothing, then $info isn't being given a value correctly.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
kings_on_steeds
Senior Member
Senior Member


Joined: 05 Apr 2004
Posts: 290
Location: Bookham, Surrey, UK
Reputation: 35.1Reputation: 35.1Reputation: 35.1Reputation: 35.1

PostPosted: Wed Apr 13, 2005 8:48 pm    Post subject: Reply with quote

well i printed nothing, no error. i dont see how $info, can not be given a correct value? i mean isnt that done in one of the .pm's?

Code:
<br />elsif($message =~ /^!get$/i ) {<br />  my $info = $self->getContact( 'nutbar2002@hotmail.com' );<br /><br />  $self->sendMessage( "Status:" . $info->{'Status'} . "\n");<br />  foreach my $key (keys %{$info}) {<br />    print "\$info->{$key} = $info->{$key}\n";<br />}


that is the code secion

i also tryed

Code:
<br />my $info = $self->getContact( 'nutbar2002\@hotmail.com' );


but both did the same, nothing.
Back to top
Cer
Upgraded Agent
Upgraded Agent


Joined: 03 Feb 2004
Posts: 3776
Location: Michigan
Reputation: 146.9
votes: 4

PostPosted: Wed Apr 13, 2005 9:59 pm    Post subject: Reply with quote

Maybe you are not on your bot's contact list (the FL one), and only the AL one.

I remember reading somewhere that the bot can't get a user's status unless they're on its FL list - that's the list you'd see when you sign in to MSN.

So make sure the user you're getting the status for is on that list.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> General Programming Questions All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group