Boucherot::Infoline - A class for analysing IRC lines.
use Boucherot::Infoline;
my $infoline=new Boucherot::Infoline(
':CatpainFlam!~cflam@cyberlab.org PRIVMSG #Terre :Baaaaaa!'
);
print $infoline->adr; # '~cflam@cyberlab.org' print $infoline->evt; # 'PRIVMSG' print $infoline->Id; # '#Terre' print $infoline->id; # '#terre' print $infoline->msg; # 'Baaaaaa!' print $infoline->chan; # '#Terre' print $infoline->nick; # 'CapitainFlam'
$infoline=new Boucherot::Infoline(
':CatpainFlam!~cflam@cyberlab.org MODE #Terre +o Mala'
);
print $infoline->adr; # '~cflam@cyberlab.org' print $infoline->evt; # 'MODE' print $infoline->Id; # '#Terre' print $infoline->id; # '#terre' print $infoline->msg; # '+o Mala' print $infoline->chan; # '#Terre' print $infoline->nick; # 'CapitainFlam'
$infoline=new Boucherot::Infoline(
':irc.homelien.no 252 Boucherot 203 :IRC Operators online'
);
print $infoline->srv; # 'irc.homelien.no'
print $infoline->evt; # '252'
print $infoline->msg; # 'IRC Operators online'
print $infoline->mynick; # 'Boucherot'
$infoline->args; # return [ '203', ':IRC Operators online' ]
print $infoline->args->[0]; # '203'
print $infoline->args->[1]; # ':IRC Operators online'
This class has the ability to analyse a line comming from the IRC server.
The class override the conversion to string's operator, so you can use a Boucherot::Infoline instance as a line itself.
class Boucherot::Infoline
Attributs:
+ adr + args + chan + evt + Id + id + line + msg + mynick + nick + srv + time + who
Methods:
Constructor
+$ new ( ) : Boucherot::Infoline + formatline ( ) : SCALAR
+$ new ( ) : Boucherot::Infoline
Create a new infoline.
+ formatline ( ) : SCALAR
Format the infoline to a string (return the original line). This method is called each time an Infoline instance is used in a string context.
This class was written by Arthibus Gissehel <gissehel@vachefolle.com> in 1999/2001.
This class is part of the Boucherot project.