LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2611|回复: 0

perl oicq code improved (addons 3 function search_users)

[复制链接]
发表于 2003-4-15 16:54:58 | 显示全部楼层 |阅读模式
sub s_search_users {
  my ($self, $packet) = @_;
  my $plain = $self->decrypt(get_data($packet), $self->{Key});
  return unless defined $plain;
  $self->msg('-'x28, ' Online Status [Max 25]', '-'x28, "\n");
  foreach my $line (split(/$RS/, $plain)) {
    my ($qid, $nick, $home, $pic) = split(/$FS/, $line);
    $nick =~ s/^\s+//g; $nick =~ s/\s+$//g;
    $home =~ s/^\s+//g; $home =~ s/\s+$//g;
    $self->msg(sprintf("%-10s [p %3s] %-30s %+20s\n",
              $qid, $pic, $nick, $home));
  }
  $self->msg('='x79, "\n");
  return 1;
}

sub c_search_users {
  my ($self, $packet) = @_;
  my $plain = $self->decrypt_client_data(get_data($packet));
  return unless defined $plain;
  $self->log("Client requests online users\n");
  $self->dumphex($plain);
  1;
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表