9 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use IO::Socket::INET;
my $sock = new IO::Socket::INET(
Proto => "tcp",
PeerPort => 6667,
PeerAddr => 'irc.gamesurge.net';
) or die "$!";
print $sock "user hallo da bin ich\n";
print $sock "nick nurmaltesten\n";
print $sock "join #channel\n";
print $sock "privmsg #channel :Hallo Leute\n";
sleep 5;
print $sock "quit\n";
1
2
3
4
my $kernel = POE::Component::IRC->new('my client');
$kernel->post('my client', 'register', qw(connected msg public cdcc cping));
# now the code goes on...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##########
my $nick = 'DerTester';
my $server = 'irc.gamesurge.net';
my $port = '6667';
my $channel = '#channel';
my $ircname = 'Bla bla bla';
my $username = 'Username';
##########
##########
POE::Component::IRC->new('my client') or die "Oh noooo! $!";
my $kernel->post('my client', 'register', qw(connected msg public cdcc cping));
$kernel->post('my client', 'connect',
{ Nick => "$nick",
Server => "$server",
Port => "$port",
Username => "$username",
Ircname => "$ircname" } );
$kernel->post( 'my client', 'join', "$channel" );
$kernel->post( 'my client', 'privmsg', "$channel", 'Pull my finger!' );
##########
QuoteCan't call method "post" on an undefined value at irc.pl line 25.
POE::Kernel's run() methode was never called.
9 Einträge, 1 Seite |