User Control Panel
Advertisements

HELP US, HELP YOU!

Block Checker
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas
View unanswered posts
Author Message
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 7:36 am    Post subject: Reply with quote

I have been building a block checker command. But it doesn't appear to work.

Here is waht i have so far:

Quote:
if($1) {

$self->addContact($1);

sleep(1);

my $cs = $self->getContactStatus($1);

if($cs) {
&send($self, "$1\'s Status is $cs !", $username);
}

else {

&send($self, "Unsuccessful! Please check e-mail and try again.", $username);
}

sleep(1);

$self->remContact($1);

}


else {

&send($self, "To retreive the users status please type %statcheck email \n\neg. %statcheck email\@hotmail.com", $username);

}



Any idea's?
Back to top
JTW
God Like
God Like


Joined: 07 Mar 2004
Posts: 582
Location: Maidstone
Reputation: 73.3
votes: 4

PostPosted: Tue Jan 25, 2005 7:46 am    Post subject: Reply with quote

Any errors? Template?
_________________
"Help us, Help you" - BotDepot
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 7:49 am    Post subject: Reply with quote

Maya template. no errors, it skips to saying: Unsuccessful! Please check e-mail and try again.", ie $cs is not true
Back to top
alienz
Almost An Agent
Almost An Agent


Joined: 22 Mar 2004
Posts: 1436
Location: Mars
Reputation: 55.7

PostPosted: Tue Jan 25, 2005 8:04 am    Post subject: Reply with quote

This simply means "if $cs exists" or, has a value .

Code:
if($cs) {

_________________
Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 8:06 am    Post subject: Reply with quote

if cs exists then the status has been returned? :huh:
Back to top
alienz
Almost An Agent
Almost An Agent


Joined: 22 Mar 2004
Posts: 1436
Location: Mars
Reputation: 55.7

PostPosted: Tue Jan 25, 2005 8:08 am    Post subject: Reply with quote

It can be better written..what values does $self->getContactStatus($1); get?
_________________
Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 8:11 am    Post subject: Reply with quote

$1 is the message parameter.

So $self->getContactStatus($1); should get the status of the email given as a parameter. I would have thought it was something like NLN or BSY.
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 8:15 am    Post subject: Reply with quote

I have thought a touch further.


Ths idea of mine can't work can it? As before it shows online on the bots list the other person must click 'ok' to add the bot to their list?
Back to top
alienz
Almost An Agent
Almost An Agent


Joined: 22 Mar 2004
Posts: 1436
Location: Mars
Reputation: 55.7

PostPosted: Tue Jan 25, 2005 8:16 am    Post subject: Reply with quote

You'll need to find out what it's returning...do a print to see the value of $cs.

Code:
<br />my $cs = $self->getContactStatus($1);<br />print $cs; <br />


Will allow you to see what it is before it hits the IF. If the values are numbers, such as 1 for true or 0 for false, use this:

Code:
<br />my $cs = $self->getContactStatus($1);<br /><br />if($cs == 1) { <br />


If the values are strings, use this:

Code:
<br /><br />if ($cs eq "NLN") { <br />


Just checking if the variable has a value isn't always going to work if you usually expect to get SOMETHING back, make sense?

_________________
Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Back to top
darkmonkey
The Merovingian
The Merovingian


Joined: 18 Apr 2004
Posts: 2557
Location: London, England
Reputation: 39.3Reputation: 39.3Reputation: 39.3Reputation: 39.3
votes: 7

PostPosted: Tue Jan 25, 2005 8:18 am    Post subject: Reply with quote

You can packet sniff so that you don't need to add them to your list. That's what the OSIs do, and so does ExtraBot (& probably other good ones Smile).
_________________
~ Josh
[ Need bot hosting on a dedicated server? PM me. ]
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 8:36 am    Post subject: Reply with quote

Packet sniff?

Anyone got any idea's for me?
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

Reputation: 44.1Reputation: 44.1Reputation: 44.1Reputation: 44.1

PostPosted: Tue Jan 25, 2005 11:51 am    Post subject: Reply with quote

lol, Alienz that would work but a dumb way, what if there status is AWY, ok can you tell us what happens? because I'm not sure if the sub "addContact" adds them to there FL list.. If it doesn't and just adds them by AL/RL then it wouldn't get the contacts status. Show me the addContact sub and i'll change it to that if you want, but it'll be annoying for that user.. Razz
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Tue Jan 25, 2005 1:08 pm    Post subject: Reply with quote

In my experience, $1 is temporary and seems to disappear after its first use... for example, I was doing this code to make simple UBB code formatting.

I used code like this:

Code:
while ($msg =~ /\[(b|i|*lazy*)\](.*?)[\/(b|i|*lazy*)\]/i) {<br />   $msg =~ s~[$1]$2[/$3]~<$1>$2</$3>~i;<br />}


But it would turn my codes into "<>", because it lost $1, $2, and $3 after its first use.

So try turning $1 into another variable, like $a or something... and see if that helps.

_________________
Current Site (2008) http://www.cuvou.com/
Back to top
draget
Not Yet a God
Not Yet a God


Joined: 29 Dec 2004
Posts: 367
Location: Australia
Reputation: 32.2Reputation: 32.2Reputation: 32.2

PostPosted: Tue Jan 25, 2005 1:30 pm    Post subject: Reply with quote

The code above is not going to be any good.

I need a fresh idea.


Any?
Back to top
alienz
Almost An Agent
Almost An Agent


Joined: 22 Mar 2004
Posts: 1436
Location: Mars
Reputation: 55.7

PostPosted: Tue Jan 25, 2005 3:34 pm    Post subject: Reply with quote

QUOTE(..::BIGmouth( )::.. @ Jan 25 2005, 06:51 AM)
lol, Alienz that would work but a dumb way, what if there status is AWY, ok can you tell us what happens?

I dont use MSN, but there is nothing dumb about the help I gave him. He was using incorrect logic with the if ($cs) stuff. I also posted at the same time he said he thought it wouldn't work. Btw...for someone calling other people dumb, you should learn to spell things like "their".

_________________
Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Ideas All times are GMT
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 



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