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
/
channel
/
join
/
invite.plm
< prev
next >
Wrap
Text File
|
1998-10-15
|
3KB
|
110 lines
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- $_ if 0; # -*- perl -*-
# $Id: invite.plm,v 2.9 1998/07/31 09:46:17 hasegawa Exp $
# copyright (c)1997-1998 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package channel_join_invite;
$_ = 'channel_join_invite';
sub ss_invite {
local($serverno, $prefix, $cmd, @params) = @_;
local($userno, $regex, $user, $list);
$userno = $'userno[$serverno];
if (&checkmask($userno, $prefix, $params[1])) {
&'s_print($serverno, '', 'JOIN', $params[1]);
}
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>channel/join/invite.plm</TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3>$BL>A0(B</H3>
channel/join/invite.plm - $B>7BT$5$l$?%A%c%s%M%k$KF~$k(B
<HR><H3>$B@bL@(B</H3>
$B%A%c%s%M%k$K>7BT$5$l$?$H$-$K!"$=$N%A%c%s%M%k$KF~$j$^$9!#(B
<HR><H3>$B%W%m%Q%F%#(B</H3>
<DL>
<DT> channel.join.invite.mask* $B%f!<%6%^%9%/(B [($B%A%c%s%M%kL>(B)]
</DT>
<DD> $B>7BT$7$??M!"$*$h$S%A%c%s%M%k$,$3$3$G;XDj$5$l$?(B
$B$b$N$K%^%C%A$7$?>l9g!"$=$N%A%c%s%M%k$KF~$j$^$9!#(B
</DD>
</DL>
<HR><H3>$B@_DjNc(B</H3>
<PRE>
+ channel/join/invite.plm
channel.join.invite.mask: *!*@* #$B$^$I$+(B:*.jp
channel.join.invite.mask: *!*@* #$B$W$i$`(B
</PRE>
$B>7BT$5$l$?%A%c%s%M%k$,!V(B#$B$^$I$+(B:*.jp$B!W$+!V(B#$B$W$i$`!W$@$C$?>l9g$K!"(B
$B$=$N%A%c%s%M%k$KF~$j$^$9!#(B
<PRE>
+ channel/join/invite.plm
channel.join.invite.mask: pupu_j!*@*.jp
channel.join.invite.mask: pupu_d!*@*.jp %$B$^$I$+(B
</PRE>
$B$^$?!">7BT$7$??M$,!V(Bpupu_j!*@*.jp$B!W$K%^%C%A$7$?>l9g!"(B
$B$=$N%A%c%s%M%k$KF~$j$^$9!#$^$?>7BT$5$l$??M$,!V(Bpupu_d!*@**.jp$B!W(B
$B$K%^%C%A$7!"%A%c%s%M%k$,!V(B%$B$^$I$+!W$@$C$?>l9g!"!V(B%$B$^$I$+!W$K(B
$BF~$j$^$9!#(B
<PRE>
+ channel/join/invite.plm
channel.join.invite.mask: -*!*@* #$B$W$i$`(B
channel.join.invite.mask: *!*@*
</PRE>
$B>7BT$5$l$?%A%c%s%M%k$,!V(B#$B$W$i$`!W$@$C$?>l9g$O!"(B
$B!V(B#$B$W$i$`!W$K$OF~$j$^$;$s!#$=$l0J30$N%A%c%s%M%k$@$C$?>l9g$O!"(B
$B$=$N%A%c%s%M%k$KF~$j$^$9!#(B
</BODY></HTML>