| View previous topic :: View next topic |
| Author |
Message |
crux Voice

Joined: 05 Jan 2007 Posts: 35 Location: Myanmar
|
Posted: Sat Jan 13, 2007 1:09 pm Post subject: Part kill |
|
|
hello
I want a little code to kill users, who r trying to part from a specified channel. _________________ Myanmar Chat Online
MCO Chat |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sat Jan 13, 2007 1:26 pm Post subject: |
|
|
| Code: | bind part -|- * part:kill
proc part:kill {nickname hostname handle channel reason} {
if {[string equal $channel #mylamechannel]} {
putquick "KILL $nickname :Don't part $channel."
}
} |
|
|
| Back to top |
|
 |
crux Voice

Joined: 05 Jan 2007 Posts: 35 Location: Myanmar
|
Posted: Sat Jan 13, 2007 6:11 pm Post subject: |
|
|
Thanks alot ..
then bro.. I'm bot owner and I wanna control this tcl from public command...
example !kill on/off
how to bro? .. please help me. _________________ Myanmar Chat Online
MCO Chat |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Jan 13, 2007 6:38 pm Post subject: |
|
|
| Code: | bind pub n|n !kill kill:onoff
bind part -|- * part:kill
set killon 1
proc part:kill {nickname hostname handle channel reason} {
if {$::killon && [string equal $channel #mylamechannel]} {
putquick "KILL $nickname :Don't part $channel."
}
}
proc kill:onoff {nick uhost hand chan arg} {
set s [string tolower [lindex [split $arg] 0]]
set ::killon [expr {($s == "on")}]
} |
Edit: Just removed useless code. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts
Last edited by Sir_Fz on Sat Jan 13, 2007 9:39 pm; edited 1 time in total |
|
| Back to top |
|
 |
crux Voice

Joined: 05 Jan 2007 Posts: 35 Location: Myanmar
|
|
| Back to top |
|
 |
|