Something like this?
my $sock = IO::Socket::INET->new('localhost:6669'); print "pass this_is_the_passwd\n"; print $sock "pass this_is_the_pw\r"; print "nick whateverhack\n"; print $sock "nick whateverhack\r";
later on I always to stuff like this to parse messages people send (here p.e. all messages from hitty:
LOOP: while (<$sock>) { $line = $_; if ( $line =~ / 366 / ) { print "$line\r"; } if ( $line =~ /PRIVMSG/ ) { $line =~ /^:(.*)!(.*) PRIVMSG (.*) :(.*?)--(.*).$/; $from = $1; $room = $3; $cam = $4; if ($cam eq "") { next LOOP; } $comment = $5; if ( $cam =~ /hitty/ ) { print "<$from\@$cam> $comment\n"; } } }
In reply to Re^3: A Quick OO Module for parsing lines from an IRC connection
by gargle
in thread A Quick OO Module for parsing lines from an IRC connection
by SoupNazi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |