| View previous topic :: View next topic |
| Author |
Message |
DrTongue Op

Joined: 26 Jan 2002 Posts: 115 Location: Orlando, Florida
|
Posted: Thu Nov 17, 2005 6:19 pm Post subject: command in .tcl to exclude ops |
|
|
I have a .tcl that when someone in the channel private messages the bot, the bot itself says in channel:
"<nick> You were asked not to private message anyone when you entered."
The problem is when someone does it who is an op and they use /msg to op or IDENT or whatever, they receive this warning. I am trying to get the bot to reconize if this person has the +o flag to NOT give the channel message. I was trying:
if {([matchattr $hand o|o $chan])} {
return 0
}
But it's not working. Any suggestions?
Thanks! _________________ www.irc-orlando.com |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Nov 17, 2005 6:34 pm Post subject: |
|
|
There's no chan attribute in a msg or msgm bind. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DrTongue Op

Joined: 26 Jan 2002 Posts: 115 Location: Orlando, Florida
|
Posted: Thu Nov 17, 2005 6:46 pm Post subject: |
|
|
So:
if {([matchattr $hand o|o])} {
return 0
}
???
And would $nick or nick be what I should use instead of $hand? _________________ www.irc-orlando.com |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Nov 17, 2005 6:51 pm Post subject: |
|
|
No that's incorrect, show us your code so we could help you. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DrTongue Op

Joined: 26 Jan 2002 Posts: 115 Location: Orlando, Florida
|
Posted: Thu Nov 17, 2005 7:08 pm Post subject: |
|
|
Ok sorry....here is the script itself that makes the bot respond with a message in the channel:
bind msgm - "*" proc:laina
#seting respondiendo el Privado
set chan "#channel"
proc proc:laina {nick uhost hand arg} {
global chan
set line [string trim $arg]
if {$nick == "SeenServ"} {
puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
return 0
}
puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
}
return 0 _________________ www.irc-orlando.com |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Nov 18, 2005 8:39 am Post subject: |
|
|
| Code: | bind msgm - "*" proc:laina
#seting respondiendo el Privado
set chan "#channel"
proc proc:laina {nick uhost hand arg} {
global chan
set line [string trim $arg]
if {$nick == "SeenServ"} {
puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
return 0
}
if {[matchattr $hand o|o $chan]} { return 0 }
puthelp "privmsg $chan : $nick You were asked NO private messages PLEASE' when you entered, thank you."
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DrTongue Op

Joined: 26 Jan 2002 Posts: 115 Location: Orlando, Florida
|
Posted: Fri Nov 18, 2005 5:29 pm Post subject: |
|
|
Thank you Sir! Works like a charm!  _________________ www.irc-orlando.com |
|
| Back to top |
|
 |
|