Results 1 to 2 of 2

Thread: chaninfo -tools

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    0

    Default chaninfo -tools

    Salutare am un tcl de chaninfo creat de Hawke ... uitatzi tcl`ul


    Code:
    proc pub:chaninfo {hand chan args x mix} {
    
       set what  [lindex $args 0]
       set info ""
       set temp ""
    
       if { $what == ""} { a:usage $x chaninfo ; return "FAILED: not all parameters specified"}
       switch -exact -- $what {
    
          -flood { 
       lappend info "flood-chan %b[channel get $chan flood-chan]%%,"
       lappend info "flood-ctcp %b[channel get $chan flood-ctcp]%%,"
       lappend info "flood-join %b[channel get $chan flood-join]%%,"
       lappend info "flood-kick %b[channel get $chan flood-kick]%%,"
       lappend info "flood-deop %b[channel get $chan flood-deop]%%,"
       lappend info "flood-nick %b[channel get $chan flood-nick]%%,"
       a:tell $x 17 "channel %b-flood%% settings: [join $info]"
    }
    
          -anti {
       lappend info "[iif [channel get $chan antipub] + -]antipub,"
       lappend info "[iif [channel get $chan anticolour] + -]anticolour,"
       lappend info "[iif [channel get $chan antirepeat] + -]antirepeat,"
       lappend info "[iif [channel get $chan antinotice] + -]antinotice,"
       lappend info "[iif [channel get $chan antiunderline] + -]antiunderline,"
       lappend info "[iif [channel get $chan antibold] + -]antibold,"
       lappend info "[iif [channel get $chan antireverse] + -]antireverse,"
       lappend info "[iif [channel get $chan antiswear] + -]antiswear,"
       lappend info "[iif [channel get $chan antitake] + -]antitake"
       a:tell $x 17 "channel %b-anti%% settings: [join $info]"
    }
                    -tools {
            set temp "\channel %b-tools%% settings: [iif [channel get $chan allprotection] + -]allprotection, [iif [channel get $chan dns] + -]dns, [iif [channel get $chan ipinfo] + -]ipinfo, [iif [channel get $chan leave] + -]leave, [iif [channel get $chan google] + -]google, [iif [channel get $chan meteo] + -]meteo" 
            a:tell $x 17 [join $temp] ; return "- + tools"
    }
    
          -all {
       lappend info "modes %b[channel get $chan chanmode]%%,"
       lappend info "idle-kick %b[channel get $chan idle-kick]%%,"
       lappend info "revenge-mode %b[channel get $chan revenge-mode]%%,"
       lappend info "flood-chan %b[channel get $chan flood-chan]%%,"
       lappend info "flood-ctcp %b[channel get $chan flood-ctcp]%%,"
       lappend info "flood-join %b[channel get $chan flood-join]%%,"
       lappend info "flood-kick %b[channel get $chan flood-kick]%%,"
       lappend info "flood-deop %b[channel get $chan flood-deop]%%,"
       lappend info "flood-nick %b[channel get $chan flood-nick]%%,"
       lappend info "idle-deop %b[channel get $chan idle-deop]%%,"
       lappend info "aop-delay %b[channel get $chan aop-delay]%%,"
       lappend info "ban-time %b[channel get $chan ban-time]%%,"
       lappend info "exempt-time %b[channel get $chan exempt-time]%%,"
       lappend info "invite-time %b[channel get $chan invite-time ]%%,"    
       a:tell $x 17 "[join $info] [join [lrange [channel info $chan] 19 72]]"
    }
          -info {
       set url [::stats::channel -get $chan url]
       set mail [::stats::channel -get $chan mail]
       set desc [::stats::channel -get $chan desc]
       set faq [::stats::channel -get $chan faq]
       set rules [::stats::channel -get $chan rules]
       set news [::stats::channel -get $chan news]
       set kiss [::stats::channel -get $chan kiss]
       set fuck [::stats::channel -get $chan fuck]
       set slap [::stats::channel -get $chan slap]
       if { $url == ""} { lappend info "url: %rOFF%%," } else {lappend info "url: %rON%%," }
       if { $mail == ""} { lappend info "mail: %rOFF%%," } else {lappend info "mail: %rON%%," }
       if { $desc == ""} { lappend info "desc: %rOFF%%," } else {lappend info "desc: %rON%%," }
       if { $faq == ""} { lappend info "faq: %rOFF%%," } else {lappend info "faq: %rON%%," }
       if { $rules == ""} { lappend info "rules: %rOFF%%," } else {lappend info "rules: %rON%%," }
       if { $news == ""} { lappend info "news: %rOFF%%," } else {lappend info "news: %rON%%," }
       if { $kiss == ""} { lappend info "kiss: %rOFF%%," } else {lappend info "kiss: %rON%%," }
       if { $fuck == ""} { lappend info "fuck: %rOFF%%," } else {lappend info "fuck: %rON%%," }
       if { $slap == ""} { lappend info "slap: %rOFF%%," } else {lappend info "slap: %rON%%," }
    
       a:tell $x 17 "channel %b-info%% settings: [join $info]"
    }
          default {a:usage $x chaninfo; return "FAILED: not all parameters specified"}
    }
       return "..."
    
    }i
    Iata si eroarea in partyline:

    Code:
    <(PandC>     while executing
    <(PandC> "channel get $chan antiswear"
    <(PandC>     ("-anti" arm line 9)
    <(PandC>     invoked from within
    <(PandC> "switch -exact -- $what {
    <(PandC> 
    <(PandC>       -flood { 
    <(PandC>    lappend info "flood-chan %b[channel get $chan flood-chan]%%,"
    <(PandC>    lappend info "flood-ctcp %b[channel get ..."
    <(PandC>     (procedure "pub:chaninfo" line 8)
    <(PandC>     invoked from within
    Deci .chaninfo -tools merge ... dar cand dau .chaninfo -anti nu mai merge ... ma puteti ajuta ?

    Msik astept reply
    ...::: Just Smile :::....

  2. #2
    Member
    Join Date
    Jun 2004
    Location
    Canada
    Age
    27
    Posts
    174
    Rep Power
    0

    Default

    In primul rind tools nu merge, anti nu merge. Mam clarificat de ce. tu in

    Code:
    -anti{ ... }
    ai

    Code:
       lappend info "[iif [channel get $chan antiswear] + -]antiswear,"
       lappend info "[iif [channel get $chan antitake] + -]antitake"
    Amindoua din care la tine nu exista ca flaguri de canal. Sterge aceste 2 linii si anti o sa mearga. Cred ca tools e aceiash problema. Cind nu are un flag da eroare.

    PS. Vezi ca ai u i la sfirshit de cod. si fiecare if e iif nustiu de ce.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Modify script] script with tools
    By xlmpq in forum Tcl scripting
    Replies: 9
    Last Post: 16-09-2009, 13:21
  2. chaninfo problem
    By xlmpq in forum a&a script
    Replies: 2
    Last Post: 01-09-2009, 20:59
  3. chaninfo
    By verzui in forum a&a script
    Replies: 4
    Last Post: 01-11-2008, 15:05
  4. chaninfo
    By Freezed in forum a&a script
    Replies: 7
    Last Post: 18-11-2005, 17:14
  5. chaninfo
    By lsn in forum Tcl scripting
    Replies: 7
    Last Post: 19-11-2004, 09:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •