From: Don Armstrong Date: Fri, 17 Feb 2006 09:22:07 +0000 (+0000) Subject: * Completely move around the home directory system and begin X-Git-Url: https://git.donarmstrong.com/?p=irc.git;a=commitdiff_plain;h=a92395ba40effe44c593deb8d4a5454be6125342 * Completely move around the home directory system and begin transitioning to a module based system instead of the individual directories --- a92395ba40effe44c593deb8d4a5454be6125342 diff --git a/.irssi/default.theme b/.irssi/default.theme new file mode 100644 index 0000000..5b6f7be --- /dev/null +++ b/.irssi/default.theme @@ -0,0 +1,290 @@ +# When testing changes, the easiest way to reload the theme is with /RELOAD. +# This reloads the configuration file too, so if you did any changes remember +# to /SAVE it first. Remember also that /SAVE overwrites the theme file with +# old data so keep backups :) + +# TEMPLATES: + +# The real text formats that irssi uses are the ones you can find with +# /FORMAT command. Back in the old days all the colors and texts were mixed +# up in those formats, and it was really hard to change the colors since you +# might have had to change them in tens of different places. So, then came +# this templating system. + +# Now the /FORMATs don't have any colors in them, and they also have very +# little other styling. Most of the stuff you need to change is in this +# theme file. If you can't change something here, you can always go back +# to change the /FORMATs directly, they're also saved in these .theme files. + +# So .. the templates. They're those {blahblah} parts you see all over the +# /FORMATs and here. Their usage is simply {name parameter1 parameter2}. +# When irssi sees this kind of text, it goes to find "name" from abstracts +# block below and sets "parameter1" into $0 and "parameter2" into $1 (you +# can have more parameters of course). Templates can have subtemplates. +# Here's a small example: +# /FORMAT format hello {colorify {underline world}} +# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; } +# When irssi expands the templates in "format", the final string would be: +# hello %G%Uworld%U%n +# ie. underlined bright green "world" text. +# and why "$0-", why not "$0"? $0 would only mean the first parameter, +# $0- means all the parameters. With {underline hello world} you'd really +# want to underline both of the words, not just the hello (and world would +# actually be removed entirely). + +# COLORS: + +# You can find definitions for the color format codes in docs/formats.txt. + +# There's one difference here though. %n format. Normally it means the +# default color of the terminal (white mostly), but here it means the +# "reset color back to the one it was in higher template". For example +# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would +# print yellow "foo" (as set with %Y) but "bar" would be green, which was +# set at the beginning before the {foo} template. If there wasn't the %g +# at start, the normal behaviour of %n would occur. If you _really_ want +# to use the terminal's default color, use %N. + +############################################################################# + +# default foreground color (%N) - -1 is the "default terminal color" +default_color = "-1"; + +# print timestamp/servertag at the end of line, not at beginning +info_eol = "false"; + +# these characters are automatically replaced with specified color +# (dark grey by default) +replaces = { "[]=" = "%K$*%n"; }; + +abstracts = { + ## + ## generic + ## + + # text to insert at the beginning of each non-message line + line_start = "%B-%W!%B-%n "; + + # timestamp styling, nothing by default + timestamp = "$*"; + + # any kind of text that needs hilighting, default is to bold + hilight = "%_$*%_"; + + # any kind of error message, default is bright red + error = "%R$*%n"; + + # channel name is printed + channel = "%_$*%_"; + + # nick is printed + nick = "%_$*%_"; + + # nick host is printed + nickhost = "[$*]"; + + # server name is printed + server = "%_$*%_"; + + # some kind of comment is printed + comment = "[$*]"; + + # reason for something is printed (part, quit, kick, ..) + reason = "{comment $*}"; + + # mode change is printed ([+o nick]) + mode = "{comment $*}"; + + ## + ## channel specific messages + ## + + # highlighted nick/host is printed (joins) + channick_hilight = "%C$*%n"; + chanhost_hilight = "{nickhost %c$*%n}"; + + # nick/host is printed (parts, quits, etc.) + channick = "%c$*%n"; + chanhost = "{nickhost $*}"; + + # highlighted channel name is printed + channelhilight = "%c$*%n"; + + # ban/ban exception/invite list mask is printed + ban = "%c$*%n"; + + ## + ## messages + ## + + # the basic styling of how to print message, $0 = nick mode, $1 = nick + msgnick = "%K<%n$0$1-%K>%n %|"; + + # message from you is printed. "msgownnick" specifies the styling of the + # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the + # whole line. + + # Example1: You want the message text to be green: + # ownmsgnick = "{msgnick $0 $1-}%g"; + # Example2.1: You want < and > chars to be yellow: + # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; + # (you'll also have to remove <> from replaces list above) + # Example2.2: But you still want to keep <> grey for other messages: + # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; + # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; + # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; + # ownprivmsgnick = "%K{msgnick $*%K}%n"; + # privmsgnick = "%K{msgnick %R$*%K}%n"; + + # $0 = nick mode, $1 = nick + ownmsgnick = "{msgnick $0 $1-}"; + ownnick = "%W$*%n"; + + # public message in channel, $0 = nick mode, $1 = nick + pubmsgnick = "{msgnick $0 $1-}"; + pubnick = "%N$*%n"; + + # public message in channel meant for me, $0 = nick mode, $1 = nick + pubmsgmenick = "{msgnick $0 $1-}"; + menick = "%Y$*%n"; + + # public highlighted message in channel + # $0 = highlight color, $1 = nick mode, $2 = nick + pubmsghinick = "{msgnick $1 $0$2-%n}"; + + # channel name is printed with message + msgchannel = "%K:%c$*%n"; + + # private message, $0 = nick, $1 = host + privmsg = "[%R$0%K(%r$1-%K)%n] "; + + # private message from you, $0 = "msg", $1 = target nick + ownprivmsg = "[%r$0%K(%R$1-%K)%n] "; + + # own private message in query + ownprivmsgnick = "{msgnick $*}"; + ownprivnick = "%W$*%n"; + + # private message in query + privmsgnick = "{msgnick %R$*%n}"; + + ## + ## Actions (/ME stuff) + ## + + # used internally by this theme + action_core = "%W * $*%n"; + + # generic one that's used by most actions + action = "{action_core $*} "; + + # own action, both private/public + ownaction = "{action $*}"; + + # own action with target, both private/public + ownaction_target = "{action_core $0}%K:%c$1%n "; + + # private action sent by others + pvtaction = "%W (*) $*%n "; + pvtaction_query = "{action $*}"; + + # public action sent by others + pubaction = "{action $*}"; + + + ## + ## other IRC events + ## + + # whois + whois = " $[8]0 : $1-"; + + # notices + ownnotice = "[%r$0%K(%R$1-%K)]%n "; + notice = "%K-%M$*%K-%n "; + pubnotice_channel = "%K:%m$*"; + pvtnotice_host = "%K(%m$*%K)"; + servernotice = "%g!$*%n "; + + # CTCPs + ownctcp = "[%r$0%K(%R$1-%K)] "; + ctcp = "%g$*%n"; + + # wallops + wallop = "%W$*%n: "; + wallop_nick = "%n$*"; + wallop_action = "%W * $*%n "; + + # netsplits + netsplit = "%R$*%n"; + netjoin = "%C$*%n"; + + # /names list + names_prefix = ""; + names_nick = "[%_$0%_$1-] "; + names_nick_op = "{names_nick $*}"; + names_nick_halfop = "{names_nick $*}"; + names_nick_voice = "{names_nick $*}"; + names_users = "[%g$*%n]"; + names_channel = "%G$*%n"; + + # DCC + dcc = "%g$*%n"; + dccfile = "%_$*%_"; + + # DCC chat, own msg/action + dccownmsg = "[%r$0%K($1-%K)%n] "; + dccownnick = "%R$*%n"; + dccownquerynick = "%W$*%n"; + dccownaction = "{action $*}"; + dccownaction_target = "{action_core $0}%K:%c$1%n "; + + # DCC chat, others + dccmsg = "[%G$1-%K(%g$0%K)%n] "; + dccquerynick = "%G$*%n"; + dccaction = "%W (*dcc*) $*%n %|"; + + ## + ## statusbar + ## + + # default background for all statusbars. You can also give + # the default foreground color for statusbar items. + sb_background = "%4%w"; + + # default backround for "default" statusbar group + #sb_default_bg = "%4"; + # background for prompt / input line + sb_prompt_bg = "%n"; + # background for info statusbar + sb_info_bg = "%8"; + # background for topicbar (same default) + #sb_topic_bg = "%4"; + + # text at the beginning of statusbars. sb-item already puts + # space there,so we don't use anything by default. + sbstart = ""; + # text at the end of statusbars. Use space so that it's never + # used for anything. + sbend = " "; + + prompt = "[$*] "; + + sb = " %c[%n$*%c]%n"; + sbmode = "(%c+%n$*)"; + sbaway = " (%GzZzZ%n)"; + sbservertag = ":$0 (change with ^X)"; + + # activity in statusbar + + # ',' separator + sb_act_sep = "%c$*"; + # normal text + sb_act_text = "%c$*"; + # public message + sb_act_msg = "%W$*"; + # hilight + sb_act_hilight = "%M$*"; + # hilight with specified color, $0 = color, $1 = text + sb_act_hilight_color = "$0$1-%n"; +}; diff --git a/.irssi/scripts/anotherway.pl b/.irssi/scripts/anotherway.pl new file mode 100644 index 0000000..f7a0ca8 --- /dev/null +++ b/.irssi/scripts/anotherway.pl @@ -0,0 +1,54 @@ +#!/usr/bin/perl +# +# by Stefan Tomanek + +use strict; +use vars qw($VERSION %IRSSI); +$VERSION = "2003010201"; +%IRSSI = ( + authors => "Stefan 'tommie' Tomanek", + contact => "stefan\@pico.ruhr.de", + name => "anotherway", + description => "Another auto away script", + license => "GPLv2", + changed => "$VERSION", +); +use Irssi 20020324; +use vars qw($timer @signals); + +@signals = ('message own_public', 'message own_private'); + +sub go_away { + #Irssi::print "%R>>%n Going away...$timer"; + Irssi::timeout_remove($timer); + my $reason = Irssi::settings_get_str("anotherway_reason"); + my @servers = Irssi::servers(); + return unless @servers; + Irssi::signal_remove($_ , "reset_timer") foreach (@signals); + $servers[0]->command('AWAY '.$reason); + Irssi::signal_add($_ , "reset_timer") foreach (@signals); +} + +sub reset_timer { + #Irssi::print "%R>>%n RESET"; + Irssi::signal_remove($_ , "reset_timer") foreach (@signals); + foreach (Irssi::servers()) { + $_->command('AWAY') if $_->{usermode_away}; + last; + } + #Irssi::signal_add('nd', "reset_timer"); + Irssi::timeout_remove($timer); + my $timeout = Irssi::settings_get_int("anotherway_timeout"); + $timer = Irssi::timeout_add($timeout*1000, "go_away", undef); + Irssi::signal_add($_, "reset_timer") foreach (@signals); +} + +Irssi::settings_add_str($IRSSI{name}, 'anotherway_reason', 'a-nother-way'); +Irssi::settings_add_int($IRSSI{name}, 'anotherway_timeout', 300); + +{ + Irssi::signal_add($_, "reset_timer") foreach (@signals); + reset_timer(); +} + +print CLIENTCRAP '%B>>%n '.$IRSSI{name}.' '.$VERSION.' loaded'; diff --git a/.irssi/scripts/auto_bleh.pl b/.irssi/scripts/auto_bleh.pl new file mode 100644 index 0000000..e279987 --- /dev/null +++ b/.irssi/scripts/auto_bleh.pl @@ -0,0 +1,329 @@ +# bleh stuff + +use Irssi; +use Irssi::Irc; +use strict; +use vars qw($VERSION %IRSSI $DEBUG); + +# 0.05 -- Add IPv6 support + +$VERSION = q$Revision: 1.1 $; +%IRSSI = (authors => 'Don Armstrong', + name => 'auto_bleh', + description => 'Provides /ak /aq /ab /abr /abrn /arn /amb /amr /at', + license => 'GPL', + changed => q$Id: auto_bleh.pl,v 1.1 2005/03/17 08:19:53 don Exp $, + ); + +$DEBUG = 1 unless defined $DEBUG; + +my ($actions, %defaults); + +%defaults = (GET_OP => 1, # Should we try to get opped when we auto_bleh? + USE_CHANSERV => 1, # Should we use chanserv to get opped? + EXPIRE => 6000, # Do not try to do anything if the action is more than 6000 seconds old. + DEOP => 1, # Automatically deop after we've done whatever we were supposed to do. + TIMEOUT => 10, # Timeout /at bans after 10 minutes + ); + +my %command_bindings = (ak => 'cmd_ak', + ab => 'cmd_ab', + aq => 'cmd_aq', + ar => 'cmd_ar', + abr => 'cmd_abr', + abk => 'cmd_abk', + abrn => 'cmd_abrn', + abk => 'cmd_abkn', + arn => 'cmd_arn', + amb => 'cmd_amb', + amr => 'cmd_amr', + at => 'cmd_at', + ); + +my %bans_to_remove; + + +sub cmd_at { + my ($data, $server, $witem) = @_; + return do_auto_bleh('timeout',$data,$server,$witem); +} + +sub cmd_ak { + my ($data, $server, $witem) = @_; + return do_auto_bleh('kick',$data,$server,$witem); +} + +sub cmd_abk { + my ($data, $server, $witem) = @_; + return do_auto_bleh('kick,ban',$data,$server,$witem); +} +sub cmd_abkn { + my ($data, $server, $witem) = @_; + return do_auto_bleh('kick,ban,notice',$data,$server,$witem); +} + +sub cmd_amb{ + my ($data, $server, $witem) = @_; + my @nicks = split /\s+/, $data; + for (@nicks) { + next unless /\w/; + do_auto_bleh('ban',$_,$server,$witem); + } +} + +sub cmd_ab { + my ($data, $server, $witem) = @_; + return do_auto_bleh('ban',$data,$server,$witem); +} + +sub cmd_aq { + my ($data, $server, $witem) = @_; + return do_auto_bleh('quiet',$data,$server,$witem); +} + + +sub cmd_amr{ + my ($data, $server, $witem) = @_; + my @nicks = split /\s+/, $data; + for (@nicks) { + next unless /\w/; + do_auto_bleh('remove',$_,$server,$witem); + } +} + +sub cmd_ar { + my ($data, $server, $witem) = @_; + return do_auto_bleh('remove',$data,$server,$witem); +} +sub cmd_abr{ + my ($data, $server, $witem) =@_; + return do_auto_bleh('remove,ban',$data,$server,$witem); +} +sub cmd_abrn{ + my ($data, $server, $witem) =@_; + return do_auto_bleh('remove,ban,notice',$data,$server,$witem); +} +sub cmd_arn{ + my ($data, $server, $witem) =@_; + return do_auto_bleh('remove,notice',$data,$server,$witem); +} + + +sub do_auto_bleh { + my ($cmd, $data, $server, $witem, $duration) = @_; + + if (!$server || !$server->{connected}) { + Irssi::print("Not connected to server"); + return; + } + + if ($witem->{type} ne 'CHANNEL') { + Irssi::print("Can't autokick on a non-channel. [$witem->{type}]"); + return; + } + + # use Data::Dumper; + # Irssi::print(Dumper($data,$server,$witem)); + # set the network that we're on, the channel and the nick to kick + # once we've been opped + + # Heh. Looks like $data needs to be sanitized a bit. + $data =~ /^\s*([^\s]+)\s*(\d+)?\s*(.+?|)\s*$/; + my $nick = $1; + my $timeout = $2; + my $reason = $3; + $timeout = $defaults{TIMEOUT} if not defined $timeout or $timeout eq ''; + $reason = 'you should know better' if not defined $reason or $reason eq ''; + + my $nick_rec = $witem->nick_find($nick); + if (not defined $nick_rec) { + Irssi::print("Unable to find nick: $nick"); + } + + my $hostname = $nick_rec->{host} if defined $nick_rec; + Irssi::print("Unable to find hostname for $nick") if not defined $hostname or $hostname eq ''; + $hostname =~ s/.+\@//; + + Irssi::print("Nick set to '$nick' from '$data', reason set to '$reason'.") if $DEBUG; + my $action = {type => $cmd, + nick => $nick, + nick_rec => $nick_rec, + network => $witem->{server}->{chatnet}, + server => $witem->{server}, + completed => 0, + inserted => time, + channel => $witem->{name}, + reason => $reason, + hostname => $hostname, + timeout => $timeout, + }; + Irssi::print(i_want($action)) if $DEBUG; + if ($witem->{chanop}) { # we seem to be opped. + take_action($action,$server,$witem); + } + else { + $actions->{$data.$action->{inserted}}=$action; + get_op($server, $action->{channel}) if $defaults{GET_OP}; + } + +} + +sub get_op { + my ($server,$channel) = @_; + + Irssi::print("MSG chanserv op $channel"); + $server->command("MSG chanserv op $channel") if $defaults{USE_CHANSERV}; +} + +sub i_want { + my $action = shift; + + return "I've wanted to $action->{type} $action->{nick} off $action->{channel} on $action->{network} since $action->{inserted}"; +} + +sub take_action { + my ($action,$server,$channel) = @_; + + local $_ = $action->{type}; + # Now support multiple actions against a single nick (to FE, kick + # ban, or remove ban). See /abr foo + if (/timeout/) { + Irssi::print("Quieting $action->{nick} on $action->{channel} with hostname $action->{hostname} for $action->{timeout} minutes"); + $server->send_raw("MODE $action->{channel} +q *!*@".$action->{hostname}) if $action->{hostname} ne ''; #quiet hostname + $bans_to_remove{"$action->{nick}$action->{inserted}"} = $action; + } + if (/quiet/) { + Irssi::print("Quieting $action->{nick} on $action->{channel} with hostname $action->{hostname}") if $DEBUG; + # Find hostname + if ($action->{hostname}) { + $server->send_raw("MODE $action->{channel} +b %*!*@".$action->{hostname}) if $action->{hostname} ne ''; #quiet hostname + } + + } + if (/ban/) { + Irssi::print("Banning $action->{nick} from $action->{channel} with hostname $action->{hostname}") if $DEBUG; + $server->send_raw("MODE $action->{channel} +b *!*@".$action->{hostname}) if $action->{hostname} ne ''; # ban hostname + } + if (/kick/) { + Irssi::print("Kicking $action->{nick} from $action->{channel}") if $DEBUG; + if ($action->{reason} =~ /\s/) { + $server->send_raw("KICK $action->{channel} $action->{nick} :$action->{reason}"); + } + else { + $server->send_raw("KICK $action->{channel} $action->{nick} $action->{reason}"); + } + } + if (/remove/) { + Irssi::print("Removing $action->{nick} from $action->{channel}") if $DEBUG; + if ($action->{reason} =~ /\s/) { + $server->send_raw("REMOVE $action->{channel} $action->{nick} :$action->{reason}"); + } + else { + $server->send_raw("REMOVE $action->{channel} $action->{nick} $action->{reason}"); + } + } + if (/notice/) { + Irssi::print("Noticing $action->{nick} with $action->{reason}") if $DEBUG; + $server->command("NOTICE $action->{nick} $action->{reason}"); + } + # unquiet. This is crap, and needs to be changed to something sane. + if (/teiuq/) { + Irssi::print("Unquieting $action->{nick} on $action->{channel} with hostname $action->{hostname}") if $DEBUG; + $server->command("MODE $action->{channel} -q *!*@".$action->{hostname}); + } + return; #for now. +} + +sub deop_us { + my ($rec) = @_; + my $channel = $rec->{channel}; + my $server = $rec->{server}; + + #$server->command("MODE $channel->{name} -o $channel->{ownick}->{nick}"); + if ($channel->{chanop}) { + Irssi::print("MODE $channel->{name} -o $channel->{ownnick}->{nick}"); + $channel->command("/deop $channel->{ownnick}->{nick}"); + } +} + +sub sig_mode_change { + my ($channel,$nick) = @_; + + #Irssi::print(Dumper($nick)); + #Irssi::print(Dumper($channel)); + + # Are there any actions to process? + # See if we got opped. + return if scalar(keys %$actions) eq 0; + + if ($channel->{server}->{nick} eq $nick->{nick} and $nick->{op}) { + # Ok, we've been opped, or we are opped now, so do whatever we're supposed to do. + Irssi::print("We've been opped") if $DEBUG; + # We seem to need some sort of delay here for the chanop stuff to catch up + Irssi::timeout_add_once(250,'attempt_actions',undef); + } + else { + Irssi::print("Fooey. Not opped.") if $DEBUG; + } +} + +sub attempt_actions { + + my @deop_array; + + foreach (keys %$actions) { + #Irssi::print(Dumper($actions->{$_})); + # See if this action is too old + if (time - $actions->{$_}->{inserted} > $defaults{EXPIRE}) { + Irssi::print("Expiring action: \"".i_want($actions->{$_})."\" because of time"); + delete $actions->{$_}; + next; + } + Irssi::print(i_want($actions->{$_})) if $DEBUG; + # Find the server to take action on + my $server = Irssi::server_find_chatnet($actions->{$_}->{network}); + Irssi::print("Unable to find server for chatnet: $actions->{$_}->{network}") and return if not defined $server; + Irssi::print("Found server for chatnet: $actions->{$_}->{network}") if $DEBUG; + # Find the channel to take action on + my $s_channel = $server->channel_find($actions->{$_}->{channel}); + Irssi::print("Unable to find channel for channel: $actions->{$_}->{channel}") and return if not defined $s_channel; + Irssi::print("Found channel for channel: $actions->{$_}->{channel}") if $DEBUG; + # Are we opped on that channel? + if ($s_channel->{chanop}) { # Yes? Take the action against the user. + Irssi::print("We are opped on the channel!") if $DEBUG; + take_action($actions->{$_},$server,$s_channel); + push @deop_array,{server=>$server,channel=>$s_channel} if $defaults{DEOP}; + delete $actions->{$_}; # Do not repeat this action. + } + else { + Irssi::print("We are not opped on the channel.") if $DEBUG; + } + } + foreach (@deop_array) { + deop_us($_); + } +} + + +sub try_to_remove_bans { + return unless keys %bans_to_remove; + for my $key (keys %bans_to_remove) { + if (($bans_to_remove{$key}{inserted} + $bans_to_remove{$key}{timeout}*60) < time) { + $bans_to_remove{$key}{type} = 'teiuq'; #unquiet + $actions->{$key} = $bans_to_remove{$key}; + delete $bans_to_remove{$key}; + get_op($actions->{$key}{server}, $actions->{$key}{channel}) if $defaults{GET_OP}; + } + } +} + +# call the try to remove bans function every minute +Irssi::timeout_add(1000*60,'try_to_remove_bans',undef); +Irssi::signal_add_last('nick mode changed','sig_mode_change'); +my ($command,$function); + +while (($command,$function) = each %command_bindings) { + Irssi::command_bind($command,$function); +} + +1; diff --git a/.irssi/scripts/autorun/anotherway.pl b/.irssi/scripts/autorun/anotherway.pl new file mode 120000 index 0000000..bbae65b --- /dev/null +++ b/.irssi/scripts/autorun/anotherway.pl @@ -0,0 +1 @@ +../anotherway.pl \ No newline at end of file diff --git a/.irssi/scripts/autorun/auto_bleh.pl b/.irssi/scripts/autorun/auto_bleh.pl new file mode 120000 index 0000000..f837fe7 --- /dev/null +++ b/.irssi/scripts/autorun/auto_bleh.pl @@ -0,0 +1 @@ +../auto_bleh.pl \ No newline at end of file diff --git a/.irssi/scripts/autorun/cafuego.pl b/.irssi/scripts/autorun/cafuego.pl new file mode 120000 index 0000000..1407072 --- /dev/null +++ b/.irssi/scripts/autorun/cafuego.pl @@ -0,0 +1 @@ +../cafuego.pl \ No newline at end of file diff --git a/.irssi/scripts/cafuego.pl b/.irssi/scripts/cafuego.pl new file mode 100644 index 0000000..cdadc27 --- /dev/null +++ b/.irssi/scripts/cafuego.pl @@ -0,0 +1,27 @@ +use strict; +use vars qw($VERSION %IRSSI); + +$VERSION = "1.00"; +%IRSSI = ( + authors => 'Cafuego', + contact => 'irssi\@cafuego.net', + name => 'cafuego', + description => 'Filters BitchX quit messages.', + license => 'GPL', + url => '', + changed => '$Id: cafuego.pl,v 1.1 2002/10/09 07:11:58 cafuego Exp cafuego $ ', +); + +my $bx_count = 0; + +sub scan_bitchx { + my ($server,$msg,$nick,$address,$target) = @_; + if ($msg =~ /BitchX/ || $msg =~ /bitchx/ || $msg =~ /BX/ ) { + Irssi::print("Stopped moron BitchX message from ".$nick." [".++$bx_count."]"); + Irssi::signal_stop(); + } +} + +Irssi::signal_add("event away", "scan_bitchx"); +Irssi::signal_add("event part", "scan_bitchx"); +Irssi::signal_add("event quit", "scan_bitchx");