home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
2.x
/
plum2_15_2.lzh
/
module
/
user
/
ignore.plm
Wrap
Text File
|
1997-12-13
|
3KB
|
111 lines
# <!-- -*- perl -*-
# $Id: ignore.plm,v 2.2 1997/12/13 13:14:08 hasegawa Exp $
# copyright (c)1997 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package user_ignore;
$MASK = &'list('privmsg', 'notice');
$_ = 'user_ignore';
sub ss_privmsg {
local($serverno, $prefix, $cmd, $chan, $msg) = @_;
local($userno, $regex);
$userno = $'userno[$serverno];
if (&maskcommand($userno, $cmd)) {
foreach $not (&'property($userno, 'not')) {
$regex = &'regex($not);
return ($prefix, $cmd, $chan, $msg) if $prefix =~ /$regex/i;
}
foreach $user (&'property($userno, 'user')) {
$regex = &'regex($user);
return () if $prefix =~ /$regex/i;
}
}
return ($prefix, $cmd, $chan, $msg);
}
sub ss_notice {
local($serverno, $prefix, $cmd, $chan, $msg) = @_;
local($userno, $regex);
$userno = $'userno[$serverno];
if (&maskcommand($userno, $cmd)) {
foreach $not (&'property($userno, 'not')) {
$regex = &'regex($not);
return ($prefix, $cmd, $chan, $msg) if $prefix =~ /$regex/i;
}
foreach $user (&'property($userno, 'user')) {
$regex = &'regex($user);
return () if $prefix =~ /$regex/i;
}
}
return ($prefix, $cmd, $chan, $msg);
}
sub maskcommand {
local($userno, $cmd) = @_;
local($mask);
$mask = &'property($userno, 'mask');
if (defined($mask)) {
$mask = '';
foreach $list (&'property($userno, 'mask')) {
$mask = &'add($mask, split(/\,/, "\L$list\U"));
}
} else {
$mask = $MASK;
}
return &'exist($mask, "\L$cmd\E");
}
__END__
--><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE> user/ignore.plm </TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3> $BL>A0(B </H3>
user/ignore.plm - $B;XDj$7$?%f!<%6$NH/8@$rL5;k$9$k(B
<HR><H3> $B@bL@(B </H3>
$B;XDj$7$?%f!<%6$NH/8@$r%/%i%$%"%s%H$KAw$i$J$$$h$&$K$7$^$9!#(B
<HR><H3> $B%W%m%Q%F%#(B </H3>
<DL>
<DT> user.ignore.user* $B%f!<%6%^%9%/(B
<DD> $B$3$3$G;XDj$5$l$?%f!<%6$NH/8@$OL5;k$7!"(B
$B%/%i%$%"%s%H$KAw$i$J$$$h$&$K$7$^$9!#(B
<DT> user.ignore.not* $B%f!<%6%^%9%/(B
<DD> $B$3$3$G;XDj$5$l$?%f!<%6$NH/8@$OL5;k$7$^$;$s!#(B
$B$3$N;XDj$O!V(Buser.ignore.user$B!W$h$jM%@h$5$l$^$9!#(B
<DT> user.ignore.mask* ({privmsg|notice})
<DD> $BL5;k$9$k%a%C%;!<%8$N<oN`$r;XDj$7$^$9!#(B
$B%G%U%)%k%H$G$O(BPRIVMSG$B$H(BNOTICE$B$NN>J}$rL5;k$7$^$9!#(B
</DL>
<HR><H3> $B@_DjNc(B </H3>
<PRE>
+ user/ignore.plm
user.ignore.user: *!*@*
user.ignore.not: *!*@*.jp
</PRE>
*!*@*.jp$B$K%^%C%A$7$J$$?M$NH/8@$r$9$Y$FL5;k$7$^$9!#(B
<PRE>
+ user/ignore.plm
user.ignore.user: dummy!*@*
user.ignore.mask: privmsg
</PRE>
dummy$B$H$$$&%K%C%/%M!<%`$N%f!<%6$N(BPRIVMSG$B$G$NH/8@$rL5;k$7$^$9!#(B
</BODY></HTML>