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.

NEXT TCL..

Old posts that have not been replied to for several years.
Locked
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

NEXT TCL..

Post by iamdeath »

Hi I need to ask onething if it's possible, I want to bing pub ( FLAGS ) for those who are oped in #BackChannel.

I have this code:

Code: Select all

# commands
set temp(list) [list next voice helped "" noidle "" skip "" put "" list ""]
foreach "temp(1) temp(2)" $temp(list) {
	if {$temp(2) == ""} {set temp(2) $temp(1)}
	foreach temp(bind) [binds next:$temp(2)] {
		unbind pub [lindex $temp(bind) 1] [lindex $temp(bind) 2] next:$temp(2)
	}
	bind pub - .$temp(1) next:$temp(2)
}
Can I do something to make it..
set flags [if {[isop $nick $backchannel]}]
bind pub $flags .$temp(1) next:$temp(2)
.. Like users who are oped in the back channel will be able to use the commands.. is that possible?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

No that's not possible, you'll either have to give the ops some flag and bind to it or add the [isop] check into your procs.
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

ey thanks for the reply but I don't wanna give flags or add them in Bots userlist I was wondering if it was possible to make it this way that ops in the backchannel can use the script.. could'nt you modify the part i've pasted above to make it possibe? or something i am kinda new into it..
thanks
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

ey see if this is going to work or wrong..

Code: Select all

# commands
set temp(list) [list next voice helped "" noidle "" skip "" put "" list ""]
global backchannel
if {![isop $nick $backchannel]} {return}
foreach "temp(1) temp(2)" $temp(list) {
	if {$temp(2) == ""} {set temp(2) $temp(1)}
	foreach temp(bind) [binds next:$temp(2)] {
		unbind pub [lindex $temp(bind) 1] [lindex $temp(bind) 2] next:$temp(2)
	}
	bind pub - .$temp(1) next:$temp(2)
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Try it yourself and see.
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

It's still not working using the code I just pasted.. it's listening to everyone.. not only ops in theback channel.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

you have to add the [isop] checks inside the procs (i.e. next:$temp(2))
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

ey thanks I got fixed ;)
Locked