hi
i need tcl for eggy for kick/ban but the eggy send the bans via X (undernet) with duration level reason.
example:
i will write on main .kb nick/IP/host and eggy send the ban via x
greetings lordwilli
Alchera wrote:Use the resources of the TCL Archive and you'll find plenty of scripts to suit your needs.
Code: Select all
bind pub m|m .kb pub:kban
proc pub:kban {nick host hand chan text} {
set victim [lindex $text 0]
if {$victim == ""} {
putquick "NOTICE $nick :Usage: .kb <nick|host>"; return
} else {
if {![onchan $victim $chan]} {
set victim *!*@[lindex $text 0]
}
putquick "PRIVMSG X :ban $chan $victim"
}
}
Code: Select all
bind pub m|m .kb pub:kban
proc pub:kban {nick host hand chan text} {
set victim [lindex $text 0]
if {$victim == ""} {
putquick "NOTICE $nick :Usage: .kb <nick|host>"; return
} else {
if {![onchan $victim $chan]} {
set victim *!*@[lindex $text 0]
}
set reason [lrange $text 1 end]
if {$reason == ""} {
set reason "No reason given"
}
putquick "PRIVMSG X :ban $chan $victim $reason"
}
}
thx thx Metroid for your answerMeTroiD wrote:Well i made this small code.
It works like this.
.kb nick - Will do this: /msg X ban #channel <nick>
.kb host - Will do this: /msg X ban #channel *!*@<host>
So you use .kb nickname or .kb <host>
Use host like this or it wont work: .kb moo.com so DO NOT USE .kb *!*@moo.com
Its something simple so don't expect too much of itCode: Select all
bind pub m|m .kb pub:kban proc pub:kban {nick host hand chan text} { set victim [lindex $text 0] if {$victim == ""} { putquick "NOTICE $nick :Usage: .kb <nick|host>"; return } else { if {![onchan $victim $chan]} { set victim *!*@[lindex $text 0] } putquick "PRIVMSG X :ban $chan $victim" } }
I don't know if X also has something for a reason but if it does use this:
Code: Select all
bind pub m|m .kb pub:kban proc pub:kban {nick host hand chan text} { set victim [lindex $text 0] if {$victim == ""} { putquick "NOTICE $nick :Usage: .kb <nick|host>"; return } else { if {![onchan $victim $chan]} { set victim *!*@[lindex $text 0] } set reason [lrange $text 1 end] if {$reason == ""} { set reason "No reason given" } putquick "PRIVMSG X :ban $chan $victim $reason" } }