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.

change kick default msg

General support and discussion of Eggdrop bots.
Post Reply
F
Frog
Voice
Posts: 8
Joined: Sat May 26, 2007 5:58 pm

change kick default msg

Post by Frog »

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?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Rouch example:

Code: Select all

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.
NML_375
F
Frog
Voice
Posts: 8
Joined: Sat May 26, 2007 5:58 pm

Post by Frog »

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?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Replace the "Reason 1" and so forth with whichever kickreasons you wish to use.
NML_375
F
Frog
Voice
Posts: 8
Joined: Sat May 26, 2007 5:58 pm

Post by Frog »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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.
NML_375
F
Frog
Voice
Posts: 8
Joined: Sat May 26, 2007 5:58 pm

Post by Frog »

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?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

You'd most likely need some decent experiences in the C programming language.
NML_375
F
Frog
Voice
Posts: 8
Joined: Sat May 26, 2007 5:58 pm

Post by Frog »

which i dont know nothing about heheh .. thanks for the fast replies...
peace
Post Reply