summaryrefslogtreecommitdiffstats
path: root/scripts/autoversion.pl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:19:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:19:02 +0000
commit03929dac2a29664878d2c971648a4fe1fb698462 (patch)
tree02c5e2b3e006234aa29545f7a93a1ce01b291a8b /scripts/autoversion.pl
parentInitial commit. (diff)
downloadirssi-scripts-03929dac2a29664878d2c971648a4fe1fb698462.tar.xz
irssi-scripts-03929dac2a29664878d2c971648a4fe1fb698462.zip
Adding upstream version 20231031.upstream/20231031upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--scripts/autoversion.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/autoversion.pl b/scripts/autoversion.pl
new file mode 100644
index 0000000..47d4475
--- /dev/null
+++ b/scripts/autoversion.pl
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+use strict;
+use vars qw($VERSION %IRSSI);
+
+$VERSION = "0.0.1";
+%IRSSI = (
+ authors => "Christian 'mordeth' Weber",
+ contact => "chris\@mac.ruhr.de",
+ name => "autoversion",
+ description => "Auto-CTCP Verison on every joining nick",
+ license => "GPLv2",
+ url => "",
+ changed => "20020821",
+ modules => ""
+);
+
+sub event_message_join ($$$$) {
+ my ($server, $channel, $nick, $address) = @_;
+ if (lc($channel) eq lc(Irssi::active_win()->{active}->{name})) {
+ $server->command("ctcp $nick VERSION");
+ };
+}
+
+Irssi::signal_add('message join', 'event_message_join');
+