hey,
im trying to make my eggdrop use a random kick msg but couldnt find a way, i tried to search egghelp.org tcl archive but didnt find a script that does that, anyone mayb knows how to do that?
set randkick_reason [list "Reason 1" "Reason 2" "Reason 3"]
proc randkick {channel nick {reason ""}} {
if {[string length $reason] == 0} {
set reason [lindex $::randkick_reason [rand [llength $::randkick_reason]]]
}
putkick $channel $nick $reason
}
Command is called with channel, nickname, and an optional reason as parameters, no additional checks to validate either are made, it will simply pass these on to putkick, along with a randomly selected reason from the list stored in randkick_reason, if no reason is supplied.
Implementation in your favourite script should be simple enough.
thanks for the reply,
does this mean it will look for a random reason from a file called "randkick_reason" that i suppsed to create or i should add my random kick msgs instead of "Reason 1" "Reason 2" and so on?
i tested that out, i added it in the .conf file and i tried to add it in a file called ban.tcl and loaded it but it didnt work both times. it still uses the kick msg "banned" when enforcing the bans.
If you are referring to the "builtin kicks", then these can not be changed to use random messages without heavily modifying the sourcecode. The example posted earlier will only work with scripts that explicitly use randkick to do the kicking. I am sorry if I was unclear on that.
no problems, thanks for the help so far man ... so basicly if i need to do that i have to know how to change few things of the eggdrop sourcecode? which is no way for an amateur to do?