mirror of
https://tildegit.org/Sunblade/Xenia.git
synced 2026-01-24 12:20:19 +00:00
Compare commits
4 Commits
6fe1ded6fa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
faa4ee5461 | ||
|
|
a2dbd0bfb4 | ||
|
|
d54a896119 | ||
|
|
db329dfa42 |
@@ -3,3 +3,5 @@
|
||||
Script for Irssi.
|
||||
|
||||
Functions for Xenia, my IRC bot on irc.newnet.net
|
||||
|
||||
At some point i plan port it to Limnoria or Eggdrop.
|
||||
18
xenia.pl
18
xenia.pl
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/perl use strict;
|
||||
use vars qw($VERSION %IRSSI);
|
||||
|
||||
use Irssi;
|
||||
|
||||
$VERSION = '1.00';
|
||||
%IRSSI = (
|
||||
authors => 'Sunblade',
|
||||
@@ -15,22 +15,22 @@ sub event_privmsg {
|
||||
# $data = "nick/#channel :text"
|
||||
my ($server, $data, $nick, $address) = @_;
|
||||
my ($target, $text) = split(/ :/, $data, 2);
|
||||
if ($target == '#Enigma') {
|
||||
if ($text eq '!try') {
|
||||
if (lc($target) eq '#enigma') {
|
||||
if (lc($text) eq '!try') {
|
||||
try($nick, $target, $data, $server, $text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub try {
|
||||
my ($nick, $target, $data, $server, $text) = @_;
|
||||
my $tr = int(rand(1000000));
|
||||
if ($tr != 738056) {
|
||||
$server->command("MSG $target $nick you have failed to find the awarded ticket - r: $tr");
|
||||
my ($nick, $target, $data, $server, $text) = @_;
|
||||
my $tr = int(rand(1000000));
|
||||
if ($tr != 738056) {
|
||||
$server->command("MSG $target $nick you have failed to find the awarded ticket - Found: #$tr");
|
||||
}
|
||||
else {
|
||||
$server->command("MSG $target $nick you have FOUND the awarded ticket...UNBELIEVABLE!");
|
||||
}
|
||||
$server->command("MSG $target $nick you have FOUND the awarded ticket #$tr ... UNBELIEVABLE!");
|
||||
}
|
||||
# Irssi::print("Debug: $target $nick - $data / $server / $text");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user