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.

weird problem with my script

Old posts that have not been replied to for several years.
Locked
S
Shrekkie

weird problem with my script

Post by Shrekkie »

Hey I'm trying to learn tcl, so .... :lol:

Anyway to try and make a script, i thought it would be fun to make a script that random chooses a nick on that channel and then kick it with a random reason.
The bot has ops, no errors found anymore and even the notice-line I put it comes up fine, so the script must be loaded.
Only nothing happens.

Can you guys bring the light for me here ?

Code: Select all

set kickmsg {
 {Congratulations ! You were in my way !}
 {Your time to do the dishes,hun}
 {My eye fell on you, dear}
 {BUNGABUNGABUNGA}
 {dumdedum}
 { $nick , you asked me to kick you ?}
 {You have been randomly chosen for a jolly kick -_- }
 {eeekkkk}

}


bind pub - !kadeng kadeng

proc kadeng { nick chan } {
 global kickmsg
 set users [chanlist #shrekkie]
 set kicknick [lindex $users [rand [llength $users]]]
 set excuse [lindex $kickmsg [rand [llength $kickmsg]]]
 putserv "KICK #shrekkie $kicknick $excuse "
}

putlog "Random Kick Script - by Shrekkie loaded ... "
putserv "NOTICE Shrekkie Plugin loaded"
All remarks and critics are welcome
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

In your partyline you would be seeing something like:

"Called kadeng with too many arguments"

See tcl-commands.doc for the number/type of parameters a pub bound procedure requires ...

And, just basic IRC protocol, for your kick... the format for kicking on IRC is:
KICK <channel> <victim> :<message>

note the colon and it's location...
S
Shrekkie

Post by Shrekkie »

Weird tho, cause in the eggdroplogfiles i don't see an error anymore
This was the last error i saw :

Code: Select all

 [22:33] Tcl error [kadeng]: wrong # args: should be "kadeng nick" 
Anyway my opinion is it doesn't pick a random user correctly.
cause if I leave out the random nick, it kicks the one who issued the command "!kadeng"

Hope to resolve this ,
Locked