#!/usr/bin/perl -w package IRC; use strict; # IRC substitute package - simulate xchat's IRC::foo # Decklin Foster - public domain # Usage: perl -w -MIRC my @funcs = qw( add_command_handler add_message_handler add_timeout_handler channel_list command command_with_server dcc_list get_info print register send_raw ); foreach my $func (@funcs) { no strict 'refs'; *$func = sub { (my $args = join '", "', @_) =~ tr/\cA-\cZ//d; print STDERR qq(IRC::$func("$args");\n); }; } 1;