User Control Panel
Advertisements

HELP US, HELP YOU!

Help me plz

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help
View unanswered posts
Author Message
BraveHeart
Senior Member
Senior Member


Joined: 14 Jan 2004
Posts: 285

Reputation: 33.8Reputation: 33.8Reputation: 33.8

PostPosted: Thu Mar 04, 2004 8:11 pm    Post subject: Reply with quote

Code:
sub Join {<br />    my ($self,$user,$friendly) = @_;<br />    my $bot = $self->GetMaster->{bot} unless $bot->{msn}->unblock($blocky);<br />return"Banned user detected! Leaving convo!";<br />  <br />    # called whenever a users joins this conversation<br />    $self->sendmsg("Welcome to the conversation $user",Font => "Comic Sans MS", Color => '660066');<br />}

Does anyone know whats wrong with this?
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Thu Mar 04, 2004 8:31 pm    Post subject: Reply with quote

I'm assuming your problem is that the bot thinks everybody is a banned user?

That's because you have the "return" for banned uses on a line all by itself, when you're not even comparing it to anything. Try "return 'this message' if $they_are_blocked" or whatever.

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


Joined: 14 Jan 2004
Posts: 285

Reputation: 33.8Reputation: 33.8Reputation: 33.8

PostPosted: Thu Mar 04, 2004 8:33 pm    Post subject: Reply with quote

OOOPS sorry,

the error i get is

Quote:
Global symbol "$blocky" requires explicit package name at bot.pl line 47,
line 1.
Execution of bot.pl aborted due to compilation errors.
Back to top
..::BIGmouth( )::..
God Like
God Like


Joined: 05 Feb 2004
Posts: 801

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

PostPosted: Thu Mar 04, 2004 11:04 pm    Post subject: Reply with quote

Code:
",Font => "Comic Sans MS", Color => "660066");<br />}

You put, ' ' Instead of, " ".
Back to top
BraveHeart
Senior Member
Senior Member


Joined: 14 Jan 2004
Posts: 285

Reputation: 33.8Reputation: 33.8Reputation: 33.8

PostPosted: Thu Mar 04, 2004 11:07 pm    Post subject: Reply with quote

thats nothing to do with it,

it was always like that

:rolleyes:
Back to top
MikeFairbrother
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 179
Location: United Kingdom
Reputation: 27.9Reputation: 27.9Reputation: 27.9

PostPosted: Fri Mar 05, 2004 9:31 am    Post subject: Reply with quote

could it be you need a space (bit in red)

Yours:
Quote:
sub Join {
   my ($self,$user,$friendly) = @_;
   my $bot = $self->GetMaster->{bot} unless $bot->{msn}->unblock($blocky);
return"Banned user detected! Leaving convo!";

   # called whenever a users joins this conversation
   $self->sendmsg("Welcome to the conversation $user",Font => "Comic Sans MS", Color => '660066');
}



Could Be:

Quote:
sub Join {
   my ($self,$user,$friendly) = @_;
   my $bot = $self->GetMaster->{bot} unless $bot->{msn}->unblock($blocky);
   return "Banned user detected! Leaving convo!";

   # called whenever a users joins this conversation
   $self->sendmsg("Welcome to the conversation $user",Font => "Comic Sans MS", Color => '660066');
}



there was no space between return and the "

_________________
Regards,
Mike
Back to top
eric256
The Keymaker
The Keymaker


Joined: 03 May 2006
Posts: 2292
Location: Colorado
Reputation: 47Reputation: 47Reputation: 47Reputation: 47Reputation: 47

PostPosted: Fri Mar 05, 2004 3:58 pm    Post subject: Reply with quote

Code:
<br />my $bot = $self->GetMaster->{bot} unless $bot->{msn}->unblock($blocky);<br />return"Banned user detected! Leaving convo!";<br />


Read that in english. Set $bot = GetMaster->{bot} unless we unblock the users. Then regardless of what just happend return form here saying a banned user was detected. The two lines are not connected in any way so it will ALWAYS leave saying the user is blocked. You also used the variable $blocky which is not set equal to anything.

Code:
<br />my $bot = $self->GetMaster->{bot};<br />return"Banned user detected! Leaving convo!"  if $bot->{msn}->{blocked}->{$blocky};<br />


I'm not sure that there is a blocked hash at all though so that may not work either.

_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Code Help All times are GMT
Page 1 of 1

 



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