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
/
auto
/
oper.plm
< prev
next >
Wrap
Text File
|
1997-11-28
|
5KB
|
148 lines
# <!-- -*- perl -*-
# $Id: oper.plm,v 2.2 1997/11/29 01:38:36 hasegawa Exp $
# copyright (c)1997 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package auto_oper;
$_ = 'auto_oper';
sub ss_privmsg {
local($serverno, $prefix, $cmd, $chan, $msg) = @_;
local($userno, $nick, $reply);
$userno = $'userno[$serverno];
$nick = &'prefix($prefix);
foreach $req (&'property($userno, 'request')) {
next unless $msg eq $req;
if (!($chan =~ /^[\#\&\+\-]/)) {
$reply = &'property($userno, 'private');
if ($reply) {
&'s_print($serverno, '', 'PRIVMSG', $nick, $reply);
foreach $cno (&'array($'clientlist)) {
next unless $'avail[$cno];
next unless $'userno[$cno] == $userno;
&'c_print($cno, &'user($cno), 'PRIVMSG', $nick, $reply);
}
}
} elsif (!&'exist($'nameslist{$userno, $chan}, "\@$'nick[$serverno]")) {
$reply = &'property($userno, 'notoper');
if ($reply) {
&'s_print($serverno, '', 'PRIVMSG', $chan, $reply);
foreach $cno (&'array($'clientlist)) {
next unless $'avail[$cno];
next unless $'userno[$cno] == $userno;
&'c_print($cno, &'user($cno), 'PRIVMSG', $chan, $reply);
}
}
} elsif (&'exist($'nameslist{$userno, $chan}, "\@$nick")) {
$reply = &'property($userno, 'oper');
if ($reply) {
&'s_print($serverno, '', 'PRIVMSG', $chan, $reply);
foreach $cno (&'array($'clientlist)) {
next unless $'avail[$cno];
next unless $'userno[$cno] == $userno;
&'c_print($cno, &'user($cno), 'PRIVMSG', $chan, $reply);
}
}
} elsif (&'exist($'nameslist{$userno, $chan}, $nick, "\+$nick")) {
$reply = &'property($userno, 'message');
if ($reply) {
&'s_print($serverno, '', 'PRIVMSG', $chan, $reply);
foreach $cno (&'array($'clientlist)) {
next unless $'avail[$cno];
next unless $'userno[$cno] == $userno;
&'c_print($cno, &'user($cno), 'PRIVMSG', $chan, $reply);
}
}
&'s_print($serverno, '', 'MODE', $chan, '+o', $nick);
} else {
$reply = &'property($userno, 'out');
if ($reply) {
&'s_print($serverno, '', 'PRIVMSG', $nick, $reply);
foreach $cno (&'array($'clientlist)) {
next unless $'avail[$cno];
next unless $'userno[$cno] == $userno;
&'c_print($cno, &'user($cno), 'PRIVMSG', $nick, $reply);
}
}
}
last;
}
return ($prefix, $cmd, $chan, $msg);
}
__END__
--><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE> auto/oper.plm </TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3> $BL>A0(B </H3>
auto/oper.plm - $BFCDj$NH/8@$r$7$??M$r%A%c%s%M%k%*%Z%l!<%?$K$9$k(B
<HR><H3> $B@bL@(B </H3>
$BFCDj$N%a%C%;!<%8$rH/8@$7$??M$r%A%c%s%M%k%*%Z%l!<%?$K$7$^$9!#(B
$B%f!<%6!<$N3NG'$O$7$F$$$J$$$N$G!"H/8@$7$??M$,C/$G$"$k$+$K$+$+$o$i$:!"(B
$B$=$N?M$r%A%c%s%M%k%*%Z%l!<%?$K$7$F$7$^$&$N$GCm0U$7$F$/$@$5$$!#(B
<HR><H3> $B%W%m%Q%F%#(B </H3>
<DL>
<DT> auto.oper.request* $B%a%C%;!<%8(B
<DD> $B%A%c%s%M%k%*%Z%l!<%?$rMW5a$9$k%a%C%;!<%8$r;XDj$7$^$9!#(B
$B$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$??M$r(B
$B%A%c%s%M%k%*%Z%l!<%?$K$7$^$9!#(B
<DT> auto.oper.message $B%a%C%;!<%8(B
<DD> $B%A%c%s%M%k%*%Z%l!<%?$rMW5a$7$??M$r<B:]$K%A%c%s%M%k%*%Z%l!<%?(B
$B$K$9$k$H$-!"$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$^$9!#(B
<DT> auto.oper.oper $B%a%C%;!<%8(B
<DD> $B%A%c%s%M%k%*%Z%l!<%?$rMW5a$7$??M$,$9$G$K%A%c%s%M%k%*%Z%l!<%?(B
$B$@$C$?>l9g!"$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$^$9!#(B
<DT> auto.oper.notoper $B%a%C%;!<%8(B
<DD> $B<+J,$,%A%c%s%M%k%*%Z%l!<%?$G$J$$$?$a$K(B
$BB>$N?M$r%A%c%s%M%k%*%Z%l!<%?$K$G$-$J$$$H$-!"(B
$B$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$^$9!#(B
<DT> auto.oper.private $B%a%C%;!<%8(B
<DD> $B%A%c%s%M%k%*%Z%l!<%?$NMW5a$,%A%c%s%M%k$KBP$7$F$G$O$J$/!"(B
$B<+J,$KBP$7$F$5$l$?$H$-!"$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$^$9!#(B
<DT> auto.oper.out $B%a%C%;!<%8(B
<DD> $B%A%c%s%M%k%*%Z%l!<%?$NMW5a$,%A%c%s%M%k$N30$+$iH/8@$5$l$?$H$-!"(B
$B$3$3$G;XDj$7$?%a%C%;!<%8$rH/8@$7$^$9!#(B
</DL>
<HR><H3> $B@_DjNc(B </H3>
<PRE>
+ auto/oper.plm
auto.oper.request: $B$W$i$`$J$k$H(B
auto.oper.message: $B$O!A$$!y(B
auto.oper.oper: $B$b$&$J$k$H;}$C$F$^$9$h!#(B
auto.oper.notoper: $B$4$a$s$J$5$$!#$J$k$H;}$C$F$J$$$s$G$9!#(B
auto.oper.private: $B$J$k$H$,$[$7$$%A%c%s%M%k$G8@$C$F$/$@$5$$$M!#(B
auto.oper.out: $B$($C!"$I$3$K$$$k$s$G$9$+(B?
</PRE>
$B!V$W$i$`$J$k$H!W$HH/8@$7$??M$r%A%c%s%M%k%*%Z%l!<%?$K$7$^$9!#(B
$B2?$i$+$NM}M3$G%A%c%s%M%k%*%Z%l!<%?$K$G$-$J$$$H$-$O!"(B
$B$=$l$>$l$NM}M3$K1~$8$?%a%C%;!<%8$rH/8@$7$^$9!#(B
<PRE>
+ auto/oper.plm
auto.oper.request: $B$J$k$H(B
auto.oper.request: $B$J$k$H$/$l(B
auto.oper.request: $B$J$k$H$/$@$5$$(B
auto.oper.request: $B$J$k$H$A$g$&$@$$(B
</PRE>
$B%A%c%s%M%k%*%Z%l!<%?$NMW5a$,(B4$B<oN`$"$kNc$G$9!#(B
$B$3$N$&$A$N$I$l$+$rH/8@$7$??M$r%A%c%s%M%k%*%Z%l!<%?$K$7$^$9!#(B
$B2?$i$+$NM}M3$G%A%c%s%M%k%*%Z%l!<%?$K$G$-$J$$$H$7$F$b2?$bH/8@$7$^$;$s!#(B
</BODY></HTML>