home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
1.x
/
plum12.lzh
/
plum12
/
plum
< prev
next >
Wrap
Text File
|
1997-09-25
|
21KB
|
826 lines
#!/usr/bin/perl -w
# plum version 1.2
# copyright (c)1997 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package main;
$NAME = 'plum';
$VERSION = '1.2';
$PROPERTY = '.plumrc';
$LOCALMASK = '*.jp';
$IRCPORT = 6667;
$COUNT = 10;
$READSIZE = 1024;
$TIMEOUT = 120;
$SOCKADDR = 'S n a4 x8';
$PROTO = getprotobyname('tcp');
$HOSTNAME = $ENV{'HOST'} || $ENV{'HOSTNAME'};
$THISADDR = (gethostbyname($HOSTNAME))[4];
if ($] < 5) {
foreach $inc (@INC) {
if (-r "$inc/sys/socket.ph") {
eval 'require "sys/socket.ph"';
$SOCKET = "$inc/sys/socket.ph" unless $@;
last;
}
}
} else {
eval 'use Socket';
$SOCKET = 'Socket.pm' unless $@;
}
if ($SOCKET) {
($AF_INET, $PF_INET, $SOCK_STREAM) = (&AF_INET, &PF_INET, &SOCK_STREAM);
} else {
$SOCKET = '';
($AF_INET, $PF_INET, $SOCK_STREAM) = (2, 2, 1);
}
$rin = $win = '';
$unique = 0;
print $NAME, ' ', $VERSION, "\n";
if (-r $PROPERTY) {
&load('', $PROPERTY);
}
foreach $user (@ARGV) {
if (-r "$PROPERTY-$user") {
&load($user, "$PROPERTY-$user");
}
}
exit unless scalar(@username);
for ($userno = 0; $userno < scalar(@username); $userno++) {
foreach $module (&property($userno, 'module')) {
&import($userno, $module);
}
}
&main;
sub main {
local($nfound, $timeleft, $rout, $wout, $sub, $i);
for (;;) {
&c_listen;
for ($i = 0; $i < scalar(@username); $i++) {
&s_connect($i);
}
($nfound, $timeleft) = select($rout = $rin, $wout = $win, undef, $TIMEOUT);
foreach $clientno (&array($clientlist)) {
&c_read($clientno) if vec($rout, $clientno, 1);
&c_write($clientno) if vec($wout, $clientno, 1);
}
foreach $serverno (&array($serverlist)) {
&s_read($serverno) if vec($rout, $serverno, 1);
&s_write($serverno) if vec($wout, $serverno, 1);
}
foreach $listenno (&array($listenlist)) {
&c_accept($listenno) if vec($rout, $listenno, 1);
}
for ($i = 0; $i < scalar(@username); $i++) {
foreach $module (&array($modulelist[$i])) {
$sub = "${module}'main_loop";
&$sub($i) if defined(&$sub);
}
}
}
}
sub load {
local($user, $file) = @_;
local($list, $line, $var, $arg);
@username = () unless @username;
$list = &list(@username);
if (!&exist($list, $user)) {
push(@username, $user);
$list = &add($list, $user);
}
if (open(FILE, $file)) {
while (defined($line = <FILE>)) {
next if $line =~ /^\s*[\#\;]/;
chop($line);
($var, $arg) = split(/\s*\:\s*/, &jis($line), 2);
next unless $arg;
$property{$user, $var} = &add($property{$user, $var}, $arg);
}
close(FILE);
}
}
sub import {
local($userno, $module) = @_;
local($file) = &expand($module);
require $file;
$package{$module} = $_ unless $package{$module};
$modulelist[$userno] = &add($modulelist[$userno], $package{$module});
}
sub c_read {
local($clientno) = @_;
local($next, $rest, $tmp);
$tmp = '';
if (sysread($socket[$clientno], $tmp, $READSIZE)) {
$rbuf[$clientno] .= $tmp;
while ((($next, $rest) = split(/\r?\n/, $rbuf[$clientno], 2)) == 2) {
$rbuf[$clientno] = $rest;
&c_scan($clientno, &jis($next));
}
$rbuf[$clientno] = $next || '';
} else {
&c_close($clientno);
}
}
sub c_scan {
local($clientno, $line) = @_;
local($prefix, $cmd, @params) = &parse($line);
local($sub);
if ($avail[$clientno]) {
foreach $module (&array($modulelist[$userno[$clientno]])) {
$sub = "${module}'cs_\L$cmd\E";
next unless defined(&$sub);
($prefix, $cmd, @params) = &$sub($clientno, $prefix, $cmd, @params);
last unless $cmd;
}
return unless $cmd;
return unless $avail[$server[$userno[$clientno]]];
&s_print($server[$userno[$clientno]], $prefix, $cmd, @params);
} else {
$sub = "cn_\L$cmd\E";
&$sub($clientno, $prefix, $cmd, @params) if defined(&$sub);
}
}
sub c_write {
local($clientno) = @_;
local($socket, $next, $rest);
$socket = $socket[$clientno];
while ((($next, $rest) = split(/\r?\n/, $wbuf[$clientno], 2)) == 2) {
$wbuf[$clientno] = $rest;
print $socket $next, "\r\n" if fileno($socket);
}
$wbuf[$clientno] = $next || '';
vec($win, $clientno, 1) = 0;
}
sub c_print {
local($clientno, $prefix, $cmd, @params) = @_;
local($sub);
return unless $cmd;
return unless $clientno;
if ($avail[$clientno]) {
foreach $module (&array($modulelist[$userno[$clientno]])) {
$sub = "${module}'cp_\L$cmd\E";
next unless defined(&$sub);
($prefix, $cmd, @params) = &$sub($clientno, $prefix, $cmd, @params);
last unless $cmd;
}
return unless $cmd;
}
$wbuf[$clientno] .= &restore($prefix, $cmd, @params);
vec($win, $clientno, 1) = 1;
}
sub c_flush {
local($clientno) = @_;
while (vec($win, $clientno, 1)) {
&c_write($clientno);
}
}
sub s_read {
local($serverno) = @_;
local($next, $rest, $tmp);
$tmp = '';
if (sysread($socket[$serverno], $tmp, $READSIZE)) {
$rbuf[$serverno] .= $tmp;
while ((($next, $rest) = split(/\r?\n/, $rbuf[$serverno], 2)) == 2) {
$rbuf[$serverno] = $rest;
&s_scan($serverno, $next);
}
$rbuf[$serverno] = $next || '';
} else {
&s_close($userno[$serverno]);
&s_connect($userno[$serverno]);
}
}
sub s_scan {
local($serverno, $line) = @_;
local($prefix, $cmd, @params) = &parse($line);
local($sub);
if ($avail[$serverno]) {
foreach $module (&array($modulelist[$userno[$serverno]])) {
$sub = "${module}'ss_\L$cmd\E";
next unless defined(&$sub);
($prefix, $cmd, @params) = &$sub($serverno, $prefix, $cmd, @params);
last unless $cmd;
}
return unless $cmd;
foreach $clientno (&array($clientlist)) {
next unless $avail[$clientno];
next unless $userno[$clientno] == $userno[$serverno];
&c_print($clientno, $prefix, $cmd, @params);
}
} else {
$sub = "sn_\L$cmd\E";
&$sub($serverno, $prefix, $cmd, @params) if defined(&$sub);
}
}
sub s_write {
local($serverno) = @_;
local($socket, $next, $rest);
$socket = $socket[$serverno];
while ((($next, $rest) = split(/\r?\n/, $wbuf[$serverno], 2)) == 2) {
$wbuf[$serverno] = $rest;
print $socket $next, "\r\n" if fileno($socket);
}
$wbuf[$serverno] = $next || '';
vec($win, $serverno, 1) = 0;
}
sub s_print {
local($serverno, $prefix, $cmd, @params) = @_;
local($sub);
return unless $cmd;
return unless $serverno;
foreach $module (&array($modulelist[$userno[$serverno]])) {
$sub = "${module}'sp_\L$cmd\E";
next unless defined(&$sub);
($prefix, $cmd, @params) = &$sub($serverno, $prefix, $cmd, @params);
last unless $cmd;
}
return unless $cmd;
$wbuf[$serverno] .= &restore($prefix, $cmd, @params);
vec($win, $serverno, 1) = 1;
}
sub s_flush {
local($serverno) = @_;
while (vec($win, $serverno, 1)) {
&s_write($serverno);
}
}
sub parse {
local($line) = @_;
local($arg, $rest, @params);
@params = ();
$line =~ s/^\s*//;
if ($line =~ /^\:/) {
($arg, $rest) = split(/\s+/, $', 2);
} else {
($arg, $rest) = ('', $line);
}
while ($line) {
push(@params, $arg);
if ($rest =~ /^\:/) {
push(@params, $');
last;
}
$line = $rest;
($arg, $rest) = (split(/\s+/, $line, 2), '');
}
return @params;
}
sub restore {
local($prefix, $cmd, @params) = @_;
local($trailing);
return '' unless $cmd;
if (@params) {
$trailing = pop(@params) || '';
if ($trailing =~ /^[\w\d]+$/) {
push(@params, $trailing . ' ');
} else {
push(@params, ':' . $trailing);
}
}
unshift(@params, $cmd);
if ($prefix) {
unshift(@params, ':' . $prefix);
}
return join(' ', @params) . "\r\n";
}
sub user {
local($no) = @_;
return "$nick[$no]\!$user[$no]\@$host[$no]";
}
sub prefix {
local($prefix) = @_;
$prefix =~ /([^\!\@]*)(\!([^\!\@]*))?(\@([^\!\@]*))?$/;
if (wantarray) {
return ($1 || '', $3 || '', $5 || '');
} else {
return $1;
}
}
sub regex {
local($mask) = @_;
$mask =~ s/(\W)/\\$1/g;
$mask =~ s/\\\?/\./g;
$mask =~ s/\\\*/\.\*/g;
$mask =~ s/\\[\[\{]/\[\\\[\\\{\]/g;
$mask =~ s/\\[\]\}]/\[\\\]\\\}\]/g;
$mask =~ s/\\[\|\\]/\[\\\|\\\\\]/g;
return "\^$mask\$";
}
sub property {
local($userno, $name, $no) = @_;
local($list) = $property{$username[$userno], $name};
if (wantarray) {
return &array($list);
} else {
return (&array($list))[$no || 0];
}
}
sub expand {
local($name) = @_;
local($user, $rest, $home);
if ($name =~ /^\~([^\/]*)\/(.*)$/) {
($user, $rest) = ($1, $2);
if ($user) {
$home = (getpwnam($user))[7];
} else {
$home = $ENV{'HOME'} || (getpwuid($<))[7];
}
return "$home/$rest";
} else {
return $name;
}
}
sub jis {
local($euc) = @_;
local($jis, $kanji, $c, $i);
$kanji = 0;
$jis = '';
for ($i = 0; $i < length($euc); $i++) {
$c = substr($euc, $i, 1);
if (unpack('C', $c) < 0x80) {
if ($kanji) {
$jis .= "\c[\(B";
$kanji = 0;
}
$jis .= $c;
} else {
if (!$kanji) {
$jis .= "\c[\$B";
$kanji = 1;
}
$jis .= pack('C', unpack('C', $c) & 0x7f);
if (++$i < length($euc)) {
$c = substr($euc, $i, 1);
$jis .= pack('C', unpack('C', $c) & 0x7f);
}
}
}
if ($kanji) {
$jis .= "\c[\(B";
}
return $jis;
}
sub euc {
local($jis) = @_;
local($euc, $kanji, $c, $i);
$kanji = 0;
$euc = '';
for ($i = 0; $i < length($jis); $i++) {
if (substr($jis, $i, 3) eq "\c[\$B") {
$kanji = 1;
$i += 2;
next;
} elsif (substr($jis, $i, 3) eq "\c[\(B") {
$kanji = 0;
$i += 2;
next;
}
if ($kanji) {
$c = substr($jis, $i, 1);
$euc .= pack('C', unpack('C', $c) | 0x80);
if (++$i < length($jis)) {
$c = substr($jis, $i, 1);
$euc .= pack('C', unpack('C', $c) | 0x80);
}
} else {
$euc .= substr($jis, $i, 1);
}
}
return $euc;
}
sub rchan {
local($vchan) = @_;
if ($vchan =~ /^\%(.*)$/) {
return "\#$1\:$LOCALMASK";
} else {
return $vchan;
}
}
sub vchan {
local($rchan) = @_;
if ($rchan =~ /^\#(.*)\:(.*)$/ && "\L$2\E" eq "\L$LOCALMASK\E") {
return "\%$1";
} else {
return $rchan;
}
}
sub add {
local($list, @items) = @_;
$list = $; unless $list;
foreach $item (@items) {
next if &exist($list, $item);
$list = "${list}${item}$;";
}
return $list;
}
sub array {
local($list) = @_;
local(@array) = ();
$list = $; unless $list;
foreach $item (split(/$;/, $list)) {
next unless $item;
push(@array, $item);
}
return @array;
}
sub change {
local($list, @items) = @_;
local($old, $new, $idx, $i);
$list = $; unless $list;
for ($i = 0; $i < scalar(@items) / 2; $i++) {
($old, $new) = @items[$i * 2, $i * 2 + 1];
next if ($idx = index($list, "$;$old$;")) == -1;
substr($list, $idx, length("$;$old$;")) = "$;$new$;";
}
return $list;
}
sub exist {
local($list, @items) = @_;
$list = $; unless $list;
foreach $item (@items) {
return 1 if index($list, "$;$item$;") != -1;
}
return 0;
}
sub list {
local(@array) = @_;
local($list);
if (@array) {
$list = $; . join($;, @array) . $;;
} else {
$list = $;
}
return $list;
}
sub rarray {
local($list) = @_;
local(@array) = ();
$list = $; unless $list;
foreach $item (split(/$;/, $list)) {
next unless $item;
unshift(@array, $item);
}
return @array;
}
sub remove {
local($list, @items) = @_;
local($idx);
$list = $; unless $list;
foreach $item (@items) {
$idx = index($list, "$;$item$;");
next if $idx == -1;
substr($list, $idx, length("$;$item$;")) = $;;
}
return $list;
}
sub connect {
local($host, $port) = @_;
local($serverno, $socket, $this, $thataddr, $that);
$this = pack($SOCKADDR, $AF_INET, 0, $THISADDR);
if ($host =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/) {
$thataddr = pack('C4', $1, $2, $3, $4);
$host = (gethostbyaddr($thataddr, $AF_INET))[0];
} elsif ($host =~ /^\d+$/) {
$thataddr = pack('N', $host);
$host = (gethostbyaddr($thataddr, $AF_INET))[0];
} else {
$thataddr = (gethostbyname($host))[4];
}
return 0 unless $thataddr;
$that = pack($SOCKADDR, $AF_INET, $port, $thataddr);
$socket = 'S' . ++$unique;
socket($socket, $PF_INET, $SOCK_STREAM, $PROTO) || return 0;
bind($socket, $this) || return 0;
connect($socket, $that) || return 0;
$serverno = fileno($socket);
$socket[$serverno] = $socket;
select((select($socket), $| = 1)[0]);
$host[$serverno] = $host;
$addr[$serverno] = $thataddr;
return $serverno;
}
sub listen {
local($port, $count) = @_;
local($listenno, $socket, $this);
$this = pack($SOCKADDR, $AF_INET, $port, $THISADDR);
$socket = 'L' . ++$unique;
socket($socket, $PF_INET, $SOCK_STREAM, $PROTO) || return 0;
bind($socket, $this) || return 0;
listen($socket, $count) || return 0;
$listenno = fileno($socket);
$socket[$listenno] = $socket;
select((select($socket), $| = 1)[0]);
$port[$listenno] = (unpack($SOCKADDR, getsockname($socket)))[1];
return $listenno;
}
sub close {
local($no) = @_;
close($socket[$no]);
}
sub accept {
local($listenno) = @_;
local($clientno, $socket, $thataddr, $host);
$socket = 'C' . ++$unique;
accept($socket, $socket[$listenno]) || return 0;
$clientno = fileno($socket);
$socket[$clientno] = $socket;
select((select($socket), $| = 1)[0]);
$thataddr = (unpack($SOCKADDR, getpeername($socket)))[2];
$host[$clientno] = (gethostbyaddr($thataddr, $AF_INET))[0];
$addr[$clientno] = $thataddr;
return $clientno;
}
sub s_connect {
local($userno) = @_;
local($server, $host, $port, $pass, $serverno, $sub);
return if $server[$userno];
foreach $server (&property($userno, 'server')) {
next if &'exist($errorlist[$userno], $server);
($host, $port, $pass) = split(/\:/, $server);
$serverno = &connect($host, $port || $IRCPORT);
next unless $serverno;
vec($rin, $serverno, 1) = 1;
$serverlist = &add($serverlist, $serverno);
$rbuf[$serverno] = '';
$wbuf[$serverno] = '';
$avail[$serverno] = 0;
$server[$userno] = $serverno;
$userno[$serverno] = $userno;
$pass[$serverno] = $pass || '';
$entry[$serverno] = $server;
&s_init($serverno);
last;
}
}
sub s_close {
local($userno) = @_;
local($sub, $serverno);
$serverno = $server[$userno];
&close($serverno);
vec($rin, $serverno, 1) = 0;
foreach $module (&rarray($modulelist[$userno])) {
$sub = "${module}'server_close";
&$sub($serverno) if defined(&$sub);
}
$serverlist = &remove($serverlist, $serverno);
$avail[$serverno] = 0;
$userno[$serverno] = 0;
$server[$userno] = 0;
}
sub c_listen {
local($listenno, $host, $port, $pass, $i);
for ($i = 0; $i < scalar(@username); $i++) {
foreach $client (&property($i, 'client')) {
($host, $port, $pass) = split(/\:/, $client);
next if &exist($portlist, $port || $IRCPORT);
$listenno = &listen($port || $IRCPORT, $COUNT);
next unless $listenno;
vec($rin, $listenno, 1) = 1;
$listenlist = &add($listenlist, $listenno);
$portlist = &add($portlist, $port || $IRCPORT);
}
}
}
sub c_accept {
local($listenno) = @_;
local($clientno, $host, $port, $pass, $regex, $i);
$clientno = &accept($listenno);
return unless $clientno;
for ($i = 0; $i < scalar(@username); $i++) {
foreach $client (&property($i, 'client')) {
($host, $port, $pass) = split(/\:/, $client);
next unless ($port || $IRCPORT) == $port[$listenno];
$regex = ®ex($host);
next unless $host[$clientno] =~ /$regex/i;
vec($rin, $clientno, 1) = 1;
$clientlist = &add($clientlist, $clientno);
$rbuf[$clientno] = '';
$wbuf[$clientno] = '';
$avail[$clientno] = 0;
$port[$clientno] = $port[$listenno];
$nick[$clientno] = '';
$user[$clientno] = '';
$pass[$clientno] = '';
return;
}
}
&close($clientno);
}
sub c_close {
local($clientno) = @_;
local($sub);
&c_flush($clientno);
&close($clientno);
vec($rin, $clientno, 1) = 0;
$clientlist = &remove($clientlist, $clientno);
if ($avail[$clientno]) {
$avail[$clientno] = 0;
foreach $module (&rarray($modulelist[$userno[$clientno]])) {
$sub = "${module}'client_close";
&$sub($clientno) if defined(&$sub);
}
}
$userno[$clientno] = 0;
}
sub s_init {
local($serverno) = @_;
local($nickname, $nick, $msg, $username, $user, $name);
&s_print($serverno, '', 'PASS', $pass[$serverno]) if $pass[$serverno];
$nickname = $nickname[$userno[$serverno]] || &property($userno[$serverno], 'nick') || getlogin || (getpwuid($<))[0];
($nick, $msg) = split(/\s+/, $nickname, 2);
&s_print($serverno, '', 'NICK', $nick);
$username = &property($userno[$serverno], 'user');
if ($username) {
($user, $name) = split(/\s+/, $username, 2);
} else {
$user = getlogin || (getpwuid($<))[0];
$name = (getpwuid($<))[6];
}
&s_print($serverno, '', 'USER', "\L$user\E", '*', '*', $name);
}
sub c_init {
local($clientno) = @_;
local($host, $port, $pass, $serverno, $regex, $i);
for ($i = 0; $i < scalar(@username); $i++) {
foreach $client (&property($i, 'client')) {
($host, $port, $pass) = split(/\:/, $client);
next unless ($port || $IRCPORT) == $port[$clientno];
$regex = ®ex($host);
next unless $host[$clientno] =~ /$regex/i;
next if $pass && $pass ne $pass[$clientno];
$userno[$clientno] = $i;
$avail[$clientno] = 1;
$serverno = $server[$userno[$clientno]];
&c_print($clientno, $HOSTNAME, '001', $nick[$clientno], "Welcome to the Internet Relay Network $nick[$clientno]");
foreach $module (&array($modulelist[$userno[$clientno]])) {
$sub = "${module}'client_open";
&$sub($clientno) if defined(&$sub);
}
return;
}
}
&c_print($clientno, $HOSTNAME, '464', $nick[$clientno], 'Password incorrect');
&c_print($clientno, '', 'ERROR', "Closing Link: $nick[$clientno] (Bad Password)");
&c_close($clientno);
}
sub cn_ping {
local($clientno, $prefix, $cmd, @params) = @_;
&c_print($clientno, &user($clientno), '451', 'PING', 'You have not registered');
}
sub cn_pass {
local($clientno, $prefix, $cmd, $pass) = @_;
$pass[$clientno] = $pass if $pass;
}
sub cn_nick {
local($clientno, $prefix, $cmd, $nick) = @_;
$nick[$clientno] = $nick;
&c_init($clientno) if $user[$clientno];
}
sub cn_user {
local($clientno, $prefix, $cmd, @params) = @_;
if (scalar(@params) >= 4) {
$user[$clientno] = $params[0];
&c_init($clientno) if $nick[$clientno];
} else {
&c_print($clientno, $HOSTNAME, '461', 'Not enough parameters');
}
}
sub cn_quit {
local($clientno, $prefix, $cmd, @params) = @_;
&c_print($clientno, '', 'ERROR', "Closing Link: [$host[$clientno]] ($nick[$clientno])\n");
&c_close($clientno);
}
sub sn_error {
local($serverno, $prefix, $cmd, @params) = @_;
$errorlist[$userno[$serverno]] = &'add($errorlist[$userno[$serverno]], $entry[$serverno]);
}
sub sn_ping {
local($serverno, $prefix, $cmd, @params) = @_;
&s_print($serverno, '', 'PONG', @params);
}
sub sn_001 {
local($serverno, $prefix, $cmd, $nick, $msg) = @_;
local($sub);
$avail[$serverno] = 1;
$nick[$serverno] = $nick;
$nickname[$userno[$serverno]] = $nick;
$errorlist[$userno[$serverno]] = $;;
foreach $module (&array($modulelist[$userno[$serverno]])) {
$sub = "${module}'server_open";
&$sub($serverno) if defined(&$sub);
}
}
sub sn_451 {
local($serverno, $prefix, $cmd, @params) = @_;
return ();
}
sub sn_433 {
local($serverno, $prefix, $cmd, @params) = @_;
local(@nickentry, $list, $nick, $msg);
foreach $nickname (&property($userno[$serverno], 'nick')) {
($nick, $msg) = split(/\s+/, $nickname, 2);
$list = &add($list, $nick);
}
if (!$list) {
$nick = getlogin || (getpwuid($<))[0];
$list = &list($nick);
$nick = substr($nick, 8);
$list = &add($list, "${name}_", "${name}-", "${name}2", "${name}3");
}
if (&exist($list, $params[1])) {
@nickentry = &array($list);
while ($nickentry[0] ne $params[1]) {
push(@nickentry, shift(@nickentry));
}
push(@nickentry, shift(@nickentry));
}
&s_print($serverno, '', 'NICK', $nickentry[0]);
}
sub sn_437 {
local($serverno, $prefix, $cmd, @params) = @_;
local(@nickentry, $list, $nick, $msg);
foreach $nickname (&property($userno[$serverno], 'nick')) {
($nick, $msg) = split(/\s+/, $nickname, 2);
$list = &add($list, $nick);
}
if (!$list) {
$nick = getlogin || (getpwuid($<))[0];
$list = &list($nick);
$nick = substr($nick, 8);
$list = &add($list, "${name}_", "${name}-", "${name}2", "${name}3");
}
if (&exist($list, $params[1])) {
@nickentry = &array($list);
while ($nickentry[0] ne $params[1]) {
push(@nickentry, shift(@nickentry));
}
push(@nickentry, shift(@nickentry));
}
&s_print($serverno, '', 'NICK', $nickentry[0]);
}