you do know its nice to say that you based your bot on a template, or at least modify bits of the bot so its not guessable.
About :: return "Credits:\n\nGil Azaria - Creator\nEric Hodges - Lots of basic commands (Edited commands)\nMojave - The FloodCheck Module\n\nThis bot was made by the DevDragon Template which can be officially found at www.bot-depot.com (No own site yet.)";
Joined: 19 Jul 2004 Posts: 556 Location: Los Angeles, CA votes: 1
Posted: Thu Oct 28, 2004 8:33 pm Post subject:
Quote:
or at least modify bits of the bot so its not guessable.
I think its good he leaves in the credits. At least he dosn't take other proples code cahnge little bits and remove credits....that would be lame! _________________ [ matt ]
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Oct 29, 2004 11:26 pm Post subject:
QUOTE(darkmonkey @ Oct 28 2004, 01:33 PM)
Wow Purcelly, I didn't know you could code THIS well. Can you explain to little old me what this does:
Code:
$SIG{INT} = sub { $bot->{exit} = 1; &Logger("BotLog","Disconnected"); };
or this:
Code:
my $class = ref($proto) || $proto;
I would be very grateful :rolleyes:, even I can't do that!
Hehe i just peaked at the main .pl file. The INT and BREAK parts allow your bot to do something special when you do CONTROL-C in the dos window. This means you could shut it down gracefully. Unfortunatly his code wont shut down gracefully, it just gets stuck in an infinite loop doing nothing (unless there is some hidden magic somewhere else)
The ref part allows you to create a new object by doing either
Code:
my $x = Package::Name->new();
or
Code:
my $*lazy* = $x->new;
Its actualy bad practice (something i just recently learned) and should be avoided using just
Code:
my $class = $proto;
instead. _________________ Eric256
Proud previous owner and current admin of Bot-depot.com
Joined: 03 May 2006 Posts: 2292 Location: Colorado
Posted: Fri Oct 29, 2004 11:37 pm Post subject:
I have no idea why you abused the FloodCheck module like that, it quite ridiculous what you have done to it, and all the MSN methods. It appears you cloned them to add in extra logging ?? There are much better ways to do that. Check matts post about a MSNGUI. The code he used there would let you wrap log stuff around any MSN methods without your current method.
Just a thought
Code:
<br /> $bot->{users}->{$user}->{floodhits}++ if ($action == 1);<br /> $bot->{users}->{$user}->{floodhits}++ x 2 if ($action == 2);<br /> $bot->{users}->{$user}->{floodhits}++ x 3 if ($action == 3);<br /> $bot->{users}->{$user}->{floodhits}++ x 4 if ($action == 4);<br /> $bot->{users}->{$user}->{floodhits}++ x 5 if ($action == 5);<br />
While at it, it would be good to mention that because you put a new in your main.pl, and you don't have it in a package, your are actualy creating a new object of type main. This realy isn't the best of ideas, its confusing for one thing and makes it quite hard to understand your code. Anyway thanks for ripping all my hard work, mangling it and then posting it here! _________________ Eric256
Proud previous owner and current admin of Bot-depot.com