| View previous topic :: View next topic |
| Author |
Message |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Sep 03, 2005 10:36 am Post subject: NEXT TCL.. |
|
|
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: | # 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? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Sep 03, 2005 10:42 am Post subject: |
|
|
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. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Sep 03, 2005 10:58 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Sep 03, 2005 11:09 am Post subject: |
|
|
ey see if this is going to work or wrong..
| Code: | # 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)
} |
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Sep 03, 2005 11:18 am Post subject: |
|
|
| It's still not working using the code I just pasted.. it's listening to everyone.. not only ops in theback channel. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Sep 03, 2005 11:21 am Post subject: |
|
|
you have to add the [isop] checks inside the procs (i.e. next:$temp(2)) _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Sat Sep 03, 2005 11:56 am Post subject: |
|
|
ey thanks I got fixed  |
|
| Back to top |
|
 |
|