📄 q
字号:
#!/usr/bin/env perl# $Id: q,v 1.1 2003/11/26 20:30:12 tans Exp $# Copyright (c) 2002, 2003 Shufeng Tan. All rights reserved.# # This program is free software and is provided "as is" without express# or implied warranty. It may be used, redistributed and/or modified# under the terms of the Perl Artistic License (see# http://www.perl.com/perl/misc/Artistic.html)use strict;use Getopt::Long;use Net::OICQ::TextConsole;my $usage = <<EOF;Usage:If you use Borne shell, bash or ksh, type:OICQ_PW='xxxxxxx' $0 [-hi] [-d#] [-p<plugin>] idIf you use csh or tcsh, type:setenv OICQ_PW 'xxxxxxx'$0 [-hi] [-d#] [-p<plugin>] idOptions: -h print this help message -i invisible mode -d debug mode -p<plugin> specify pluginEOFmy $invisible= 0;my $debug = 0;my $plugin = "";my $help = 0;GetOptions("debug=i" => \$debug, "invisible" => \$invisible, "plugin=s" => \$plugin, "help" => \$help);die $usage if $help;my $mode = $invisible ? 'Invisible' : 'Normal';my $uid = shift;#print "mode = $mode, debug = $debug, uid=$uid\n";$uid or $uid = $ENV{OICQ_ID} or die "Login Id not given\n";my $pw = $ENV{OICQ_PW} or die "OICQ_PW env not set\n";$| = 1;my $ui = new Net::OICQ::TextConsole;our $oicq = $ui->{OICQ};$oicq->{Debug} = $debug;$oicq->login($uid, $pw, $mode) or die "Failed to login.\n";$ui->{LastKbInput} = time;$ui->set_mode($mode);$oicq->get_online_friends;$oicq->get_user_info($uid);if ($plugin) { if (-f $plugin) { $ui->load_plugin($plugin); } else { $ui->warn("Plugin $plugin does not exist\n"); }}$ui->loop;END { defined $oicq && $oicq->logout }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -