User Control Panel
Advertisements
HELP US, HELP YOU!
Author
Message
Tony_shu God Like Joined: 12 Nov 2003Posts: 624
Posted: Thu Jan 01, 2004 9:40 pm Post subject:
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 Joined: 03 May 2006Posts: 2292 Location: Colorado
Posted: Fri Jan 02, 2004 10:51 pm Post subject:
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 Joined: 12 Nov 2003Posts: 624
Posted: Fri Jan 02, 2004 11:36 pm Post subject:
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 (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