Diff for /ChivanetConvoBot/convobot between versions 1.5 and 1.6

version 1.5, 2025/02/03 18:14:15 version 1.6, 2025/02/05 01:03:18
Line 9 Line 9
 # Licensed AGPL-3.0  # Licensed AGPL-3.0
 #  #
 # $Log$  # $Log$
   # Revision 1.6  2025/02/05 01:03:18  snw
   # Fix invite and seen commands to support screen names with spaces
   #
 # Revision 1.5  2025/02/03 18:14:15  snw  # Revision 1.5  2025/02/03 18:14:15  snw
 # Further work on bot  # Further work on bot
 #  #
Line 181  sub chat_im_in { Line 184  sub chat_im_in {
     if($who ne $botsn) {      if($who ne $botsn) {
         if($cmd[0] eq "!seen") {          if($cmd[0] eq "!seen") {
             if(exists($cmd[1])) {              if(exists($cmd[1])) {
                 get_seen_status($cmd[1], $chat);                  my @sna = @cmd[1..$#cmd];
                   my $ssn = join(' ', @sna);
                   get_seen_status($ssn, $chat);
             }              }
             else {              else {
                 $chat->chat_send("Syntax: !seen <em>screenname</em>");                  $chat->chat_send("Syntax: !seen <em>screenname</em>");
Line 194  sub chat_im_in { Line 199  sub chat_im_in {
             my $fortune = `/usr/games/fortune`;              my $fortune = `/usr/games/fortune`;
             $room->chat_send($fortune);              $room->chat_send($fortune);
         }          }
           elsif($cmd[0] eq "!invite") {
               if(exists($cmd[1])) {
                   my @sna = @cmd[1..$#cmd];
                   my $ssn = join(' ', @sna);              
                   $chat->invite($ssn, "Please join us in $chatroom! <br><em>Requested by $who</em>");
               }
           }
         elsif($cmd[0] eq "!help") {          elsif($cmd[0] eq "!help") {
             $room->chat_send("You can enter the following commands:");              $room->chat_send("You can enter the following commands:");
             $room->chat_send(" <code>!seen <em>screenname</em></code>  (find out when <em>screenname</em> was last in the chat)");              $room->chat_send(" <code>!seen <em>screenname</em></code>  (find out when <em>screenname</em> was last in the chat)");
               $room->chat_send(" <code>!invite <em>screenname</em></code>  (invite <em>screenname</em> to the chat)");
             $room->chat_send(" <code>!speak</code>  (send a random message)");              $room->chat_send(" <code>!speak</code>  (send a random message)");
             $room->chat_send(" <code>!quote</code>  (send a quote)");                     $room->chat_send(" <code>!quote</code>  (send a quote)");       
         }          }

Removed from v.1.5  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>