View ¡m../sdba/././bin/./aim_evil.pl¡n
################################ # # Not sure what to do with this in this context..... # # Borrowed from WIRED BOTS # # aim_evil(); # # desc: This sub is called when the bot recieves a warning. # It says it was warned # Then grabs default AIM vars. # Checks to see by whom it was warned # If not anonymous, warn and block them # If anonymous, can't do anything. # recv: AIM's default vars and $level, $culprit args. # sends: nothing. ################################ sub aim_evil { my ($self, $evt, $from, $to) = @_; my ($level, $culprit) = @{$evt->args}; #Print to the DOS window the warn notification. print "My warning level changed to $level %."; #If there is no culprit, make it 'anon'. $culprit = 'anon' if ($culprit =~ /^\s*$/); #Remove spaces from $culprit; make it lowercase. $culprit = lc ($culprit); $culprit =~ s/ //g; #If not anonymously warned... if ($culprit ne 'anon') { #Warn the culprit and block him/her. $aim->evil($culprit, 0); $aim->add_deny(1, 'Buddies', $culprit); #Add to warner list. #If the warner list doesn't exist yet... if (-e "list.txt" ne 1) { #Then create it. open (DATA, ">list.txt"); print DATA "$culprit"; close(DATA); } else { #Otherwise, the list already exists. We'll append to it. open (DATA, ">>list.txt"); print DATA ",$culprit"; close(DATA); } #If anonymously warned } else { print " by an anonymous user.\n\n"; } } 1;