#!/usr/bin/perl use strict; use IO::Handle; # $Id: irc2atl.pl,v 1.4 2002/10/17 10:16:55 wolcano Exp $ ############################################################################# # # # This script is intended do decrypt STDIN and write that to STDOUT. # # # # Wolcano # # # # Changes: # # # # 27-03-2001 removed UPPER,LOWER encoding (Wol) # # @heh# ############################################################################# # Systemova inicializacia. select(STDERR); $| = 1; # make unbuffered select(STDOUT); $| = 1; # make unbuffered my $NICK = ''; my $PASS = ''; my $LOGGED = 0; while () { # chomp; if ($_ =~ /^([^NU].*):(.*)/) { $_ = $1 . ':!!!'. $2; } if ($_ =~ /^$LOGGED && NICK ([^ ]*)/) { # users cannot chenge NICK on atlantis $_ = ''; $ERR = ':$SERVID 433 $NICK '.$1.' :Nickname is already in use.'."\n"; } if ($_ =~ /^NICK ([^ ]*)/) { $_ = ''; $ERR = 'NICK $1'."\n"; } if ($LOGGED && ($_ =~ /^USER ([^ ]*) ([^ ]*) ([^ ]*) :([^ ]*)/)) { $_ = ''; $PASS = $4; } if ($_ =~ /^PRIVMSG ([^# ]*) :ACTION (.*)/) { $_ = '.pemote '.$1.' '.$2."\n"; } if ($_ =~ /^PRIVMSG ([^# ]*) :(.*)/) { $_ = '.tell '.$1.' '.$2."\n" } if ($_ =~ /^PRIVMSG #atlantis :ACTION (.*)/) { $_ = '.semote '.$1.' '.$2."\n"; } if ($_ =~ /^PRIVMSG #atlantis :(.*)/) { $_ = '.shout '.$1."\n"; } if ($_ =~ /^PRIVMSG #atlantis :ACTION (.*)/) { $_ = '.semote '.$1.' '.$2."\n"; } if ($_ =~ /^PRIVMSG #atlantis :(.*)/) { $_ = '.shout '.$1."\n"; } if ($_ =~ /^JOIN #([^ ]*)/) { $_ = '.go $1'."\n"; } if ($_ =~ /^INVITE ([^ ])* #([^ ]*)/) { $_ = '.invite $1'."\n"; } if ($_ =~ /^WHO #atlantis/) { $_ = '.who'."\n"; } if ($_ =~ /^WHO #gossip/) { $_ = '.who gossip'."\n"; } if ($_ =~ /^WHO #([^ ]*)/) { $_ = '.look'."\n"; } # sending RAW if ($_ =~ /^NOTICE #atlantis :(.*)/) { $_ = $1."\n"; } if ($_ =~ /^PRIVMSG #[^ ]* :ACTION (.*)/) { $_ = '.emote '.$2."\n"; } if ($_ =~ /^PRIVMSG #[^ ]* :(.*)/) { $_ = '.say '.$1."\n"; } # other if ($_ =~ /^PRIVMSG ([^ ]*) :(.*)/) { $_ = '.say '.$1.':'.$2."\n"; } #!!!!!!!!!!!!!!!!!!!!! $ERR need to join STDERR with atl2irc and set the variables!!!!!!!!!!!!!!!!!!! print STDOUT; }