egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TCM.tcl help..

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
erotism
Voice


Joined: 10 Aug 2010
Posts: 13
Location: Sofia, Bulgaria

PostPosted: Sun Apr 29, 2012 6:30 am    Post subject: TCM.tcl help.. Reply with quote

Here si code who I want to modify..

Code:
proc *raw:cmds {from key arg} {
  global botnick servername ochan klist u_cflood c_kreason c_ktime c_kcount host whatdoing host
  if {$from != $servername} { return 0 } 
  if {[lindex $arg 2] == "Oper" && [lindex $arg 3] == "privs"} {
    putquick "STATS c" 
    putquick "STATS v"
    putquick "STATS p"
    putquick "STATS o"
    return 0
  }
  if {[lindex $arg 5] == "Flooder" && [lindex $arg 4] == "Possible"} {
    set fnick [lindex $arg 5]
    set fhost [lindex $arg 6]
    set onserver [lindex $arg 8]
    set target [lindex $arg 10]
   set whatdoing [lrange $arg 4 end]
    set host "[lindex [split "[lindex $arg 6]" "\[\]"]>-1]"
   putquick "PRIVMSG $ochan :$whatdoing"
    if {[lsearch -glob [string tolower $host] "*server.com"]>-1} {return 0}
    if {[lsearch -glob [string tolower $host] "*111.222.333.444"]>-1} {return 0}
    if {[lsearch -glob [string tolower $host] "*server1.com*"]>-1} {return 0}
    scan $fhost "%\[^@]@%s" trash uhost
    scan $uhost "%\[^]]]%s" host trash
    if {[regexp -nocase $host $klist]} {
      return 0
    } else {
      set klist "$klist $host"
      timer 10 "remove_kline $host"
    }
    putlog "KLINE 10 *@$host :$fnick $fhost Stop flooding, please!"
  }
}


On flood I received snotice:

Code:

(13:10:56) -irc.server.com- *** Notice -- Possible Flooder nick[~ident@host] on irc.server.com target: #channel


How to make a bot to take nick ident and host from servernotice and set them as $fnick $fident and $fhost, and..

Code:
putlog "KLINE 10 *@$host :$fnick $fhost Stop flooding, please!"


becoming..

Code:
putlog "Flooder Nick: $fnick"
putlog "Flooder Identd: $fident"
putlog "Flooder Host: $fhost"
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber