egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change kick default msg

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
Frog
Voice


Joined: 26 May 2007
Posts: 8

PostPosted: Sat Jun 09, 2007 12:39 pm    Post subject: change kick default msg Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jun 09, 2007 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Frog
Voice


Joined: 26 May 2007
Posts: 8

PostPosted: Sat Jun 09, 2007 4:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jun 09, 2007 6:34 pm    Post subject: Reply with quote

Replace the "Reason 1" and so forth with whichever kickreasons you wish to use.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Frog
Voice


Joined: 26 May 2007
Posts: 8

PostPosted: Sat Jun 09, 2007 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jun 09, 2007 7:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
Frog
Voice


Joined: 26 May 2007
Posts: 8

PostPosted: Sat Jun 09, 2007 7:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Jun 09, 2007 7:56 pm    Post subject: Reply with quote

You'd most likely need some decent experiences in the C programming language.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Frog
Voice


Joined: 26 May 2007
Posts: 8

PostPosted: Sun Jun 10, 2007 5:07 am    Post subject: Reply with quote

which i dont know nothing about heheh .. thanks for the fast replies...
peace
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber