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.

need help

Old posts that have not been replied to for several years.
Locked
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

need help

Post by Pitchat »

Hi i have a little scripts and it doesnt work fine

it suppose tu voice people who have specifics flags ( +p) as soon as they talk on a channel then remove that voice after a certain time .the problem is that it doesnt voice anybody

anyone ?

Code: Select all

# CONFIGURATION 
# ------------- 
# Sur quel canal cette fonction prendra effet
set channel "#pitchat"

# Combien de temps avant de dévoice
set idletime 20

# Qui voicer? (* pour tout le monde)
set voiceflag p

#################################################


# Manipulation ...
if {![validchan $channel]} {
	putlog "$channel n'est pas un canal couvert par $botnick!"
	return 0
}

set channel [string tolower $channel]

# Déclanchement événementiel
bind pubm  - $voiceflag pubm:revoice
bind time - "* % % % %" time:devoice

# Procédure redonnant le +v
proc pubm:revoice {nick host hand chan text} {
	global channel
	# Validation du canal
	if {[string tolower $chan] != $channel || [isvoice $nick $chan]} {return 0}
	putquick "MODE $chan +v $nick"
}

# Procédure enlevant le +v
proc time:devoice {m h d o y} {
	global channel idletime
	# Listage des usager du canal
	foreach list [chanlist $channel] {
		# Validation de la néssecité de dévoicer
		if {[getchanidle $list $channel] > $idletime} {putserv "Mode $channel -v $list"}
	}
	return 0
}
thanks

Pitchat
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

I believe you'll want to change:

Code: Select all

bind pubm  - $voiceflag pubm:revoice 
to

Code: Select all

bind pubm $voiceflag * pubm:revoice 
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

Post by Pitchat »

wow it was a fast answer !!

thanks a lot it works just fine

just remind me to have a good night sleep before doing tcl :)

thanks again

Pitchat
Locked