View ¡m../sdba/././bin/aim_error.pl¡n
################################ # Borrowed from WIRED BOTS # Need to make this useful somehow # aim_error(); # # desc: This sub is called when an error occurs while communicating w/ TOC. # It grabs the default AIM vars # Grabs the error number # Translates that number, and prints result. # recv: AIM's default vars. # sends: nothing. ################################ sub aim_error { my ($self, $evt) = @_; my ($error, @stuff) = @{$evt->args()}; #Translate the error number into plain English. my $errstr = $evt->trans($error); #Filter the error string for the content we need. $errstr =~ s/\$(\d+)/$stuff[$1]/ge; #Print the error to the DOS window. print "ERROR: $errstr\n"; #If the error says that the bot is talking too fast, we'll sleep some. if ($errstr eq "A message has been dropped, you are exceeding the server speed limit") { sleep(dosleep(5,10)); print "Compensated for Flood..\n\n"; } } 1;