I was trying to use the block command from this part of the forum ( http://www.bot-depot.com/forums/index.php?...pic=51&hl=block ). And I used at the very last post clcools updated block command for MSN.pm 1.2. So, I tried it out, and it would not work, at all. Just to make sure to, I am suppose to put this in the commands folder, right? And was the block command able to be used in MSN.pm 1.3?
Here is the code for the block & unblock command...
<br />Use of uninitialized value in pattern match (m//) at commands/block.pl.txt line<br />1, <DATA> line 1.<br />commands/block.pl.txt did not return a true value at bot.pl line 70, <DATA> line<br /> 1.<br />Including block.pl.txt..<br />C:\Perl\bin><br />
I hope that's ok for you, save them as block.pl and unblock.pl in the commands folder and try em.
Replace the : before block and unblock to your command prefix (!, #, etc) and hopefully it'll work.
I suggest closing your bot then running it from scratch cos then you'll get any errors when it compiles it. I've checked it, but you may or may not need another } in there somewhere so that's the most likely error.
Good luck and I hope it works out
#### EDIT #### This does work with MSN 1.3 cos I started using it yesterday and did the block and unblock commands today.
SyPhEr= Thanks, I got it to come online, but once I try to block someone, the bot just cuts/goes offline...?
Micky G = I do not want to just block one person, plus I want it to be a little easier to do (to block the person).
Vorx= Yours does the same thing as SyPhErs, it just cuts/takes me offline (my bot).
And for SyphErs and Vorx, I get an error (from both of ya'll). I think it says, something like this (not sure)...
Code:
<br />Can't call method "send" on an undefined value at commands/block.pl.txt line 4,<br /><GEN2> line 7.<br /><br />C:\Perl\bin><br />
Oh, and by the way. If this has anything to do with it. I am on my MSN (personal) and I am using my bot to try to block myself. But, it should still of worked though...
Sorry Cheats I don't think I can help you anymore I haven't got that error for the commands so it's strange it should happen to you. And we're both using MSN 1.3
You can make it work for WiredBots code, you just have to change a few things.
1. Wherever there's an IF/ELSIF for a command like this, change it to a sub. Example: if ($msg =~ /\/help/i) == sub help {
2. Immediately after the sub you'll need $victim, $msg, and $self from the shift. If $self isn't being sent, look from on_im.pl to commands.pl to make sure it is being sent a recieved from the shifts.
You can make it work for WiredBots code, you just have to change a few things.
1. Wherever there's an IF/ELSIF for a command like this, change it to a sub. Example: if ($msg =~ /\/help/i) == sub help {
2. Immediately after the sub you'll need $victim, $msg, and $self from the shift. If $self isn't being sent, look from on_im.pl to commands.pl to make sure it is being sent a recieved from the shifts.
Number 1
So, Micky G...i'm guessing that it was not a wiredbots code? And that I have to convert it into one?