File: nickban.pl.diff

package info (click to toggle)
irssi-scripts 20061009
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 872 kB
  • sloc: makefile: 42
file content (46 lines) | stat: -rw-r--r-- 1,812 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
--- nickban.pl.orig	2003-09-23 17:39:42.000000000 +0200
+++ nickban.pl	2004-12-21 01:22:27.000000000 +0100
@@ -1,10 +1,10 @@
 $VERSION = "1.1";
 %IRSSI = (
-    authors     =>  "Roeland 'Trancer' Nieuwenhuis",
-    contact     =>  "irssi\@trancer.nl",
-    name        =>  "nickban",
-    description =>  "A simple nick banner. If it encounters a nick it bans its host",
-    license     =>  "Public Domain"
+    authors     =>  "Roeland 'Trancer' Nieuwenhuis",
+    contact     =>  "irssi\@trancer.nl",
+    name        =>  "nickban",
+    description =>  "A simple nick banner. If it encounters a nick it bans its host",
+    license     =>  "Public Domain"
 );
 
 use strict;
@@ -24,10 +24,10 @@
     my($server, $channel, $nick, $address) = @_;
 
     # Are we opped?
-    return unless $server->channel_find($channel)->{chanop};
+    return unless $server->channel_find($channel)->{chanop};
     
     # If the nick is a server, stop it.
-    return if $nick eq $server->{nick};
+    return if $nick eq $server->{nick};
     
     # Is the user a banned nick?
     my $nono = 0;
@@ -41,10 +41,10 @@
     
     # User voiced or op'd?
     # Pretty useless, but ok
-    return if $server->channel_find($channel)->nick_find($nick)->{op} || $server->channel_find($channel)->nick_find($nick)->{voice};
+    return if $server->channel_find($channel)->nick_find($nick)->{op} || $server->channel_find($channel)->nick_find($nick)->{voice};
 
-    $server->command("kickban $channel $nick $kickreason");
+    $server->command("kickban $channel $nick $kickreason");
     Irssi::print("Nick banning $nick on $channel. Banned.");
 }
 
-Irssi::signal_add_last('message join', 'nick_banner');
\ No newline at end of file
+Irssi::signal_add_last('message join', 'nick_banner');