Compare commits

..

No commits in common. "d54a896119f769dc49b94ffc4fbde3cd01efa39e" and "6fe1ded6fa46ac98d5b2643945ec5a0f1622c13e" have entirely different histories.

1 changed files with 37 additions and 37 deletions

View File

@ -1,37 +1,37 @@
#!/usr/bin/perl use strict; #!/usr/bin/perl use strict;
use vars qw($VERSION %IRSSI); use vars qw($VERSION %IRSSI);
use Irssi;
use Irssi;
$VERSION = '1.00'; $VERSION = '1.00';
%IRSSI = ( %IRSSI = (
authors => 'Sunblade', authors => 'Sunblade',
contact => 'sunblade@tilde.club', contact => 'sunblade@tilde.club',
name => 'Xenia', name => 'Xenia',
description => 'Functions for Xenia, my IRC bot on irc.newnet.net', description => 'Functions for Xenia, my IRC bot on irc.newnet.net',
license => 'MIT', license => 'MIT',
); );
sub event_privmsg { sub event_privmsg {
# $data = "nick/#channel :text" # $data = "nick/#channel :text"
my ($server, $data, $nick, $address) = @_; my ($server, $data, $nick, $address) = @_;
my ($target, $text) = split(/ :/, $data, 2); my ($target, $text) = split(/ :/, $data, 2);
if ($target eq '#Enigma') { if ($target == '#Enigma') {
if ($text eq '!try') { if ($text eq '!try') {
try($nick, $target, $data, $server, $text); try($nick, $target, $data, $server, $text);
} }
} }
} }
sub try { sub try {
my ($nick, $target, $data, $server, $text) = @_; my ($nick, $target, $data, $server, $text) = @_;
my $tr = int(rand(1000000)); my $tr = int(rand(1000000));
if ($tr != 738056) { if ($tr != 738056) {
$server->command("MSG $target $nick you have failed to find the awarded ticket - Found: #$tr"); $server->command("MSG $target $nick you have failed to find the awarded ticket - r: $tr");
} }
else { else {
$server->command("MSG $target $nick you have FOUND the awarded ticket #$tr ... UNBELIEVABLE!"); $server->command("MSG $target $nick you have FOUND the awarded ticket...UNBELIEVABLE!");
} }
# Irssi::print("Debug: $target $nick - $data / $server / $text"); # Irssi::print("Debug: $target $nick - $data / $server / $text");
} }
Irssi::signal_add("event privmsg", "event_privmsg") Irssi::signal_add("event privmsg", "event_privmsg")