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.

tsunami.tcl by caesar

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

tsunami.tcl by caesar

Post by ComputerTech »

Hiya, i was wondering if anyone knew where the final version of tsunami.tcl could be found, i know the script is old, although i am interested to see and use it.

Thanks in advanced :)
ComputerTech
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

By me? I don't recall ever making one.
Once the game is over, the king and the pawn go back in the same box.
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

http://forum.egghelp.org/viewtopic.php? ... ht=tsunami
http://forum.egghelp.org/viewtopic.php? ... ht=tsunami

there are some very old posts about it, so i dunno, just each post has some code like this.

Code: Select all

# tsunami.tcl
# version 0.1 beta 2
# caesar <cezarica@prietenii.com>
# #eggdrop @ Undernet.org
# http://www.geocities.com/caesartcl/

### Description:
# Will lock and kick+ban the users that use a tsunami flood on the channel.

### Notes:
# This is still in beta testing so use it on your own risk!
# You will need eggdrop 1.6.x in order this to work.

# What channel modes do you want to be used for locking the channel?
set modes "mR"

# Number of lines in seconds keep channel locked for if they have how many characters?
# By default I've set it to 5 lines in 3 seconds to lock the channel for 60 seconds if they have more than 50 characters.
set ltl 6:3:30:13

### ANY EDITING AND/OR MODIFICATIONS MADE BEYOND THIS IS YOUR OWN RISK! ###

# binds #
bind pubm - * tsunami:pub
bind part - * tsunami:part

# stuff #
set blist ""
# setudef flag tsunami

# array fix #
foreach chan [channels] {
#  if {![channel get [strlwr $chan] tsunami]} {
#    return
#  }
  set bla([strlwr $chan]) 0
}

# tsunami #
proc tsunami:pub {nick uhost hand chan text} {
  global bla blist
  if {[strlwr $nick] == [strlwr $::botnick] || ![botisop [strlwr $chan]]} {
# || ![channel get [strlwr $chan] tsunami]
    return
  }
  set cm [getchanmode [strlwr $chan]]   
  if {(([string match {+*[$::modes]*[::modes]*} $cm]) && ([llength [split $::modes]] == 1)) || (([string match {+*[::modes]*[::modes]* *} $cm]) && ([length [split $cm]] > 1))} { return }

  set linelength [lindex [split $::ltl ":"] 3]
  if {[string length [join [split $text] ""]] > "$linelength"} {
    lappend blist [strlwr $nick]
    set lines [lindex [split $::ltl ":"] 0]
    set insec [lindex [split $::ltl ":"] 1]
    set unlock [lindex [split $::ltl ":"] 2]
    incr bla([strlwr $chan])
    utimer $insec "reset [strlwr $chan]"
    utimer $insec "remove [strlwr $nick]"
    if {$bla([strlwr $chan]) >= $lines} {
      putquick "MODE [strlwr $chan] +$::modes"
      foreach luser $blist {
        set mask "*!*@[lindex [split [getchanhost $luser [strlwr $chan]] @] 1]"
        newchanban [strlwr $chan] $mask Tsunami "Tsunami flooder!" 5
      }
      utimer $unlock "unlock [strlwr $chan]"
    }
  }
}

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

# remove #
proc remove {nick} {
  global blist
  lreplace blist [strlwr $nick] [strlwr $nick]
  return
}

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

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

putlog "tsunami.tcl.. loaded"
:P
ComputerTech
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Ah, that stuff.. :oops:

That stuff is from my early stages of figuring out stuff and was meant for me to learn new stuff. I'll have a look on this today or tomorrow and get back with an updated code. :)
Once the game is over, the king and the pawn go back in the same box.
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Thanks caesar! really appreciate it :D
ComputerTech
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

any luck caesar? i was looking at the code, i "think" it's do with the timers, not sure :lol:
ComputerTech
o
omagiosan
Voice
Posts: 3
Joined: Sat May 08, 2021 12:13 pm
Location: Bulgaria

Post by omagiosan »

Up the topic. I'm interested too...
<> Wazzzaaa!!? <>
Post Reply