| View previous topic :: View next topic |
| Author |
Message |
conan_i Voice
Joined: 12 Jun 2005 Posts: 18
|
Posted: Sun Aug 07, 2005 2:51 am Post subject: Kick Message |
|
|
| how will i add a kick message to read from kick.txt on eg kick nick if no reason given from the command to read it from kick.txt |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 07, 2005 3:21 am Post subject: |
|
|
| which command? |
|
| Back to top |
|
 |
conan_i Voice
Joined: 12 Jun 2005 Posts: 18
|
Posted: Sun Aug 07, 2005 10:16 am Post subject: |
|
|
| eg kick nick |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 07, 2005 11:35 am Post subject: |
|
|
| is that a Tcl command? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Aug 07, 2005 12:31 pm Post subject: |
|
|
I think what he wants is to use the command "eg kick <nick>" publicly or whatever, and when there's no reason specified the script uses a random reason from a file.
| Code: | # use a list instead of a file
set kickreasons {
"reason1"
"reason2"
"reason3"
}
bind pubm - "eg kick *" kick:user
proc kick:user {nick uhost hand chan arg} {
global kickreasons
set targ [lindex [split $arg] 2]
set reason [lindex [split $arg] 3]
if {![llength $reason]} {
set reason [lindex $kickreasons [rand [llength $kickreasons]]]
}
putserv "KICK $chan $targ :$reason"
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Aug 07, 2005 12:44 pm Post subject: |
|
|
Sir_Fz, noone gets even close to your ability to read n00b minds  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Aug 07, 2005 12:50 pm Post subject: |
|
|
| demond wrote: | Sir_Fz, noone gets even close to your ability to read n00b minds  |
Hahaha, I can't disagree  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|