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.

format error

Help for those learning Tcl or writing their own scripts.
Post Reply
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

format error

Post by r0t3n »

I have a error with the kickmsg format

Code: Select all

set ::id [expr $::id + 1]
    set reason "change the topic"
    set homechan $protect::homechan 
    set kickmsg $protect::kickmsg
    set kickmsg [format $kickmsg $reason $channel $::id $homechan]  
    newchanban $channel $userhost "$kickmsg" $protect::topic_btime
    if {[botisop $channel]} {
      putquick "MODE $channel -o+b $nickname $userhost"
      putquick "KICK $channel $nickname $kickmsg"
      putlog "punished $nickname on $channel \(Reason: Topic Change\)"
      } else {
      putlog "Couldn't punish $nickname on $channel \(Reason: no op\)"
    }
The error:

Code: Select all

* The-Partyline changes topic to 'baaaaaaaaaaaaaah'
* BC|PR0T3CT0R sets mode: -o+b The-Partyline *!Tosser@spc1-lanc1-3-0-cust169.asfd.broadband.ntl.com
* The-Partyline was kicked by BC|PR0T3CT0R ((ID: 21) ][ (SecureBot by #BotCentrum) ])
For some reason, it does not format the reason and channel into the kickmsg...

This is the $protect::kickmsg variable line

Code: Select all

variable kickmsg "10\[ 3\(1You are not ALLOWED to %1\$s on %2\$s3\) 10\]\[ 3\(1ID: %3\$s3\) 10\]\[ 3\(1SecureBot by %4\$s3\) 10\]"
Any ideas of why the kickmsg format is not working correctly???

Thanks in advance :)
r0t3n @ #r0t3n @ Quakenet
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

You didn't use : (you need to use it when you use more then 1 word long message)

Kick format is:

putquick "KICK chan nick :hello how are you"
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

arrh, thanks ]Kami[
r0t3n @ #r0t3n @ Quakenet
Post Reply