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.
-
Bader
- Voice
- Posts: 35
- Joined: Sat Mar 12, 2005 5:34 am
Post
by Bader »
anyone edit this tcl,
Code: Select all
# Kline Command
proc proc_kline {text} {
set time [lindex $text 0]
set ip [lindex $text 1]
set reason [lrange $text 2 end]
putserv "KLINE $time $ip $reason"
putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time" }
bind pub m|m !kline proc_kline
i try to make it, like if i said on the channel,
!kline time *@ip reason
the bot klined the ip with the reason,,
thanks
-
Sir_Fz
- Revered One
- Posts: 3794
- Joined: Sun Apr 27, 2003 3:10 pm
- Location: Lebanon
-
Contact:
Post
by Sir_Fz »
Code: Select all
bind pub m|m !kline proc_kline
proc proc_kline {nick uhost hand chan arg} {
set time [lindex [set arg [split $arg]] 0]
set ip [lindex $arg 1]
set reason [join [lrange $arg 2 end]]
putserv "KLINE $time $ip $reason"
putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time"
}
Edit: extra brace removed, thanx Ian-Highlander.
Last edited by
Sir_Fz on Fri Jan 20, 2006 11:35 am, edited 1 time in total.
-
Ian-Highlander
- Op
- Posts: 165
- Joined: Mon Sep 24, 2001 8:00 pm
- Location: Ely, Cambridgeshire
Post
by Ian-Highlander »
Sir_Fz wrote:Code: Select all
bind pub m|m !kline proc_kline
proc proc_kline {nick uhost hand chan arg} {
set time [lindex [set arg [split $arg]] 0]
set ip [lindex $arg 1]
set reason [join [lrange $arg 2 end]]
putserv "KLINE $time $ip $reason"
putlog "-=\002$nick\002=- Klined this ip: $ip ,for $reason ,for time (mins): $time" }
}
Might want to take the extra curly bracket off the end of the putlog line
"Insanity Takes Its Toll, Please Have Exact Change"