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 

Request from caesar for Tsunami.tcl
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jun 18, 2003 6:04 am    Post subject: Request from caesar for Tsunami.tcl Reply with quote

Well can u make Tsunami.tcl work on Notice Floods too ?
is it like bind * NOTC ... or something to add ?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Wed Jun 18, 2003 9:10 am    Post subject: Reply with quote

Code:

##
# "x" notices sent to channel in "y" seconds will lock the channel for "z" minutes"
set ntl 5:3:60

##
# What channel modes do you want to be used when locking the channel?
set modes "mr"

##
# How the ban reason should sound like?
set ntcbreas "Some reason here.."

##
# For how many minutes the flooder should be banned?
set ntctime 5

#
###
#### Done with configurations, do not edit past here unless you know TCL!
###
#

# binds #
bind notc - * chan:notice
bind part - * notice:part

# stuff #
set blist ""

# array fix #
foreach dest [channels] {
  set ntc([strlwr $dest]) 0
}

# notice? #
proc chan:notice {nick uhost hand text dest} {
  global ntc blist
  if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} {
    return
  }
  set cm [getchanmode [strlwr $dest]]   
  if {(([string match {+*[$::modes]*[::modes]*} $cm]) && ([llength [split $::modes]] == 1)) || (([string match {+*[::modes]*[::modes]* *} $cm]) && ([length [split $cm]] > 1))} { return }

  if {![info exists ntc([strlwr $dest])]} { set ntc([strlwr $dest]) 0 }

  lappend blist [strlwr $nick]
  set nonotc [lindex [split $::ntl ":"] 0]
  set insec [lindex [split $::ntl ":"] 1]
  set unlockin [lindex [split $::ntl ":"] 2]
  incr ntc([strlwr $dest])
  utimer $insec [list reset [strlwr $dest]]
  utimer $insec [list remove [strlwr $uhost]]
  if {$ntc([strlwr $dest]) >= $nonotc} {
    putquick "MODE [strlwr $dest] +$::modes" -next
    foreach luser $blist {
      set mask "*!*@[lindex [split [getchanhost $luser [strlwr $dest]] @] 1]"
      newchanban [strlwr $dest] $mask $::botnick $::ntcbreas $::ntctime
    }
    utimer $unlockin [list unlock [strlwr $dest]]
  }
}

# reset #
proc reset {dest} {
  global ntc
  incr ntc([strlwr $dest]) -1
  return
}

# remove #
proc remove {nick} {
  global blist
  set index [lsearch -exact $blist [strlwr $nick]]
  set blist [lreplace $blist $index $index]
  return
}

# unlock #
proc unlock {dest} {
  putquick "MODE [strlwr $dest] -$::modes"
  return
}

# array remove #
proc notice:part {nick uhost hand chan msg} {
  global ntc
  if {$nick != $::botnick} {
    return
  }
  foreach arr_part [array names ntc] {
    if {[string match [strlwr $chan] $arr_part]} {
      array unset ntc [strlwr $chan]
    }
  }
}

I've tested it and seemed to be working fine. Let me know if something is not working properly.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jun 18, 2003 11:25 am    Post subject: Reply with quote

Well Sentinel worked but your code didn't do anything.
It didn't give any errors though. can u find an explanation for this ?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Wed Jun 18, 2003 3:43 pm    Post subject: Reply with quote

I may have a hint, anyway, better stick to Sentitel, since is a real protection thing when the tsunami.tcl was practicaly a test, wanted to see if I can do something like that. Never intentioned to make it public.. oh well, Sentinel is more leet than mine so use it.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jun 19, 2003 4:01 am    Post subject: Reply with quote

Well I always use Sentinel, its the most important script for botnet floods.
but u must put high numbers for it to trigger (for example 12:20 - the seconds must be in the range of 20-60 so the script woud find the flooders)

I liked Tsunami.tcl cuz u can put low triggers, I just want it to detect on notice too.

thanx Smile
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Fri Jun 20, 2003 2:25 pm    Post subject: Reply with quote

Get the new version of the script from here.. Also, please do tell me if you notice something wrong. Thank you.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 6:10 am    Post subject: Reply with quote

Thanx Smile this version looks nice, I'll try it when I sit on my PC and tell u if there's something wrong ot not working. Very Happy
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 11:12 am    Post subject: Reply with quote

Well The script is very very good Smile it worked for both Notice Tsunami and longline tsunami floods.
But there's a little problem, the bot makes a mode flood like:
Quote:
ChanMode: @Laged sets mode [ +mR ]
ChanMode: @Laged sets mode [ +mR ]
(after unlock time)
ChanMode: @Laged sets mode [ -mR ]
ChanMode: @Laged sets mode [ -mR ]
ChanMode: @Laged sets mode [ -mR ]


can u fix it in a way that it locks the channel once and unlocks once.

or atleast unlock the channel only once please Rolling Eyes

Thank you again for this good script Smile
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Sat Jun 21, 2003 2:26 pm    Post subject: Reply with quote

The *chanmode* confused me a bit. Anyway, fixed it, added what you've asked for. Get the latest version from here.. Thank you for reporting the bug.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 4:19 pm    Post subject: Reply with quote

Well man, the locking is good (2 time maximum if the flood is big)

But the unlocking is annoying, it unlocks for like 5 or 6 times.
can u make it like, if mode set by bot for tsunami, then bot unlocks once.
or something like that ?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Sat Jun 21, 2003 4:38 pm    Post subject: Reply with quote

Are you absolutly shure you got the latest version (0.3) and replaced and also removed + unloaded the older versions befor loading the new one? Also, if it's possible please do give me an exaple how did he locked and unlocked the channel more than once. In my tests he locked and unlocked it only once..
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 5:20 pm    Post subject: Reply with quote

Script:
Quote:
# tsunami.tcl
# version 0.3
# caesar <cezarica@prietenii.com>


And I'm sure I removed the old one and rehashed+restarted the bot before I tested the script:
Quote:
Joins: h7378 [ ~q1926@80.84.128.143] - Clones from *!*@80.84.128.143 (h7378 q5920 w400[3])
Performing custom penalty on h7378 about join.
Joins: d8486 [ ~f5209@80.84.128.148] - Clones from *!*@80.84.128.148 (d8486 r648 w336[3])
h7378 JaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoT
r648 JaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoTJaZNoT
ChanMode: @Laged sets mode [ +mR ]
Kicks: d8486 was kicked from #web4u by [ @Laged ] : [ Codes/LongLine Tsunami flooder - Banned 5mins. ]
*** Laged sets mode: +b *!*@80.84.128.148
*** q5920 was kicked by Laged (Codes/LongLine Tsunami flooder - Banned 5mins.)
Kicks: w400 was kicked from #web4u by [ @Laged ] : [ banned: Codes/LongLine Tsunami flooder - Banned 5mins. ]
ChanMode: @Laged sets mode [ -mR ]
ChanMode: @Laged sets mode [ -mR ]
ChanMode: @Laged sets mode [ -mR ]

and I have also concluded that if the bot locks once, it unlocks 3 times.
If the bot locks twice, it unlocks 4 or six times.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3739
Location: Mint Factory

PostPosted: Sat Jun 21, 2003 5:26 pm    Post subject: Reply with quote

Replace the unlock proc with this one:
Code:

proc tsunlock {args} {
  switch -- [lindex $args 0] {
    "tlines" {
      set cm [getchanmode [strlwr [lindex $args 1]]]
      if {([string match {+*\[$::linemds]*\[$::linemds]*} $cm]) && ([llength [split $cm]] >= 1)} {
        putquick "MODE [strlwr [lindex $args 1]] -$::linemds"
        return
      }
    }
    "tnotc" {
      set cm [getchanmode [strlwr [lindex $args 1]]]
      if {([string match {+*\[$::notcmds]*\[$::notcmds]*} $cm]) && ([llength [split $cm]] >= 1)} {
        putquick "MODE [strlwr [lindex $args 1]] -$::notcmds"
        return
      }
    }
  }
}

and see if this helps..
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 5:54 pm    Post subject: Reply with quote

Well using this proc, the bot doesn't unlock at all.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jun 21, 2003 6:03 pm    Post subject: Reply with quote

Reply Deleted (it wasn't correct) sorry Smile .
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Sun Jun 22, 2003 4:50 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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