Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    4

    Unhappy Unanswered: help with Net::YMSG

    I'm trying to create a script that will connect to yahoo and I'm using Net::YMSG but I still can't connect...

    Here is my code...

    my $yahoo = Net::YMSG->new(
    id => "yahoo_id",
    password => "yahoo_pass",
    );

    $yahoo->login or die "Can't login Yahoo!Messenger";
    $yahoo->start;

    Please I really need anybody's help! Thanks!

  2. #2
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    Please post the error message. Do you have "use Net::YMSG;" before you create a new object?

    take this code (it's just a bit different to yours):
    Code:
    use Net::YMSG;
    my $yahoo = Net::YMSG->new(
      id => 'your_yahoo_id',
      password => 'your_yahoo_pass',
    );
    
    $yahoo->login or die "Can't login Yahoo!Messenger: $!"; # important: $! prints error message
    $yahoo->start;
    board.perl-community.de - The German Perl-Community

  3. #3
    Join Date
    Jan 2004
    Location
    Germany
    Posts
    167
    To which Yahoo! do you want to connect??

    If you want to connect to Yahoo!India, for instance, you have to add the hostname:
    Code:
    my $yahoo_india = Net::YMSG->new(
      id                  => 'your_yahoo_id',
      password       => 'your_yahoo_pass',
      hostname      => 'cs.yahoo.co.in',
    );
    board.perl-community.de - The German Perl-Community

  4. #4
    Join Date
    Feb 2004
    Location
    Philippines
    Posts
    4
    Originally posted by reneeb
    Please post the error message. Do you have "use Net::YMSG;" before you create a new object?

    take this code (it's just a bit different to yours):
    Code:
    use Net::YMSG;
    my $yahoo = Net::YMSG->new(
      id => 'your_yahoo_id',
      password => 'your_yahoo_pass',
    );
    
    $yahoo->login or die "Can't login Yahoo!Messenger: $!"; # important: $! prints error message
    $yahoo->start;
    the error is "Can't login Yahoo!Messenger: at ./YIM_buddy.pl line 10."
    I'm using the correct login and password..I already tried it at yahoo messager

    I only use hostname 'scs.yahoo.com' I'm at the philippines and I dont know what hostname I should use..

  5. #5
    Join Date
    Apr 2006
    Posts
    1

    Exclamation heya

    I do have the same error but I got the error message:
    root@general:~/arhive# ./test.pl
    Connection refused at /usr/lib/perl5/site_perl/5.8.7/Net/YMSG.pm line 344.

    if I repeat the same command 3 times i get:
    Operation now in progress at /usr/lib/perl5/site_perl/5.8.7/Net/YMSG.pm line 344.

    but It does not send the message.

    Code:
    #!/usr/bin/perl
    use Net::YMSG;
    my $yahoo = Net::YMSG->new(
            id => 'id',
            password => 'pass',
            hostname => 'scs.yahoo.com',
    );
    
    $yahoo->login or die "Can't login Yahoo!Messenger: $!";
    $yahoo->recv();
    $yahoo->start;
    $yahoo->send('rzvngbrl', 'heya!');
    $yahoo->logoffchat();
    any hints please?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •