home *** CD-ROM | disk | FTP | other *** search
/ ftp.madoka.org / 2014.12.ftp.madoka.org.tar / ftp.madoka.org / pub / plum / 1.x / plum10b9.lzh / plum10b9 / fastoper.plm < prev    next >
Text File  |  1997-06-30  |  1KB  |  41 lines

  1. package fastoper;
  2.  
  3. $_ = 'fastoper';
  4.  
  5. sub ss_join {
  6.   local($serverno, $prefix, $cmd, $chan) = @_;
  7.   local($userno, $nick, $regex);
  8.   $userno = $'userno[$serverno];
  9.   $nick = &'prefix($prefix);
  10.   if ($nick ne $'nick[$serverno]) {
  11.     if (&'exist($'nameslist{$userno, $chan} || $;, "\@$'nick[$serverno]")) {
  12.       if (&'exist($splitlist{$userno, $chan} || $;, $prefix)) {
  13.         $splitlist{$userno, $chan} = &'remove($splitlist{$userno, $chan}, $prefix);
  14.       } else {
  15.         foreach $newoper (&'property($userno, 'newoper')) {
  16.           $regex = &'regex($newoper);
  17.           next unless $prefix =~ /$regex/i;
  18.           &'s_print($serverno, '', 'MODE', $chan, '+o', $nick);
  19.           last;
  20.         }
  21.       }
  22.     }
  23.   }
  24.   return ($prefix, $cmd, $chan);
  25. }
  26.  
  27. sub ss_quit {
  28.   local($serverno, $prefix, $cmd, $msg) = @_;
  29.   local($nick, $userno);
  30.   $userno = $'userno[$serverno];
  31.   $nick = (&'prefix($prefix))[0];
  32.   if ($msg =~ /[\w\d\-]+(\.[\w\d\-]+)+ [\w\d\-\*]+(\.[\w\d\-]+)+/) {
  33.     foreach $chan (&'array($'chanlist[$userno])) {
  34.       next unless &'exist($'nameslist{$userno, $chan}, "\@$nick");
  35.       $splitlist{$userno, $chan} = &'add($splitlist{$userno, $chan} || $;, $prefix);
  36.     }
  37.   }
  38.   return ($prefix, $cmd, $msg);
  39. }
  40.  
  41.