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.

AutoRejoin

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

AutoRejoin

Post by De Kus »

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 :D). I hope you like it, if not... don't use it :).

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 :D.

Download v2.0.2:
http://home.arcor.de/dekus/autorejoin.zip
http://home.arcor.de/dekus/autorejoin.tar.bz2
Last edited by De Kus on Sun Oct 16, 2005 10:11 am, edited 1 time in total.
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...
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

error

Post by Esben »

hello

i get this error will useing you script.
Tcl error [noautorejoin:k]: syntax error in expression " [set handle $hand] == "*"] ": extra tokens at end of expression

Code: Select all

# 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
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Replace

Code: Select all

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

Code: Select all

if { [set handle $hand] == "*" } {
The magical error De Kus :P
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

Post by Esben »

Sir_Fz wrote:Replace

Code: Select all

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

Code: Select all

if { [set handle $hand] == "*" } {
The magical error De Kus :P
thx but i get it fixed :D
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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 :D.
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...
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

Post by Esben »

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 :D.
is that done now?
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

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

PS: sorry for not clearing the exclude var, but I doubt it will actually bother you :D.
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...
Post Reply