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.
Help for those learning Tcl or writing their own scripts.
pektek
Halfop
Posts: 55 Joined: Sat Jul 01, 2023 4:51 pm
Post
by pektek » Sun Nov 10, 2024 1:02 pm
what can be done with it ?
Code: Select all
bind mode - "#% +b" runban
bind mode - "#% -b" stopban
proc runban {nick uhost handle chan mode target} {
if {[string match -nocase m:*!*@* $target]} {
set ::btimer($chan) [list [timer 20 [list rmban $chan]]]
}
}
proc stopban {nick uhost handle chan mode target} {
if {[string match -nocase m:*!*@* $target]} {
rmban $chan
}
}
proc rmban {chan} {
if { [array exists ::btimer] && [info exists ::btimer($chan)] } {
if { [lsearch -index 2 [timers] $::btimer($chan)] != -1} {
killtimer $::btimer($chan)
}
unset ::btimer($chan)
}
if { [ischanban m:*!*@* $chan] } {
pushmode $chan -b m:*!*@*
}
}
CrazyCat
Revered One
Posts: 1306 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Mon Nov 11, 2024 9:08 am
This code is to auto-remove an extended ban which is not clearly understood by eggdrop to auto-remove it after 20 minutes.
Depending on the ircd used, the ~m ban is not the same
pektek
Halfop
Posts: 55 Joined: Sat Jul 01, 2023 4:51 pm
Post
by pektek » Sat Nov 23, 2024 7:15 pm
thank you CrazyCat