| View previous topic :: View next topic |
| Author |
Message |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Tue Apr 18, 2006 9:21 am Post subject: simple question about flags |
|
|
Hello!
My script should only work if the user has at least voice. So what I must change?
| Code: | bind pub - !msg pub:msg
proc pub:msg {nick uhost hand chan arg} {
global admin_chan
global public_chan
if {[string equal -nocase $public_chan $chan]} {
putquick "privmsg $admin_chan :!msg $nick: $arg"
}
} |
|
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Tue Apr 18, 2006 11:19 am Post subject: |
|
|
The following works when $nick is voiced in public_chan:
| Code: |
proc pub:msg {nick uhost hand chan arg} {
if {[isvoice $nick $public_chan]} {
global admin_chan
global public_chan
if {[string equal -nocase $public_chan $chan]} {
putquick "privmsg $admin_chan :!msg $nick: $arg"
}
}
}
|
|
|
| Back to top |
|
 |
darton Op
Joined: 21 Jan 2006 Posts: 155
|
Posted: Tue Apr 18, 2006 11:40 am Post subject: |
|
|
But that script only works if you have voice, but it should work when you have halfop or op, too.
I can do it like this:
| Code: | bind pub - !msg pub:msg
proc pub:msg {nick uhost hand chan arg} {
global admin_chan
global public_chan
if {[isvoice $nick $public_chan] || [ishalfop $nick $public_chan] || [isop $nick $public_chan]} {
if {[string equal -nocase $public_chan $chan]} {
putquick "privmsg $admin_chan :!msg $nick: $arg"
}
}
} |
But is this the easiest way? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Apr 18, 2006 8:54 pm Post subject: |
|
|
Does it work? If so, then what are you worried about? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Tue Apr 18, 2006 9:03 pm Post subject: |
|
|
You asked for help with a script.
The help you got showed you how to help yourself for the rest.
Don't complain about learning how to do something for yourself. |
|
| Back to top |
|
 |
|