home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.madoka.org
/
2014.12.ftp.madoka.org.tar
/
ftp.madoka.org
/
pub
/
plum
/
1.x
/
plum10b8.lzh
/
plum10b8
/
newoper.plm
< prev
next >
Wrap
Text File
|
1997-06-25
|
1KB
|
41 lines
package newoper;
$_ = 'newoper';
sub ss_join {
local($serverno, $prefix, $cmd, $chan) = @_;
local($nick, $regex, $userno);
$nick = (&'prefix($prefix))[0];
$userno = $'userno[$serverno];
if (&'exist($'nameslist{$userno, $chan} || $;, "\@$'nick[$serverno]")) {
if ($nick ne $'nick[$serverno]) {
if (&'exist($splitlist{$userno, $chan} || $;, $prefix)) {
$splitlist{$userno, $chan} = &'remove($splitlist{$userno, $chan}, $prefix);
} else {
foreach $newoper (&'property($userno, 'newoper')) {
$regex = &'regex($newoper);
next unless $prefix =~ /$regex/i;
&'s_print($serverno, '', 'MODE', $chan, '+o', $nick);
last;
}
}
}
}
return ($prefix, $cmd, $chan);
}
sub ss_quit {
local($serverno, $prefix, $cmd, $msg) = @_;
local($nick, $userno);
$nick = (&'prefix($prefix))[0];
$userno = $'userno[$serverno];
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);
}