Compare commits

..

4 Commits

Author SHA1 Message Date
Sunblade
faa4ee5461 Update README.md 2025-11-26 19:11:57 +00:00
Sunblade
a2dbd0bfb4 Update xenia.pl 2025-10-22 18:41:16 +00:00
Sunblade
d54a896119 Update xenia.pl 2025-10-19 16:00:50 +00:00
Sunblade
db329dfa42 Update xenia.pl 2025-10-19 15:15:06 +00:00
2 changed files with 40 additions and 38 deletions

View File

@@ -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.

View File

@@ -1,7 +1,7 @@
#!/usr/bin/perl use strict;
use vars qw($VERSION %IRSSI);
use Irssi;
$VERSION = '1.00';
%IRSSI = (
authors => 'Sunblade',
@@ -15,8 +15,8 @@ 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);
}
}
@@ -26,10 +26,10 @@ 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");
$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");
}