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.

Help with this script, random kick/nick

Help for those learning Tcl or writing their own scripts.
Post Reply
u
unb0rn
Voice
Posts: 26
Joined: Mon Sep 08, 2008 8:14 am

Help with this script, random kick/nick

Post by unb0rn »

I've been using this bnc for some time now, but since i've load the tcl, tcleggdrop_mcpsfuncs , it's not working completely.

Ex: !msg -> still works with the msg that i've define
: !kick -> not working, and i have no idea why


Here's the tcl:
set textlist {
"random kick msg"
}

bind pub - !msg rand:cmd
bind pub - !kick rand:cmd

proc rand:cmd {nick uhost hand chan arg} {
global textlist lastbind
set msg [lindex $textlist [rand [llength $textlist]]]
set ns [chanlist $chan]
switch -- $lastbind {
"!msg" {
puthelp "privmsg $chan :[lindex [split $arg] 0] $msg"
}
"!kick" {
set n [lindex $ns [rand [llength $ns]]]
puthelp "kick $chan $n :$msg"
}
}
}


this tcl should kick someone when you do !kick the eggdrop should kick a random nick from the channel
but now, its not working, only the !msg works, and on !msg, it says the msg that i have on the "set textlist {"
and the !kick, should also use the same msg from !msg
Thank you[/quote]
Last edited by unb0rn on Fri Jan 23, 2009 7:16 pm, edited 1 time in total.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: Help with this script, random kick/nick

Post by speechles »

unb0rn wrote:I've been using this bnc for some time now, but since i've load the tcl, tcleggdrop_mcpsfuncs , it's not working completely.

Ex: !msg -> still works with the msg that i've define
: !kick -> not working, and i have no idea why


Here's the tcl, and some info attached: http://rafb.net/p/ZwmxmM79.html

Thank you
I sometimes am in awe at the level of common sense people have. It is quite clear why it doesn't work. Let me show you...

Code: Select all

 switch -- $lastbind {
  "!msg" {
   puthelp "privmsg $chan :[lindex [split $arg] 0] $msg"
  }
  "!fode-te" {
   set n [lindex $ns [rand [llength $ns]]]
   puthelp "kick $chan $n :$msg"
  }
 }
}
You don't use !kick to kick others. You use.. Well.. What does that word mean?... Hmm...
<speechles> !tr fode-te
<sp33chy> Google says: (auto->en) Translation: Portuguese (automatically detected) » English >> fuck you
So basically, it's Portuguese (figures..haw). You type the equivalent of !f***-you <msg> and someone is randomly kicked with your witty message. How cute. :roll:
u
unb0rn
Voice
Posts: 26
Joined: Mon Sep 08, 2008 8:14 am

Post by unb0rn »

Yes, you are right about that, i forgot to edit that part, so show here, but even if i change that (and i've tried) it stills doesnt work.

I was working with the !fod*-te, to kick people randomly, but i've edit that to paste the tcl here.

The thing is, since i started to use the tcleggdrop_mcpsfuncs, the !fod*-te function, it's just not working at all, no matter what...

Help, please
Post Reply