Changeset e0a5480
- Timestamp:
- Aug 8, 2013, 2:46:57 PM (10 years ago)
- Parents:
- ecd4edf (diff), 94eb15b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - 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.