Changeset e625b5e for perl/modules/IRC/lib/BarnOwl
- Timestamp:
- Feb 21, 2009, 11:16:58 PM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- f17bb2c0
- Parents:
- 4df2568
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
r33db995 re625b5e 111 111 BarnOwl::new_command('irc-disconnect' => mk_irc_command(\&cmd_disconnect)); 112 112 BarnOwl::new_command('irc-msg' => mk_irc_command(\&cmd_msg, OPTIONAL_CHANNEL)); 113 BarnOwl::new_command('irc-mode' => mk_irc_command(\&cmd_mode, OPTIONAL_CHANNEL)); 113 114 BarnOwl::new_command('irc-join' => mk_irc_command(\&cmd_join)); 114 115 BarnOwl::new_command('irc-part' => mk_irc_command(\&cmd_part, REQUIRE_CHANNEL)); … … 238 239 } 239 240 241 sub cmd_mode { 242 my $cmd = shift; 243 my $conn = shift; 244 my $target = shift; 245 $target ||= shift; 246 $conn->conn->mode($target, @_); 247 } 248 240 249 sub cmd_join { 241 250 my $cmd = shift; … … 343 352 } 344 353 if(!$conn && $use_channel) { 345 $channel = $ARGV[ -1];354 $channel = $ARGV[0]; 346 355 if(defined($channel) && $channel =~ /^#/) { 347 356 if($channels{$channel} && @{$channels{$channel}} == 1) { 348 pop@ARGV;357 shift @ARGV; 349 358 $conn = $channels{$channel}[0]; 350 359 }
Note: See TracChangeset
for help on using the changeset viewer.