source: perl/modules/AIM/lib/Net/OSCAR/Callbacks/0/error.pm @ 3dcccba

barnowl_perlaim
Last change on this file since 3dcccba was 7a1c90d, checked in by Geoffrey Thomas <geofft@mit.edu>, 16 years ago
Skeleton AIM module, and Net::OSCAR 1.925
  • Property mode set to 100644
File size: 674 bytes
Line 
1package Net::OSCAR::Callbacks;
2use strict;
3use warnings;
4use vars qw($connection $snac $conntype $family $subtype $data $reqid $reqdata $session $protobit %data);
5sub {
6
7my $error = "";
8if($family == 0x4) {
9        $error = "Your message could not be sent for the following reason: ";
10} else {
11        $error = "Error in ".$connection->{description}.": ";
12}
13$session->log_printf(OSCAR_DBG_DEBUG, "Got error %d on req 0x%04X/0x%08X.", $data{errno}, $family, $reqid);
14return if $data{errno} == 0;
15$error .= (ERRORS)[$data{errno}] || "unknown error";
16$error .= " (".$data{error_details}.")." if $data{error_details};
17send_error($session, $connection, $data{errno}, $error, 0, $reqdata);
18
19};
Note: See TracBrowser for help on using the repository browser.