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
/
channel
/
alias.plm
Wrap
Text File
|
1997-11-16
|
4KB
|
164 lines
# <!-- -*- perl -*-
# $Id: alias.plm,v 2.1 1997/11/17 00:01:27 hasegawa Exp $
# copyright (c)1997 pupu_j <hasegawa@agusa.nuie.nagoya-u.ac.jp>
package channel_alias;
$_ = 'channel_alias';
sub cs_invite {
local($clientno, $prefix, $cmd, $nick, $chan) = @_;
return () unless $nick;
return () unless $chan;
return ($prefix, $cmd, $nick, &'real($chan));
}
sub cs_join {
local($clientno, $prefix, $cmd, $chans, $keys) = @_;
local(@chan) = ();
return () unless $chans;
foreach $chan (split(/\,/, $chans)) {
push(@chan, &'real($chan));
}
if (defined($keys)) {
return ($prefix, $cmd, join(',', @chan), $keys);
} else {
return ($prefix, $cmd, join(',', @chan));
}
}
sub cs_kick {
local($clientno, $prefix, $cmd, $chans, $nicks, $msg) = @_;
local(@chan) = ();
return () unless $chans;
return () unless $nicks;
foreach $chan (split(/\,/, $chans)) {
push(@chan, &'real($chan));
}
if (defined($msg)) {
return ($prefix, $cmd, join(',', @chan), $nicks, $msg);
} else {
return ($prefix, $cmd, join(',', @chan), $nicks);
}
}
sub cs_list {
local($clientno, $prefix, $cmd, $chans, $server) = @_;
local(@chan) = ();
if (defined($chans)) {
foreach $chan (split(/\,/, $chans)) {
push(@chan, &'real($chan));
}
if (defined($server)) {
return ($prefix, $cmd, join(',', @chan), $server);
} else {
return ($prefix, $cmd, join(',', @chan));
}
} else {
return ($prefix, $cmd);
}
}
sub cs_mode {
local($clientno, $prefix, $cmd, $chan, @modes) = @_;
return () unless $chan;
if (defined(@modes)) {
return ($prefix, $cmd, &'real($chan), @modes);
} else {
return ($prefix, $cmd, &'real($chan));
}
}
sub cs_names {
local($clientno, $prefix, $cmd, $chans) = @_;
local(@chan) = ();
if (defined($chans)) {
foreach $chan (split(/\,/, $chans)) {
push(@chan, &'real($chan));
}
return ($prefix, $cmd, join(',', @chan));
} else {
return ($prefix, $cmd);
}
}
sub cs_notice {
local($clientno, $prefix, $cmd, $chan, $msg) = @_;
return () unless $chan;
return unless defined($msg);
return ($prefix, $cmd, &'real($chan), $msg);
}
sub cs_part {
local($clientno, $prefix, $cmd, $chan, $msg) = @_;
return () unless $chan;
if (defined($msg)) {
return ($prefix, $cmd, &'real($chan), $msg);
} else {
return ($prefix, $cmd, &'real($chan));
}
}
sub cs_privmsg {
local($clientno, $prefix, $cmd, $chan, $msg) = @_;
return () unless $chan;
return unless defined($msg);
return ($prefix, $cmd, &'real($chan), $msg);
}
sub cs_topic {
local($clientno, $prefix, $cmd, $chan, $topic) = @_;
return () unless $chan;
if (defined($topic)) {
return ($prefix, $cmd, &'real($chan), $topic);
} else {
return ($prefix, $cmd, &'real($chan));
}
}
sub cs_who {
local($clientno, $prefix, $cmd, $chan, $mask) = @_;
if (defined($chan)) {
if (defined($mask)) {
return ($prefix, $cmd, &'real($chan), $mask);
} else {
return ($prefix, $cmd, &'real($chan));
}
} else {
return ($prefix, $cmd);
}
}
__END__
--><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE> channel/alias.plm </TITLE></HEAD><BODY>
$B%*%s%i%$%s%I%-%e%a%s%H(B
<HR><H3> $BL>A0(B </H3>
channel/alias.plm - $B%A%c%s%M%k%(%$%j%"%9$rJQ49$9$k(B
<HR><H3> $B@bL@(B </H3>
IRC$B$N%3%^%s%I$rAw$k$H$-$K!"%A%c%s%M%k%(%$%j%"%9$r;H$($k$h$&$K$7$^$9!#(B
$B%A%c%s%M%kL>$N;XDj$,!V(B%$B%A%c%s%M%kL>!W$H$$$&7A<0$@$C$?>l9g$K!"(B
$B$=$l$r!V(B#$B%A%c%s%M%kL>(B:*.jp$B!W$H$$$&7A<0$KJQ49$7$FAw$j$^$9!#(B
<HR><H3> $B%W%m%Q%F%#(B </H3>
<DL>
</DL>
<HR><H3> $B@_DjNc(B </H3>
<PRE>
+ channel/alias.plm
</PRE>
</BODY></HTML>