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
/
fastoper.plm
< prev
next >
Wrap
Text File
|
1997-09-25
|
1KB
|
42 lines
package fastoper;
$_ = 'fastoper';
sub ss_join {
local($serverno, $prefix, $cmd, $chan) = @_;
local($userno, $nick, $regex, $name, $mode);
$userno = $'userno[$serverno];
$nick = &'prefix($prefix);
($name, $mode) = (split(/\cG/, $chan), '');
if ($nick ne $'nick[$serverno] && $mode !~ /o/i) {
if (&'exist($'nameslist{$userno, $name}, "\@$'nick[$serverno]")) {
if (&'exist($splitlist{$userno, $name}, $prefix)) {
$splitlist{$userno, $name} = &'remove($splitlist{$userno, $name}, $prefix);
} else {
foreach $newoper (&'property($userno, 'newoper')) {
$regex = &'regex($newoper);
next unless $prefix =~ /$regex/i;
&'s_print($serverno, '', 'MODE', $name, '+o', $nick);
last;
}
}
}
}
return ($prefix, $cmd, $chan);
}
sub ss_quit {
local($serverno, $prefix, $cmd, $msg) = @_;
local($nick, $userno);
$userno = $'userno[$serverno];
$nick = (&'prefix($prefix))[0];
if ($msg =~ /[\w\d\-]+(\.[\w\d\-]+)+ [\w\d\-\*]+(\.[\w\d\-]+)+/) {
foreach $chan (&'array($'chanlist[$userno])) {
next unless &'exist($'nameslist{$userno, $chan}, "\@$nick");
$splitlist{$userno, $chan} = &'add($splitlist{$userno, $chan}, $prefix);
}
}
return ($prefix, $cmd, $msg);
}