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.

Kick Message

Old posts that have not been replied to for several years.
Locked
c
conan_i
Voice
Posts: 18
Joined: Sun Jun 12, 2005 5:33 am

Kick Message

Post by conan_i »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

which command?
c
conan_i
Voice
Posts: 18
Joined: Sun Jun 12, 2005 5:33 am

Post by conan_i »

eg kick nick
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

is that a Tcl command?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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: Select all

# 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"
}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Sir_Fz, noone gets even close to your ability to read n00b minds :P
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

demond wrote:Sir_Fz, noone gets even close to your ability to read n00b minds :P
Hahaha, I can't disagree :P
Locked