+ Reply to Thread
Results 1 to 2 of 2

Thread: Eroare Botnet [Welcome,Leave,Greet]

  1. #1
    Junior Member SoLLo is an unknown quantity at this point
    Join Date
    Apr 2007
    Posts
    11
    Rep Power
    0

    Unhappy Eroare Botnet [Welcome,Leave,Greet]

    Am aceste 3 TCL-uri si imi dau 3 erori nu stiu de ce , pe Windrop functioneaza perfect dar pe Eggdrop imi da aceste erori ! Sunt TCL din arhiva U&U cele cu Welcome,Leave,Greet .

    Code:
    Tcl error [set_leave]: wrong # args: should be "foreach varList list ?varList list ...? command"
    Tcl error [set_welcome]: wrong # args: should be "foreach varList list ?varList list ...? command"
    Tcl error [set_greet]: wrong # args: should be "foreach varList list ?varList list ...? command"
    Last edited by UniversaliA; 30-06-2008 at 17:53.

  2. #2

    Default

    Code:
    if {![info exists greetfile]} {
       set greetfile "greetfile"
       set greetsetfile "greetset"
    }
    
    bind pub - !greet pub_greet
    bind pub - `greet pub_greet
    bind pub - .greet pub_greet
    bind join - *!*@* set_greet
    bind msg - greet greet_set
    bind dcc - greet greet_set_dcc
    
    
    proc greet:replace { nick chan line } {
      global botnick
      if {[string match "*%nick%*" $line]} { regsub -all %nick% $line $nick line }
      if {[string match "*%chan%*" $line]} { regsub -all %chan% $line $chan line }
      return $line
    }
    
    
    proc set_greet {nick uhost hand chan} {
      global random_greet setgreet botnick greet:replace
    
     if {$botnick != $nick} {
      if [channel get $chan greet] {
      if {[info exists setgreet([string tolower $chan])] && [lindex $setgreet([string tolower $chan]) 0] != ""} {
        set i $setgreet([string tolower $chan]) 
        puthelp "NOTICE $nick :[greet:replace $nick $chan $i]"
    
       } {
    
         foreach i [array names random_greet] {
            if {[lsearch -exact [string tolower [channels]] [string tolower $i]] != -1} {
                if {[lindex $random_greet([string tolower $i]) 0] != ""} {
                  set greet [lindex $random_greet($i) [rand [llength $random_greet($i)]]]
                    if {$chan == $i} {
                      puthelp "NOTICE $nick :$greet"
                    }
                }
            } {
                unset random_greet($i)
              }
          }
       }
      }
     }
    }
    proc greet_show_pub {nick uhost hand channel arg} {
      global random_greet setgreet botnick 
    
    
      if {![matchattr $hand m|m $channel]} {
         putserv "PRIVMSG $channel :Sorry, you are not authorized to use this command."
         return 0
      }
    
      if {[info exists setgreet([string tolower $channel])] && [lindex $setgreet([string tolower $channel]) 0] != ""} {
        set i $setgreet([string tolower $channel]) 
           putserv "PRIVMSG $channel :\002Greet Set to:\002  $i"
           putserv "PRIVMSG $channel :Use GREET SET $channel OFF if you want to turn it off."
       
        }
        putserv "PRIVMSG $channel :Type \002/msg $botnick greet HELP\002 for help."
    
      return 1
    }
    
    
    proc greet_show {nick uhost hand arg} {
      global random_greet setgreet botnick 
    
      set channel [lindex $arg 0]
      if {$channel == ""} {
         putserv "PRIVMSG $nick :Usage: greet <channel>"
         return 0
      }
    
        if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] == -1} {
         putserv "PRIVMSG $nick :I am not on ${channel}."
         return 0
      }
    
        if {![matchattr $hand m|m $channel]} {
         putserv "PRIVMSG $nick :Sorry, you are not authorized to use this command."
         return 0
      }
    
      if {[info exists setgreet([string tolower $channel])] && [lindex $setgreet([string tolower $channel]) 0] != ""} {
        set i $setgreet([string tolower $channel]) 
           putserv "PRIVMSG $nick :\002Greet Set to:\002  $i"
           putserv "PRIVMSG $nick :Use GREET SET $channel OFF if you want to turn it off."
       
        }
      
    
      putserv "PRIVMSG $nick :Type \002/msg $botnick greet HELP\002 for help."
    
      return 1
    }
    
    proc greet_show_dcc {hand idx arg} {
      global random_greet setgreet botnick 
    
      set channel [lindex $arg 0]
      if {$channel == ""} {
         putidx $idx "Usage: greet <channel>"
         return 0
      }
    
      
      if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] == -1} {
         putidx $idx "I am not on ${channel}."
         return 0
      }
    
      if {![matchattr $hand m|m $channel]} {
         putidx $idx "Sorry, you are not authorized to use this command."
         return 0
      }
    
      putidx $idx "Greets for \002$channel\002:"
    
      if {[info exists setgreet([string tolower $channel])] && [lindex $setgreet([string tolower $channel]) 0] != ""} {
        set i $setgreet([string tolower $channel]) 
           putidx $idx "\002Greet Set to:\002  $i"
           putidx $idx "Use GREET SET $channel OFF if you want to turn it off."
           }
    
    
     
      putidx $idx "Type \002.greet HELP\002 for help."
    
      return 1
    }
    
    proc greet_set_pub {nick uhost hand channel arg} {
      global setgreet
    
      if {![matchattr $hand m|m $channel]} {
         putserv "PRIVMSG $channel :Sorry, you are not authorized to use this command."
         return 0
      }
      if {[string tolower [lindex $arg 1]] != "-off"} {
        putserv "PRIVMSG $channel :Greet set to: [lrange $arg 1 end]"
        set setgreet([string tolower $channel]) [lrange $arg 1 end]
      } {
        putserv "PRIVMSG $channel :Greet set off $channel"
        set setgreet([string tolower $channel]) [lrange "" 1 end]
      }
      
      putlog "Writing greets file..."
      greet_write
      
      return 1
    
    }
    
    
    proc greet_set {nick uhost hand arg} {
      global setgreet
    
      set channel [lindex $arg 1]
    
      if {$channel == ""} {
         putserv "PRIVMSG $nick :Usage: GREET SET <channel> <greet>"
         putserv "PRIVMSG $nick :Or:    GREET SET <channel> OFF"
         return 0
      }
    
      if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] == -1} {
         putserv "PRIVMSG $nick :I am not on ${channel}."
         return 0
      }
    
      if {![matchattr $hand m|m $channel]} {
         putserv "PRIVMSG $nick :Sorry, you are not authorized to use this command."
         return 0
      }
    
      if {[string tolower [lindex $arg 1]] != "-off"} {
        putserv "PRIVMSG $nick :Greet set to: [lrange $arg 1 end]"
        set setgreet([string tolower $channel]) [lrange $arg 1 end]
      } {
        putserv "PRIVMSG $nick :Greet set off $channel"
        set setgreet([string tolower $channel]) [lrange "" 1 end]
      }
      
      putlog "Writing greets file..."
      greet_write
      
      return 1
    
    }
    
    proc greet_set_dcc {hand idx arg} {
      global setgreet
    
      set channel [lindex $arg 2]
    
      if {$channel == ""} {
         putidx $idx "Usage: GREET SET <channel> <greet>"
         putidx $idx "Or:    GREET SET <channel> OFF"
         return 0
      }
    
      if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] == -1} {
         putidx $idx "I am not on ${channel}."
         return 0
      }
    
      if {![matchattr $hand m|m $channel]} {
         putidx $idx "Sorry, you are not authorized to use this command."
         return 0
      }
    
      if {[string tolower [lindex $arg 2]] != "-off"} {
        putidx $idx "Greet set to: [lrange $arg 1 end]"
        set setgreet([string tolower $channel]) [lrange $arg 2 end]
      } {
        putidx $idx "Greet set off $channel"
        set setgreet([string tolower $channel]) [lrange "" 2 end]
      }
      
      
      putlog "Writing greets file..."
      greet_write
      
      return 1
    
    }
    proc greet_load {} {
       global random_greet setgreet greetfile greetsetfile
    
       if {[info exists random_greet]} {unset random_greet}
       if {[catch {set fd [open $greetfile r]}] != 0} {return 0}
       while {![eof $fd]} {
          set inp [gets $fd]
          if {[eof $fd]} {break}
          if {[string trim $inp " "] == ""} {continue}
          set channel [lindex $inp 0]
          lappend random_greet([string tolower $channel]) [lrange $inp 1 end]
       }
       close $fd
    
       if {[info exists setgreet]} {unset setgreet}
       if {[catch {set fd [open $greetsetfile r]}] != 0} {return 0}
       while {![eof $fd]} {
          set inp [gets $fd]
          if {[eof $fd]} {break}
          if {[string trim $inp " "] == ""} {continue}
          set channel [lindex $inp 0]
          lappend setgreet([string tolower $channel]) [lrange $inp 1 end]
       }
       close $fd
    
    
    
       return 1
    }
    
    proc greet_write {} {
       global greetfile random_greet setgreet greetsetfile
    
       set fd [open $greetfile w]
       foreach channel [array names random_greet] {
          if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] != -1} {
             if {[lindex $random_greet([string tolower $channel]) 0] != ""} {
                foreach i $random_greet([string tolower $channel]) {
                   puts $fd "$channel $i"
                }
             }
          }
       }
       close $fd
    
       set fd [open $greetsetfile w]
       foreach channel [array names setgreet] {
          if {[lsearch -exact [string tolower [channels]] [string tolower $channel]] != -1} {
             if {[lindex $setgreet([string tolower $channel]) 0] != ""} {
                set i $setgreet([string tolower $channel]) 
                   puts $fd "$channel $i"
             }
          }
       }
       close $fd
    
       return 1
    }
    
    
    proc msg_greet {nick uhost hand arg} {
      switch [string tolower [lindex $arg 0]] {
        "set"       {set r [greet_set $nick $uhost $hand $arg]}
        "help"      {set r [greet_help $nick $uhost $hand $arg]}
        default     {set r [greet_show $nick $uhost $hand $arg]}
      }
      return $r
    }
    
    proc pub_greet {nick uhost hand channel arg} {
      switch [string tolower [lindex $arg 0]] {
        "set"       {set r [greet_set_pub $nick $uhost $hand $channel $arg]}
        "help"      {set r [greet_help_pub $nick $uhost $hand $channel $arg]}
        default     {set r [greet_show_pub $nick $uhost $hand $channel $arg]}
      }
      return $r
    }
    
    
    proc dcc_greet {hand idx arg} {
      switch [string tolower [lindex $arg 0]] {
        "set"       {set r [greet_set_dcc $hand $idx $arg]}
        "help"      {set r [greet_help_dcc $hand $idx $arg]}
        default     {set r [greet_show_dcc $hand $idx $arg]}
      }
      return $r
    }
    
    
    greet_load
    
    if {![info exists set_greet_running] && ![info exists random_greet] && ![info exists setgreet]} {
      set set_greet_running 1
    }
    Ar trebui sa mearga perfect
    Ombladon Rulez !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. Welcome/Leave - Ban/Kick-Reason [4 in 1]
    By SoLLo in forum Tcl scripting
    Replies: 3
    Last Post: 12-04-2007, 13:31
  2. botnet
    By UniversaliA in forum Polls & announcements
    Replies: 5
    Last Post: 12-03-2007, 10:01
  3. botnet
    By lsn in forum Tcl scripting
    Replies: 1
    Last Post: 31-05-2005, 14:33
  4. eroare in !chattr
    By GoRaPiD in forum Tcl scripting
    Replies: 2
    Last Post: 17-02-2005, 09:29
  5. Eroare :)
    By Virtual in forum a&a light script
    Replies: 13
    Last Post: 10-10-2004, 22: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