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
/
makeoper.plm
< prev
next >
Wrap
Text File
|
1997-09-25
|
2KB
|
60 lines
package makeoper;
$_ = 'makeoper';
sub ss_join {
local($serverno, $prefix, $cmd, $chan) = @_;
local($userno, $nick, $name, $mode);
$userno = $'userno[$serverno];
$nick = &'prefix($prefix);
($name, $mode) = (split(/\cG/, $chan), '');
if ($nick eq $'nick[$serverno] && $mode !~ /o/i) {
if ($'nameslist{$userno, $name} eq "$;$nick$;" || $'nameslist{$userno, $name} eq "$;+$nick$;") {
&'s_print($serverno, '', 'PART', $name);
&'s_print($serverno, '', 'JOIN', $name);
}
}
return ($prefix, $cmd, $chan);
}
sub ss_kick {
local($serverno, $prefix, $cmd, $chan, $who, $msg) = @_;
local($userno) = $'userno[$serverno];
if ($who ne $'nick[$serverno]) {
if ($'nameslist{$userno, $chan} eq "$;$'nick[$serverno]$;" || $'nameslist{$userno, $chan} eq "$;+$'nick[$serverno]$;") {
&'s_print($serverno, '', 'PART', $chan);
&'s_print($serverno, '', 'JOIN', $chan);
}
}
return ($prefix, $cmd, $chan, $who, $msg);
}
sub ss_part {
local($serverno, $prefix, $cmd, $chan, $msg) = @_;
local($userno, $nick);
$userno = $'userno[$serverno];
$nick = &'prefix($prefix);
if ($nick ne $'nick[$serverno]) {
if ($'nameslist{$userno, $chan} eq "$;$'nick[$serverno]$;" || $'nameslist{$userno, $chan} eq "$;+$'nick[$serverno]$;") {
&'s_print($serverno, '', 'PART', $chan);
&'s_print($serverno, '', 'JOIN', $chan);
}
}
return ($prefix, $cmd, $chan, $msg);
}
sub ss_quit {
local($serverno, $prefix, $cmd, $msg) = @_;
local($userno, $nick);
$userno = $'userno[$serverno];
$nick = &'prefix($prefix);
foreach $chan (&'array($'chanlist[$userno])) {
if ($'nameslist{$userno, $chan} eq "$;$'nick[$serverno]$;" || $'nameslist{$userno, $chan} eq "$;+$'nick[$serverno]$;") {
&'s_print($serverno, '', 'PART', $chan);
&'s_print($serverno, '', 'JOIN', $chan);
}
}
return ($prefix, $cmd, $msg);
}