Changeset 744769e


Ignore:
Timestamp:
Aug 20, 2009, 2:46:38 AM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
0b4aef2
Parents:
0b5168d
git-author:
Anders Kaseorg <andersk@mit.edu> (08/20/09 02:18:17)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/20/09 02:46:38)
Message:
IRC: Add quoting for reply commands and editwin prompt.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Location:
perl/modules/IRC/lib/BarnOwl/Module
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/IRC/lib/BarnOwl/Module/IRC.pm

    rab9cd8f r744769e  
    387387        process_msg($conn, $to, join(" ", @_));
    388388    } else {
    389         BarnOwl::start_edit_win("/msg -a " . $conn->alias . " $to", sub {process_msg($conn, $to, @_)});
     389        BarnOwl::start_edit_win(BarnOwl::quote('/msg', '-a', $conn->alias, $to), sub {process_msg($conn, $to, @_)});
    390390    }
    391391    return;
     
    414414        is_private($to) ?
    415415          (isprivate  => 'true') : (channel => $to),
    416         replycmd    => "irc-msg -a " . $conn->alias . " $to",
    417         replysendercmd => "irc-msg -a " . $conn->alias . " $to"
     416        replycmd    => BarnOwl::quote('irc-msg',  '-a', $conn->alias, $to),
     417        replysendercmd => BarnOwl::quote('irc-msg', '-a', $conn->alias, $to),
    418418       );
    419419    BarnOwl::queue_message($msg);
  • perl/modules/IRC/lib/BarnOwl/Module/IRC/Connection.pm

    r7c83a32 r744769e  
    119119        is_private($recipient) ?
    120120          (isprivate  => 'true') : (channel => $recipient),
    121         replycmd    => 'irc-msg -a ' . $self->alias . ' ' .
    122             (is_private($recipient) ? $evt->nick : $recipient),
    123         replysendercmd => 'irc-msg -a ' . $self->alias . ' ' . $evt->nick
     121        replycmd    => BarnOwl::quote('irc-msg', '-a', $self->alias,
     122          (is_private($recipient) ? $evt->nick : $recipient)),
     123        replysendercmd => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->nick),
    124124       );
    125125
     
    170170        action     => 'join',
    171171        channel    => $evt->to,
    172         replycmd => 'irc-msg -a ' . $self->alias . ' ' . join(' ', $evt->to),
    173         replysendercmd => 'irc-msg -a ' . $self->alias . ' ' . $evt->nick
     172        replycmd   => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->to),
     173        replysendercmd => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->nick),
    174174        );
    175175    BarnOwl::queue_message($msg);
     
    182182        action     => 'part',
    183183        channel    => $evt->to,
    184         replycmd => 'irc-msg -a ' . $self->alias . ' ' . join(' ', $evt->to),
    185         replysendercmd => 'irc-msg -a ' . $self->alias . ' ' . $evt->nick
     184        replycmd   => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->to),
     185        replysendercmd => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->nick),
    186186        );
    187187    BarnOwl::queue_message($msg);
     
    195195        from       => $evt->to,
    196196        reason     => [$evt->args]->[0],
    197         replycmd => 'irc-msg -a ' . $self->alias . ' ' . $evt->nick,
    198         replysendercmd => 'irc-msg -a ' . $self->alias . ' ' . $evt->nick
     197        replycmd   => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->nick),
     198        replysendercmd => BarnOwl::quote('irc-msg', '-a', $self->alias, $evt->nick),
    199199        );
    200200    BarnOwl::queue_message($msg);
Note: See TracChangeset for help on using the changeset viewer.