User Control Panel
Advertisements

HELP US, HELP YOU!

Block command

 
Post new topic   Reply to topic    Bot Depot Forum Index -> AIM Protocol & questions
View unanswered posts
Author Message
Tony_shu
God Like
God Like


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Thu Jan 01, 2004 9:40 pm    Post subject: Reply with quote

Hey...I can't seem to figure out why this isn't blocking individuals...

Code:
sub block {<br /><br /> my ($victim,$msg,$aim) = (shift,shift,shift);<br /><br /> $is_admin = 0;<br /><br /> open(ADMIN, "commands/admin.txt");<br /> my @admin = <ADMIN>;<br /> close(ADMIN);<br /> chomp(@admin);<br /><br /> foreach my $admin (@admin) {<br />  if ($victim eq $admin) {<br />   $is_admin = 1;<br />   break;<br />  }<br /> }<br /><br /> if ($is_admin == 1) {<br />print "$victim is an Admin...and can use the block command.\n";<br />  $msg =~ s/(\!|\.|\/)block //g;<br />  $who = $msg;<br />print "I was asked to add $who to list.txt ...";<br />  open(BLOCK, ">>clients/list.txt");<br />  print BLOCK "\n$who";<br />  close(BLOCK);<br />print "Done!\n";<br /><br />  open(BLOK, "clients/list.txt");<br />  my @block = <BLOK>;<br />  close(BLOK);<br />  chomp(@block);<br />  @block = join(", ", @block);<br /><br />print "I am asking AIM to block $who...";<br />  $aim->add_deny(1, 'Buddies', $who);<br />print "Done!\n";<br />  $reply = "$who was added to the block list.";<br /> } else {<br />print "$victim is not an Admin...and cannot use the block command.\n";<br />  $reply = "Sorry, this is an admin only command.";<br /> }<br /><br /> return $reply;<br /><br />}<br />1;

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
eric256
The Keymaker
The Keymaker


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

PostPosted: Fri Jan 02, 2004 10:51 pm    Post subject: Reply with quote

Some clue as to what it does print would be helpfull as well as what message it sends back to you.
_________________
Eric256
Proud previous owner and current admin of Bot-depot.com
Back to top
Tony_shu
God Like
God Like


Joined: 12 Nov 2003
Posts: 624

Reputation: 42.9Reputation: 42.9Reputation: 42.9Reputation: 42.9

PostPosted: Fri Jan 02, 2004 11:36 pm    Post subject: Reply with quote

Actually...I got the command to work!

http://www.bot-depot.com/forums/index.php?act=ST&f=13&t=318

Thanks for the help Very Happy
(I'm getting better at this stuff....I'm just sorry I fix the issues after I already posted topics...lol)

_________________
Anthony Arslan
@-Squared Enterprises
MacroHard Corporation
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> AIM Protocol & questions 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