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.

Script...

Old posts that have not been replied to for several years.
Locked
P
ProXy
Op
Posts: 126
Joined: Sun Aug 11, 2002 3:09 pm

Script...

Post by ProXy »

Hi, I now, nobody will write a ready-to-go script for me, so i started to write a little one, that should offer the public command: !lamer <nick> <timeforban>

The Script is nearly working but if i enter a time the timer always makes an error or it simply doesn`t kick the user. Could please anyone check what`s the error in this source?

Code: Select all

bind pub o|o !lamer pub:lamer
proc pub:lamer { nick uhost handle channel arg } {
global botnick
	if {([llength $arg]==0) || ([lsearch [string tolower [chanlist $channel]] [string tolower [lindex $arg 0]]]==-1) || (![string is digit [lindex $arg 1]])} {
		putserv "PRIVMSG $channel :Usage: !lamer <nick> [time]"
	} elseif {![botisop $channel]} {
		putserv "PRIVMSG $channel :$nick: Ja, du Scherzkeks, dann gib mir OP!"
	} elseif {$botnick==$arg} {
		putserv "PRIVMSG $channel :$nick: So blöd bin ich nun wirklich nicht..."
	} else {
		if {[string is digit [lindex $arg 1]]} {
			set bantime [lindex $arg 1]
		} else {
			set bantime 10
		}
		set host [getchanhost $arg $channel]
		putserv "MODE $channel +b $arg!$host"
		utimer 2 "putkick $channel $arg lamer"
		timer $bantime "putserv \"MODE $channel -b $arg!$host\""
	}
}
Locked