]> icculus.org git repositories - divverent/nexuiz.git/blob - server/rcon2irc/joinmessage.pl
changed icon for carrying flag + psd
[divverent/nexuiz.git] / server / rcon2irc / joinmessage.pl
1 # Nexuiz 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.
3
4 # Do not use more than 5 lines here, as they will be cut off by the client.
5 my @jmtext = (
6         "Welcome to this Nexuiz server",
7         "Have fun but please behave.",
8 );
9
10 $store{plugin_joinmessage} = \@jmtext;
11
12 sub out($$@);
13
14 [ dp => q{:join:(\d+):(\d+):([^:]*):(.*)} => sub {
15         my ($id, $slot, $ip, $nick) = @_;
16         my $text = $store{plugin_joinmessage};
17
18         return 0 if ( $ip =~ m/^bot$/i );
19         return 0 if defined $store{"playerid_byslot_$slot"};
20
21         foreach ( @{ $text } ) {
22                 out dp => 0, "tell #$slot " . $_;
23         }
24         return 0;
25 } ],
26
27 [ dp => q{:part:(\d+)} => sub {
28         my ($id) = @_;
29         my $slot = $store{"playerslot_byid_$id"};
30
31         $store{"playerid_byslot_$slot"} = undef;
32         return 0;
33 } ],