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.

del flags

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

del flags

Post by pilouuu »

Type !deluser nick the bot del all flags user in the chan (chan or orders it was to type)

Code: Select all

## !DELUSER <nick>

proc pub_lol_deluser {me b c chan arg} {
	set arg [charfilter $arg]
	global lol botnick
	if {![check $c $me $b]} {
		if {$lol(silent) == 1 || [checksilent $c]} {return 0}
                puthelp "NOTICE $me :Please auth you."
		return 0
	}
	if {[llength $arg] != 1} {
		puthelp "NOTICE $me :\002try:\002 [string trim $lol(cmdchar)]deluser <nick>"
		return 0
	}
	set nick [lindex $arg 0]
	set bot [strlwr $botnick]
	set hand [nick2hand $nick $chan]
	if {![onchan $nick $chan]} {
                puthelp "NOTICE $me :$nick not in $chan."
		return 0
	}
	if {[strlwr $nick] == $bot} {
                puthelp "NOTICE $me :Error!!! acces denied"
		return 0
	}
	if {[getting-users]} {
                puthelp "NOTICE $me :Error!!! try again"
		return 0
	}
	if {![validuser $hand]} {
		puthelp "NOTICE $me :Error!!!not found"
		return 0
	}
	if {[matchattr $hand n]} {
		puthelp "NOTICE $me :Error!!! acces denied."
		return 0
	}
	chattr $nick -jlmnoptxvV $chan
	if {[botisop $chan]} {pushmode $chan -ov $nick}
	return 0
}
the bot no delete flag.please or is the error thx
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

chattr $nick |-jlmnoptxvV $chan
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

thx for help

The bot alway not delete flags

thx
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

you could use

Code: Select all

chattr [nick2hand $nick] |-[lindex [split [chattr [nick2hand $nick] $chan] |] 1] $chan
r0t3n @ #r0t3n @ Quakenet
p
pilouuu
Halfop
Posts: 82
Joined: Mon Dec 26, 2005 8:03 pm

Post by pilouuu »

GooD!! Thx :)
Post Reply