home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
2.x
/
plum2_28_2.lzh
/
module
/
ctcp
/
part.plm
< prev
next >
Wrap
Text File
|
1998-10-15
|
2KB
|
101 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- $_ if 0; # -*- perl -*-
# $Id: part.plm,v 2.10 1998/07/31 09:42:30 hasegawa Exp $
# copyright (c)1997-1998 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package ctcp_part;
$CLIENTINFO = 'PART';
$_ = 'ctcp_part';
sub cpss_part {
local($serverno, $prefix, $cmd, @params) = @_;
local($userno, $regex, $nick);
$nick = &'prefix($prefix);
$userno = $'userno[$serverno];
if (&checkmask($userno, $prefix, $params[1])) {
&'s_print($serverno, '', 'PART', &'real($params[1]), $nick);
return ();
}
return ($prefix, $cmd, @params);
}
sub checkmask {
local($userno, $prefix, $chan) = @_;
local($user, $chlist, $list);
foreach $mask (&'property($userno, 'mask')) {
($user, $chlist) = split(/\s+/, $mask);
$list = '';
foreach $vchan (split(/\,/, $chlist || '')) {
$list = &'add($list, &'real($vchan));
}
if ($chan =~ /^[\#\&\+]/) {
next unless (!$list || &'exist($list, $chan));
} else {
next unless (!$list || &'exist($list, '*'));
}
if ($user =~ /^\-/) {
$regex = &'regex(substr($user, 1));
return 0 if $prefix =~ /$regex/i;
}
if ($user =~ /^\+/) {
$regex = &'regex(substr($user, 1));
} else {
$regex = &'regex($user);
}
return 1 if $prefix =~ /$regex/i;
}
return 0;
}
__END__
--><HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-2022-JP">
<LINK REV="made" HREF="mailto:hasegawa@agusa.nuie.nagoya-u.ac.jp">
<TITLE>ctcp/part.plm</TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3>$BL>A0(B</H3>
ctcp/part.plm - CTCP PART$B$KH?1~$7$F%A%c%s%M%k$rH4$1$k(B
<HR><H3>$B@bL@(B</H3>
CTCP PART$B$,Aw$i$l$F$-$?$H$-!"(B
$B$=$l$KH?1~$7$F;XDj$5$l$?%A%c%s%M%k$rH4$1$^$9!#(B
<HR><H3>$B%W%m%Q%F%#(B</H3>
<DL>
<DT> ctcp.part.mask* $B%f!<%6%^%9%/(B [($B%A%c%s%M%kL>(B)]
</DT>
<DD> CTCP PART$B$,Aw$i$l$F$-$?$H$-!"Aw$j<g$*$h$S%A%c%s%M%k$,(B
$B$3$3$G;XDj$5$l$?$b$N$K%^%C%A$7$?$i!"$=$N%A%c%s%M%k$rH4$1$^$9!#(B
</DD>
</DL>
<HR><H3>$B@_DjNc(B</H3>
<PRE>
+ ctcp/part.plm
ctcp.part.mask: *!*@* #$B$^$I$+(B
</PRE>
$B!V(B#$B$^$I$+!W$rH4$1$k$h$&$K(BCTCP PART$B$,Aw$i$l$F$-$?>l9g!"(B
$B!V(B#$B$^$I$+!W$+$iH4$1$^$9!#(B
<PRE>
+ ctcp/part.plm
ctcp.part.mask: *!*@*.jp
</PRE>
CTCP PART$B$,Aw$i$l$F$-$?$H$-!"$=$l$rAw$C$??M$,!V(B*!*@*.jp$B!W$K%^%C%A$7$?$i!"(B
$B$=$N%A%c%s%M%k$rH4$1$^$9!#(B
</BODY></HTML>