Recent
:: Bystroushaak
14 mins ago
:: Anonimo
1 hr ago
:: RIFAS
1 hr ago
:: anonymous
4 hrs ago
:: anonymous
4 hrs ago
:: RIFAS
4 hrs ago
:: Geo
5 hrs ago
:: anonymous
9 hrs ago
:: This post is secret saomateus.org
15 hrs ago
:: RIFAS
15 hrs ago
:: RIFAS
17 hrs ago
:: yoooo
20 hrs ago
:: aaadd
20 hrs ago
:: anonymous
22 hrs ago
:: aaa
23 hrs ago
rss 2.0 feed

Make New Post
Posts: 19102

Syntax:       Wrapping:  

   #15400 Posted by DjBass 2009-07-04 12:23:06
Formated by GeSHi
  1. use Irssi 20020217; # Irssi 0.8.0
  2. $VERSION = "1.1";
  3. %IRSSI = (
  4. authors => "Matti 'qvr' Hiljanen",
  5. contact => "matti\@hiljanen.com",
  6. name => "wkb",
  7. description => "A simple word kickbanner",
  8. license => "Public Domain",
  9. url => "http://matin.maapallo.org/softa/irssi",
  10. );
  11.  
  12. use strict;
  13. use Irssi;
  14.  
  15. my @channels =
  16. qw(#zalud);
  17.  
  18. my @words =
  19. qw(medved);
  20.  
  21. my @gods =
  22. qw(Dj_Bass);
  23.  
  24. sub sig_public {
  25. my ($server, $msg, $nick, $address, $target) = @_;
  26.  
  27. return if $nick eq $server->{nick};
  28.  
  29. my $rmsg = $msg;
  30. $rmsg =~ s/[\000-\037]//g;
  31. $msg = lc($msg);
  32.  
  33. # bad word
  34. my $nono = 0;
  35. foreach (@words) { $nono = 1 if $msg =~ /([\A]|[^a-z])$_([\Z]|[^a-z])/ }
  36. return unless $nono;
  37.  
  38. # channel?
  39. my $react = 0;
  40. foreach (@channels) { $react = 1 if lc($target) eq lc($_) }
  41. return unless $react;
  42.  
  43. # god-like person?
  44. my $jumala = 0;
  45. foreach (@gods) { $jumala = 1 if lc($nick) =~ /$_/ }
  46. return if $jumala;
  47.  
  48.  
  49.  
  50. $server->command("kick $target $nick kick");
  51. Irssi::print("Word kick: Kicking $nick from $target. (Povedal $rmsg)");
  52. }
  53.  
  54. Irssi::signal_add_last('message public', 'sig_public');
Parsed in 0.0102551 seconds
::  Inline view Inline view ::  Email this post Email  ::  Print Print   

:: Download   Download Text File15400.txt   Download Gziped text File15400.txt.gz   Download HTML File15400.html   Download PDF File15400.pdf
:: Print into    Print into HTML FileHTML document   Print into PDF FilePDF document

:: Make Diff

:: Erase Post

* Code:

To highlight particular lines, prefix each line with @@


Description:


Secret key (for later deletion)
Syntax:     


comments (0)


Copyright © 2006 Openpastebin