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 

tsunami.tcl by caesar

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 385

PostPosted: Mon May 17, 2021 10:22 pm    Post subject: tsunami.tcl by caesar Reply with quote

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 Smile
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caesar
Mint Rubber


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

PostPosted: Tue May 18, 2021 2:34 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 385

PostPosted: Tue May 18, 2021 11:13 am    Post subject: Reply with quote

http://forum.egghelp.org/viewtopic.php?t=4606&highlight=tsunami
http://forum.egghelp.org/viewtopic.php?t=4717&highlight=tsunami

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

# 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"


Razz
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caesar
Mint Rubber


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

PostPosted: Wed May 19, 2021 9:18 am    Post subject: Reply with quote

Ah, that stuff.. Embarassed

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. Smile
_________________
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
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 385

PostPosted: Wed May 19, 2021 10:08 am    Post subject: Reply with quote

Thanks caesar! really appreciate it Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 385

PostPosted: Fri May 28, 2021 5:08 pm    Post subject: Reply with quote

any luck caesar? i was looking at the code, i "think" it's do with the timers, not sure Laughing
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
omagiosan
Voice


Joined: 08 May 2021
Posts: 3
Location: Bulgaria

PostPosted: Wed Aug 18, 2021 10:44 am    Post subject: Reply with quote

Up the topic. I'm interested too...
_________________
<> Wazzzaaa!!? <>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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