Changeset 4f7b1f4
- Timestamp:
- Aug 8, 2013, 2:19:03 PM (11 years ago)
- Branches:
- master, release-1.10
- Children:
- a38becd, 8b2419c
- Parents:
- 48c09d4
- git-author:
- Edward Z. Yang <ezyang@mit.edu> (01/03/13 13:15:23)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (08/08/13 14:19:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
r731e921 r4f7b1f4 138 138 argument listed above, and die if no channel argument can be found. 139 139 140 =item C<CHANNEL_OR_USER> 141 142 Pass the channel argument, but accept it if it's a username (e.g. 143 has no hash). Only relevant with C<CHANNEL_ARG>. 144 140 145 =item C<CHANNEL_OPTIONAL> 141 146 … … 154 159 use constant CHANNEL_ARG => 1; 155 160 use constant CHANNEL_OPTIONAL => 2; 156 157 use constant ALLOW_DISCONNECTED => 4; 161 use constant CHANNEL_OR_USER => 4; 162 163 use constant ALLOW_DISCONNECTED => 8; 158 164 159 165 sub register_commands { … … 197 203 198 204 BarnOwl::new_command( 199 'irc-msg' => mk_irc_command( \&cmd_msg ),205 'irc-msg' => mk_irc_command( \&cmd_msg, CHANNEL_OR_USER|CHANNEL_ARG|CHANNEL_OPTIONAL ), 200 206 { 201 207 summary => 'Send an IRC message', … … 608 614 $conn ||= $c; 609 615 } 616 } elsif (defined($channel) && ($flags & CHANNEL_OR_USER)) { 617 shift @ARGV; 610 618 } elsif ($m && $m->type eq 'IRC' && !$m->is_private) { 611 619 $channel = $m->channel;
Note: See TracChangeset
for help on using the changeset viewer.