| View previous topic :: View next topic |
| Author |
Message |
Frog Voice
Joined: 26 May 2007 Posts: 8
|
Posted: Sat Jun 09, 2007 12:39 pm Post subject: change kick default msg |
|
|
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? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jun 09, 2007 3:00 pm Post subject: |
|
|
Rouch example:
| Code: | 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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Frog Voice
Joined: 26 May 2007 Posts: 8
|
Posted: Sat Jun 09, 2007 4:08 pm Post subject: |
|
|
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? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jun 09, 2007 6:34 pm Post subject: |
|
|
Replace the "Reason 1" and so forth with whichever kickreasons you wish to use. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Frog Voice
Joined: 26 May 2007 Posts: 8
|
Posted: Sat Jun 09, 2007 7:47 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jun 09, 2007 7:50 pm Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Frog Voice
Joined: 26 May 2007 Posts: 8
|
Posted: Sat Jun 09, 2007 7:52 pm Post subject: |
|
|
| 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? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jun 09, 2007 7:56 pm Post subject: |
|
|
You'd most likely need some decent experiences in the C programming language. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Frog Voice
Joined: 26 May 2007 Posts: 8
|
Posted: Sun Jun 10, 2007 5:07 am Post subject: |
|
|
which i dont know nothing about heheh .. thanks for the fast replies...
peace |
|
| Back to top |
|
 |
|