This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

zline script

Old posts that have not been replied to for several years.
Locked
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

zline script

Post by ZaKiR »

My bot has oper access in the network...

Suppose if someone quits like.....

-Hub.CaFeBanGLa.CoM- *** Notice -- Client exiting: MindEraser (~Mind_Eras@202.174.137.108) [Excess Flood]

which is a server notice in unrealircd i want my bot will zline the ip with the command /zline @202.174.137.108 3d :Flooder <-- here 3d stands for 3 days

I will be grateful if i get tcl script for that particur command
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

It's 6am and the code is untested, but hey, it could work :roll:

Code: Select all

bind raw - NOTICE  raw:notice
proc raw:notice {from word text} { 
 set notice [lrange [split $text] 0 end]
  if {[string match -nocase *exiting*excess* $notice]} {
    set zline "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
    putserv "Zline $zline 3d :Flooder"
  }
}
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Post by ZaKiR »

Thanks a lottttttttt.... It's working great.............. :D
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Need Another Help

Post by ZaKiR »

I wanna zline everyone (Flooders) when they start connecting to server in a certain time (When they flood )

When someone connects to server bot gets server notice like ...

Hub.CaFeBanGLa.CoM - *** Notice -- Client connecting on port 6667: cL0sEd (~ZaKiR@202.174.137.108) [clients]

So when bot will get this msg it will start zlining like /zline @202.174.137.108 3d :Flooder <-- here 3d stands for 3 days

now the question is when the bot will start doing this... it will start doing this when i type !zline-on in any channel where the bot is.. & it will stop doing this when i will type !zline-off... if someone else type !zline-on or !zline-off bot will not go for it.. only when i (owner) type this bot will work for it
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Post by ZaKiR »

Code: Select all

bind raw - NOTICE raw:notice 
proc raw:notice {from word text} { 
set notice [lrange [split $text] 0 end] 
if {[string match -nocase *connecting* $notice]} { 
set zline "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]" 
putserv "Zline $zline 2d :flooder" 
} 
}
This code will zline everyone who connects to my server... but i want some additional things... like when i (owner of the bot) will type !zline-on in any channel where this bot is present this code will be activated & when !zline-off this code will be deactivated...

& i want to add some exceptional ips in this code which will never be zlined such as my ip 202.174.137.108
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

# just add the ip's you want to protect here, seperate with space
set zline(protect) "202.174.137.108"

# we better start it with the auto-zlines turned off
set zline(status) 0

bind pub n !zline-on zline:on
bind pub n !zline-off zline:off

proc zline:on {nick uhost hand chan text} {
 global zline
  set zline(status) 1
  putserv "PRIVMSG $chan :Auto Zline on connect turned ON. "
}

proc zline:off {nick uhost hand chan text} {
 global zline
  set zline(status) 0
  putserv "PRIVMSG $chan :Auto Zline on connect turned OFF. "
}

bind raw - NOTICE  raw:notice
proc raw:notice {from word text} {
 global zline
  set notice [lrange [split $text] 0 end]
 # zline on excess flood
  if {[string match -nocase *exiting*excess* $notice]} {
    set host "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
    putserv "Zline $host 3d :Flooder"
  }
 # zline everyone that connects
  if {[string match -nocase *connecting* $notice]} {
    set host "@[string trimright [lindex [split [lindex $text end-2] @] 1] )]"
    if {($zline(status)) && (![string match *$host* $zline(protect)])} {
      putserv "Zline $host 2d :flooder"
    }
  }
}
Again, this is untested.
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Post by ZaKiR »

When i turn on this zline-on-connect my server shuts down(process stops).

my server & eggdrop is running from same shell

but the code for excess flood is working fine

Please help me again
Locked