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 

AutoRejoin

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 29, 2005 5:20 am    Post subject: AutoRejoin Reply with quote

When it was just mentioned in another script, there are no confident anti rejoin scripts to find in the TCL archieves. I will relesae it here first, before I bother slennox to add it to the archieve (errors somehow seem to magicaly occur when I do so Very Happy). I hope you like it, if not... don't use it Smile.

Features:
- it trackes kicked users and adds them temporary to a list
- will only punish kicks from known (half-)ops and exclude ops and friend from punishment
- kicks them if they rejoin within a given amount of seconds
- kick/ban reason will include the name of original kicker (and will be Bot-Script, if it is the bot itself)

I originally named it "anti autorejoin deluxe", but when I just wanted to publish it, I thought that name was just pretty lame Very Happy.

Download v2.0.2:
http://home.arcor.de/dekus/autorejoin.zip
http://home.arcor.de/dekus/autorejoin.tar.bz2
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...


Last edited by De Kus on Sun Oct 16, 2005 10:11 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Sat Oct 15, 2005 8:00 pm    Post subject: error Reply with quote

hello

i get this error will useing you script.

Quote:
Tcl error [noautorejoin:k]: syntax error in expression " [set handle $hand] == "*"] ": extra tokens at end of expression

Code:

# AutoRejoin
# by DeKus <DeKus@gmx.net>
#
# This script bans autorejoining users for 1min (not 60sec)
# The kick reason will include who kicked him ealier
#
# 2.0.1 29.06.2005 using nick if no handle is avaible
# 2.0   24.02.2005 rework with ban on join bind, fixed a logical error with server kicks
# 1.0.1 05.02.2003 Added support for server kicks and included handle of kicker in ban reason
# 1.0   03.01.2003 First final Version
#
# Published under the GPL (see file footer).

#
# Config
#

# delay seconds threat as autorejoin
set autorejoin(time) 5

# kick reason
set autorejoin(reason) "-1min- Don´t Auto rejoin"

# chans to excempt
set autorejoin(exclude) ""

#
# end of config

#

bind kick - * noautorejoin:k
set autorejoin(list) "#seekspons"

proc noautorejoin:k {nick uhost hand chan target reason} {
  global autorejoin
  set targethandle [nick2hand $target]
  set targethost [getchanhost $target $chan]
  if { ![string match -nocase *$chan* $autorejoin(exclude)] && ([matchattr $hand ol|ol $chan] || [isbotnick $nick]) && ![matchattr $targethandle of|of $chan] && ![matchban "$target!$targethost" $chan] && ![isbotnick $target]} {
    if { $nick == "" } {
       set handle $::network
    } elseif { [isbotnick $nick] } {
       set handle Bot-Script
    } else {
       if { [set handle $hand] == "*"] } {
          set handle $nick
       }
    }
    set jbind "$chan *![string map {~ ?} $targethost ]"
    bind join - $jbind noautorejoin:j
    lappend autorejoin(list) [lindex [split "$jbind $handle"]]
    utimer $autorejoin(time) [list noautorejoin:r $jbind]
    return 1
  }
}

proc noautorejoin:j {nick uhost hand chan} {
   global autorejoin
   set maphost [string map {~ ?} $uhost]
   set handle [lindex [split [lsearch -inline $autorejoin(list) "$chan *!${maphost}*"]] 2]
   newchanban $chan "*!$maphost" autorejoin "$autorejoin(reason) $handle" 1
}

proc noautorejoin:r {jbind} {
   global autorejoin
   unbind join - $jbind noautorejoin:j
   if { [set entry [lsearch $autorejoin(list) $jbind*]] != -1 } {
      set autorejoin(list) [lreplace $autorejoin(list) $entry $entry]
   }
}

putlog "AutoRejoin.tcl v2.0.1 loaded!"

# Copyright © 2003-2005 De Kus
# This tcl script (AutoRejoin) for the eggdrop IRC bot is released
# under the GNU GPL, refer GPL.txt included in the archive.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Oct 15, 2005 10:33 pm    Post subject: Reply with quote

Replace
Code:
if { [set handle $hand] == "*"] } {

with
Code:
if { [set handle $hand] == "*" } {


The magical error De Kus Razz
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Sun Oct 16, 2005 10:01 am    Post subject: Reply with quote

Sir_Fz wrote:
Replace
Code:
if { [set handle $hand] == "*"] } {

with
Code:
if { [set handle $hand] == "*" } {


The magical error De Kus Razz


thx but i get it fixed Very Happy
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Oct 16, 2005 10:07 am    Post subject: Reply with quote

strange, I must have forgotten to update the file here. my changelog tells me It was fixed July 17th, dont ask me why I didnt update it Very Happy.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Sun Oct 16, 2005 10:34 am    Post subject: Reply with quote

De Kus wrote:
strange, I must have forgotten to update the file here. my changelog tells me It was fixed July 17th, dont ask me why I didnt update it Very Happy.


is that done now?
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Oct 16, 2005 7:08 pm    Post subject: Reply with quote

Esben wrote:
is that done now?
sure, I (hopefully Very Happy) updated the download when I edited the entry posts download version Very Happy.

PS: sorry for not clearing the exclude var, but I doubt it will actually bother you Very Happy.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
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