User Control Panel
Advertisements

HELP US, HELP YOU!

IBot Lite

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Bot Depot Forum Index -> Archived Bots
View unanswered posts
Author Message
StingRay
Newbie
Newbie


Joined: 27 Sep 2004
Posts: 22

Reputation: 20Reputation: 20

PostPosted: Mon Nov 29, 2004 8:57 pm    Post subject: Reply with quote

This Is My First Ever MSN Bot I Have Made.

User Menu Contains:

Code:
!leet (Made By Art)<br /><br />!menu


Mod Menu Contains:

Code:
!mod menu


Owner Menu Contains:

Code:
!owner menu<br /><br />!shutdown


Download Bot: Download Now

Hope you like my first bot Smile

(Please note the instructions was wrote quickly)

Loads Of Thanks To Art For Helping Me.

(By The Way, Next One I Might Call EyeBot.
Back to top
Mojave
Almost An Agent
Almost An Agent


Joined: 01 Nov 2003
Posts: 1434

Reputation: 66.4

PostPosted: Mon Nov 29, 2004 9:14 pm    Post subject: Reply with quote

Hmm, did you test this code at all?

In your bot.pl, how do you expect the code from lines 48-96 to ever get called? You have a while loop at the top that runs forever, so all the code below that (other than handlers) will never get called.

You're also using the send method from MSN.pm... why?
Back to top
farkie
God Like
God Like


Joined: 15 Nov 2003
Posts: 673

Reputation: 3.4Reputation: 3.4Reputation: 3.4

PostPosted: Tue Nov 30, 2004 1:56 pm    Post subject: Reply with quote

i see you made the effort to put loads of commands in it then...1 command made by you..(maybe)..the code for that is:

Code:
exit;
Back to top
Gavin
God Like
God Like


Joined: 15 Mar 2004
Posts: 661
Location: Manchester, UK
Reputation: 36.2Reputation: 36.2Reputation: 36.2Reputation: 36.2

PostPosted: Tue Nov 30, 2004 7:39 pm    Post subject: Reply with quote

You should really have double checked for errors....also the way to use:
Code:
&send($self, "message");

Is to create a sub like this:
Code:
sub send {<br />        my ($self,$response) = (shift,shift,shift);<br />        $self->sendmsg ("$response");<br />}

You can't use it without the sub.

_________________
MSN: gavin [at] gavinbrittain [dot] co [dot] uk
E-Portfolio: www.gavinbrittain.co.uk (New version comming soon)
Back to top
mat007
Almost An Agent
Almost An Agent


Joined: 12 Jan 2004
Posts: 1375

Reputation: 15.8Reputation: 15.8
votes: 2

PostPosted: Tue Nov 30, 2004 8:12 pm    Post subject: Reply with quote

Why are you shifting three times, also you dont need quotes around variables.

plus theres a send sub in Sub Message.
Back to top
Cer
Upgraded Agent
Upgraded Agent


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

PostPosted: Tue Nov 30, 2004 8:27 pm    Post subject: Reply with quote

Yeah:

Quote:
my ($self,$response) = (shift,shift,shift);

## Better Written As ##

my ($self,$response) = @_;


Using individual shifts is best used if you're receiving static data, and then going to do something else with the rest... i.e.

Code:
# A method that sends an array of responses?<br />&send ($self,"Reply","another reply","yet another");<br /><br />sub send {<br />   my $self = shift;<br />   my (@replies) = @_;<br />}<br /><br /># A method sending a scalar and a hash.<br />&method ($self,<br />   Key => "value",<br />   key => "Value",<br />);<br /><br />sub method {<br />   my $self = shift;<br />   my %args = @_;<br />}

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


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

PostPosted: Tue Nov 30, 2004 8:31 pm    Post subject: Reply with quote

Yeah...what Cer said while I was typing....LOL , and as Matt pointed out, you dont need quotes around a variable. Before you criticize someone else's code, you should learn more about it yourself.
_________________
Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Back to top
Gavin
God Like
God Like


Joined: 15 Mar 2004
Posts: 661
Location: Manchester, UK
Reputation: 36.2Reputation: 36.2Reputation: 36.2Reputation: 36.2

PostPosted: Tue Nov 30, 2004 8:37 pm    Post subject: Reply with quote

I know it was just something I took from some old coding and edited. It was just an example not like the real how to do thing.
_________________
MSN: gavin [at] gavinbrittain [dot] co [dot] uk
E-Portfolio: www.gavinbrittain.co.uk (New version comming soon)
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Bot Depot Forum Index -> Archived Bots 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