1 # Xonotic rcon2irc plugin by Merlijn Hofstra licensed under GPL - joinmessage.pl
2 # Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
4 # Do not use more than 5 lines here, as they will be cut off by the client.
6 "Welcome to this Xonotic server",
7 "Have fun but please behave.",
10 $store{plugin_joinmessage} = \@jmtext;
14 [ dp => q{:join:(\d+):(\d+):([^:]*):(.*)} => sub {
15 my ($id, $slot, $ip, $nick) = @_;
16 my $text = $store{plugin_joinmessage};
18 return 0 if ( $ip =~ m/^bot$/i );
19 return 0 if defined $store{"playerid_byslot_$slot"};
21 foreach ( @{ $text } ) {
22 out dp => 0, "tell #$slot " . $_;
27 [ dp => q{:part:(\d+)} => sub {
29 my $slot = $store{"playerslot_byid_$id"};
31 $store{"playerid_byslot_$slot"} = undef;