ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-Knuddels/Net/Knuddels.pm
(Generate patch)

Comparing Net-Knuddels/Net/Knuddels.pm (file contents):
Revision 1.25 by root, Mon Jan 24 05:58:15 2005 UTC vs.
Revision 1.26 by root, Fri Jan 28 05:41:50 2005 UTC

649 } 649 }
650 650
651 exists $self->{login_challenge} or Carp::croak "set_nick can only be called after a login event"; 651 exists $self->{login_challenge} or Carp::croak "set_nick can only be called after a login event";
652 652
653 $self->{knuddels_nick} = $nick; 653 $self->{knuddels_nick} = $nick;
654 print "ENTER: $room\n";
655 $self->command ("n", $room, $nick, Net::Knuddels::hash_pw $self->{login_challenge}, $password); 654 $self->command ("n", $room, $nick, Net::Knuddels::hash_pw $self->{login_challenge}, $password);
656} 655}
657 656
658=item $client->send_whois ($nick) 657=item $client->send_whois ($nick)
659 658
661 660
662=cut 661=cut
663sub send_whois { 662sub send_whois {
664 my ($self, $room, $nick) = @_; 663 my ($self, $room, $nick) = @_;
665 664
666 print "send: $room:/w $nick\n";
667 $self->command ("e", $room, "/w $nick"); 665 $self->command ("e", $room, "/w $nick");
668} 666}
669 667
670 668
671=item $client->send_room_msg ($nick, $room, $message) 669=item $client->send_room_msg ($nick, $room, $message)
674 672
675=cut 673=cut
676sub send_room_msg { 674sub send_room_msg {
677 my ($self, $room, $message) = @_; 675 my ($self, $room, $message) = @_;
678 676
679 print "SEND ROOM:$room\: $message\n";
680 $self->command ("e", $room, $message); 677 $self->command ("e", $room, $message);
681} 678}
682 679
683 680
684=item $client->send_priv_msg ($nick, $room, $message) 681=item $client->send_priv_msg ($nick, $room, $message)
687 684
688=cut 685=cut
689sub send_priv_msg { 686sub send_priv_msg {
690 my ($self, $nick, $room, $message) = @_; 687 my ($self, $nick, $room, $message) = @_;
691 688
692 print "SEND PRIV:$room: /p $nick:$message\n";
693 $self->command ("e", $room, "/p $nick:$message"); 689 $self->command ("e", $room, "/p $nick:$message");
694} 690}
695 691
696=item $client->send_join_room ($oldroom, $room) 692=item $client->send_join_room ($oldroom, $room)
697 693
700 696
701=cut 697=cut
702sub send_join_room { 698sub send_join_room {
703 my ($self, $old_room, $room) = @_; 699 my ($self, $old_room, $room) = @_;
704 700
705 print "JOIN ROOM: #room : /go $room\n";
706 $self->command ("e", $old_room, "/go $room"); 701 $self->command ("e", $old_room, "/go $room");
707} 702}
708 703
709=item $client->send_exit_room ($room) 704=item $client->send_exit_room ($room)
710 705
711 Exits C<$room> completly. (can be seen as counter method for C<enter_room ()>); 706 Exits C<$room> completly. (can be seen as counter method for C<enter_room ()>);
712 707
713=cut 708=cut
714sub send_exit_room { 709sub send_exit_room {
715 my ($self, $room) = @_; 710 my ($self, $room) = @_;
716 print "EXIT EOORM: $room \n";
717 $self->command ("w", $room, "\0", "\0"); 711 $self->command ("w", $room, "\0", "\0");
718 delete $self->{room}->{lc $room}; 712 delete $self->{room}->{lc $room};
719} 713}
720 714
721=item $client->register ($type => $cb) 715=item $client->register ($type => $cb)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines