mIRC Home    About    Download    Register    News    Help

Print Thread
Banning a user that leaves the channel after less #91235 20/07/04 10:20 PM
Joined: Oct 2003
Posts: 5
ChuckBaker Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Oct 2003
Posts: 5
I am wanting a script that will ban a user that comes into my channel and only stays in less then 1 minute.

does anyone know have a script like that??


Re: Banning a user that leaves the channel after less #91236 21/07/04 12:16 AM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
On !*:Join:[color:red]#Channel:{
hadd -m revolve $+($chan,.,$nick) $ctime
}

On @!*:Part:[color:red]#Channel:{
if (($hget(revolve,$+($chan,.,$nick))) && ($calc($ctime - $hget(revolve,$+($chan,.,$nick))) < 10)) {
ban $chan $nick 2
}
hdel revolve $+($chan,.,$nick)
}

Works on basis of nickname, wont work if they join, change nick, part.

Eamonn.

Re: Banning a user that leaves the channel after less #91237 21/07/04 09:07 AM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
* Kelder spots a nice place for $v1 smile

if (($hget(revolve,$+($chan,.,$nick))) && ($calc($ctime - $v1)) < 60)) {

Re: Banning a user that leaves the channel after less #91238 21/07/04 09:10 AM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
You as such a geek laugh hehehe, well done.

Eamonn.

Re: Banning a user that leaves the channel after l #91239 21/07/04 09:12 AM
Joined: Feb 2004
Posts: 50
D
Ddan Offline
Babel fish
Offline
Babel fish
D
Joined: Feb 2004
Posts: 50
instead of using $nick, you could use $wildsite or $address($nick,2) (both of which do the same thing) and check the same thing when they leave. this will ignore the fact someone has changed their nick and parted...

Re: Banning a user that leaves the channel after less #91240 22/07/04 08:16 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Just simplifying things a little. wink
  • on !*:join:#channel:hinc -mu60 $+(revolve,#) $site $ctime
    on @*:part:#channel:if $hget($+(revolve,#),$site) { ban -u60 # $site }


Re: Banning a user that leaves the channel after less #91241 22/07/04 09:20 PM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Looks nice, but why a hash table per channel? I'd use something like this then.

on !*:join:#channel:hinc -mu60 revolve $+(#,\,$site) $ctime
on @*:part:#channel:if $hget(revolve, $+(#,\,$site)) { ban -u3600 # $site }